1

I auto-increment assembly/file version numbers using a T4 Text Template that generates an AssemblyInfo.cs file looking like this:

[assembly: AssemblyVersion("1.0.0.525")]
[assembly: AssemblyFileVersion("1.0.0.525")]
[assembly: AssemblyInformationalVersion("1.0.0.525")]

The project is set to generate a package on build. However, the created package file name always ends with *.1.0.0.nupkg because the <Version> element is missing in the csproj-file.

Is there a way to use the versions specified in AssemblyInfo.cs as the package version?

Mo B.
  • 5,307
  • 3
  • 25
  • 42

1 Answers1

0

This is due to some syntactical incompatibility between Visual Studio and NuGet. To make this really work, you need to change AssemblyInformationalVersion to something more like 1.0.0-build.525 or for older NuGet 1.0.0-build00525.

Twenty
  • 5,234
  • 4
  • 32
  • 67
Jeff
  • 11
  • 1