You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running dotnet pack on the project which also has .nuspec file specified, and the version is being set only in .csprojPackageVersion setting, while in nuspec it is a variable $version$, it fails to create package.
Creating package with version provided in .csproj file.
Actual behavior
An error during dotnet pack:
C:\Program Files\dotnet\sdk\2.1.4\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(204,5): error : Value cannot be null or an empty string. [...\TestAssembly.csproj] C:\Program Files\dotnet\sdk\2.1.4\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(204,5): error : Parameter name: value [...\TestAssembly.csproj]
Environment data
dotnet --info output:
.NET Command Line Tools (2.1.4)
NuspecProperties is an MSBuild property, so it can be defined/amended as needed with MSBuild.
You can define some of the properties in some shared targets.
Note that this is only the case if you are using dotnet pack with a nuspec file.
From @maciejjarzynski on March 2, 2018 9:49
Steps to reproduce
When running
dotnet pack
on the project which also has.nuspec
file specified, and the version is being set only in.csproj
PackageVersion
setting, while innuspec
it is a variable$version$
, it fails to create package.Csproj:
Nuspec:
Command to run:
dotnet pack
Expected behavior
Creating package with version provided in
.csproj
file.Actual behavior
An error during
dotnet pack
:C:\Program Files\dotnet\sdk\2.1.4\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(204,5): error : Value cannot be null or an empty string. [...\TestAssembly.csproj]
C:\Program Files\dotnet\sdk\2.1.4\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(204,5): error : Parameter name: value [...\TestAssembly.csproj]
Environment data
dotnet --info
output:.NET Command Line Tools (2.1.4)
Product Information:
Version: 2.1.4
Commit SHA-1 hash: 5e8add2190
Runtime Environment:
OS Name: Windows
OS Version: 10.0.16299
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.4\
Microsoft .NET Core Shared Framework Host
Version : 2.0.5
Build : 17373eb129b3b05aa18ece963f8795d65ef8ea54
Copied from original issue: dotnet/cli#8717
The text was updated successfully, but these errors were encountered: