Nuspec and AssemblyInfo

Topics: Ecosystem
Jul 21, 2014 at 12:40 PM
I have an AssemblyInfo file and Nuspec file in my project. Some information in the Nuspec file are taken from AssemblyInfo and some information like included files I added on my own.

I want to the Nuspec information be always the same as in AssemblyInfo. So if the AssemblyInfo is changed then Nuspec information is changed too. But I also want that the part in the Nuspec file that I added stays unchanged.

Does NuGet provide this opportunity?

Aug 21, 2014 at 6:13 PM
You should check out this documentation on creating packages There's a section that describes replacing static values in the nupsec with tokens that can be replaced at pack time. There's also the ability to "build a nupkg from a project" that will assume data from the assembly metadata.