Is it possible to use Azure DevOps pipeline variables in .nuspec files, which are used for packages creation?
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>MyTemplate</id>
<version>$(var1).$(var2).$(var3)</version>
<description>
Some template
</description>
<authors>Test Test</authors>
<packageTypes>
<packageType name="Template" />
</packageTypes>
</metadata>
</package>
Or is it a way to ovveride version specified in .nuspec file(it is required element) by those one in .yaml task?
task: NuGetCommand@2
displayName: Pack template
inputs:
command: pack
packagesToPack: '**/Template/*.nuspec'
packDestination: $(Build.ArtifactStagingDirectory)
versioningScheme: byPrereleaseNumber
majorVersion: '$(var1)'
minorVersion: '$(var2)'
patchVersion: '$(var3)'
But with versioningScheme: byPrereleaseNumber we will get timestamp added to our numbers.