MSBuild multiple dll in a single NuGet package

前端 未结 4 1094
清歌不尽
清歌不尽 2020-12-15 10:11

I have a Visual Studio 2017 solution that contains two projects:

Foo.csproj
Foo.Core.csproj

Both of these projects target multiple framewor

4条回答
  •  醉梦人生
    2020-12-15 10:38

    I have recently discovered that you CANNOT set defaults for the Nuspec Properties you want to replace in the msbuild command line e.g. if a metadata value is set in the .csproj file of "2.0.0" and you run:

    msbuild myproject.csproj -t:pack -p:Configuration=Release -p:NuspecProperties=Configuration=Release;PackageVersion=1.2.3
    

    Your .nupgk file will have the version 2.0.0 still. Annoyingly the MS documentation is not clear on this and no error is displayed.

提交回复
热议问题