NuGet Pack - Different Problems Packing Against nuspec or csproj

╄→尐↘猪︶ㄣ 提交于 2019-12-02 10:58:44

I was able to achieve using the $version$ variable and having the dependent assemblies included in the package. What did it was including this in the nuspec file:

<files>
  <file src=".\*.*" target="content" />
</files>

So basically everything in bin\release ends up in the content folder in the package. I'm not sure if the content folder is the right spot, but at least it's there. I can change the target later, if needed.

Summary:
- TeamCity builds against the csproj file
- The nuspec file has $version$, and it gets updated
- The nuspec file specifies the files to include (see above)

The right way to go here would be to pack against a csproj but have a corresponding nuspec file present with $version$ token for the Version nuspec metadata. NuGet would prefer metadata values from nuspec , and if they are tokens which are not passed through , it will look at assembly metadata to substitute it appropriately.

That said, if you find this is not the expected behavior, please file an issue at https://github.com/nuget/home/issues and the NuGet team will be happy to help you solve your issue.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!