Nuspec version from AssemblyInfo version Nuspec version from AssemblyInfo version powershell powershell

Nuspec version from AssemblyInfo version


Finally i solved my problem, i found on tfs marketplace task that reads assembly version and sets automatically its value to nuspec file, so the nuget package version is the same of assembly.To whom it may concern, the task name is:

Nuget version synchronizerpublished by Cdiscount Alm

Thanks anyway for your help, guys


Looks like you've already versioned your build.

You can use the same number for your NuGet package versionig.

Edit your build process.Go to Options tab and set build number like $(date:yyyy.MM.dd)$(rev:.r)Then go to Tasks tab, press Add Task, Package, NuGet Packager.

Expand "Pack Options" for this step and set Automatic package versioning to "Use the build number".

It's the easiest way to version your NuGet (but not the best).

I would recommend to create a variable like "YourProjectName_BuildNumber" for NuGet package versioning. More details about variables: here.

More details about PowerShell in TFS: here.