SolvedHome Unhelpful error message when incorrectly using nuspec version tag of nuget pack ChrisMaddock posts at NuGet/HomeChrisMaddock177 I was just trying to use: nuget pack file.nuspec I was stuck for a while because of the error message: Value cannot be null or an empty string. Parameter name: value Turns out this is because I was using <version>$version$</version> in my nuspec, but not explicitly passing the package version. That makes sense, but I struggled to track this down - would it be possible to improve the error message here, and perhaps at least point the user towards the part of the nuspec file causing the issue. Thanks! 18 AnswersShareOriginal✔️Accepted Answeroptical122 This is definitely an error message which could do with some improvement. It seems there are two problems with the message here. Firstly it refers to a value parameter being null, which doesn't help with identifying that version is invalid. You basically have to resort to systematically editing/removing/replacing each element until the error goes away, which sucks. The second is that if you run the pack command against a .nuspec which has replacement tokens in it, it'd be much nicer if there was an early exit with a helpful message letting you know that you should be using it against the corresponding csproj. Other Answers:driscollwebdev52 @qwertie AssemblyInfo token replacement only works if you are calling nuget.exe pack and specifying your .csproj/.vbproj file to be packed. This behavior is documented here: These tokens will only be replaced when you execute the pack command with the project file, and not with the nuspec file. The contents of the nuspec file will be located and honored, with the appropriate token replacements executed. loop-evgeny44 Almost 2 years later, a simple error message improvement bug is still not fixed! Is there a workaround for this when building a NuGet package for multiple .NET versions, as @qwertie mentioned? qwertie22 I'm sorry, what's wrong with using <version>$version$</version>? P.S. I'm having this problem too. qwertie21 Ping! Geez, does anyone actually work on NuGet anymore? More Issues:66Home extern alias support for NuGet package references59Home Package 'NameOfPackage' is incompatible with 'all' frameworks in project38Home Package Manager Error: Unable to load the service index for source (bad proxy settings)32Home Unhelpful error message when incorrectly using nuspec version tag of nuget pack27Home Framework assemblies are no longer added to .nuspec when using the new .csproj project system27Home error NU1403: The package Microsoft.CSharp.4.0.1 sha512 validation failed.24Home Add --prerelease option to dotnet add package20Home contentFiles (cs, compile) not working in NetStandard projects.13Home dotnet.exe nuget push command now supports -skipDuplicate like nuget.exe did.12Home Invoke must be called on a background thread11Home dotnet restore on 2.1 preview1 throws error instead of warning when project files are "missing"