简体   繁体   English

使用NuGet.targets创建Nuget包

[英]Using NuGet.targets to create Nuget packages

I have a C# project that uses Nuget for package management. 我有一个使用Nuget进行程序包管理的C#项目。 I enabled package restore so it created the .nuget folder. 我启用了包还原,因此它创建了.nuget文件夹。 Then I want to create a Nuget package of this project. 然后,我想创建该项目的Nuget包。 Can I create nuget .nuspec files in the .nuget folder and modify the Nuget.targets file to allow the creation of the package and upload to the galery when I'm in release mode? 我可以在.nuget文件夹中创建nuget .nuspec文件并修改Nuget.targets文件以允许创建程序包并在发布模式下上载到Nuget.targets吗?

Thanks. 谢谢。

You can do that. 你可以做到的。 Alternatively you can use nuget.exe pack command in the post build event ( more details @ http://docs.nuget.org/docs/reference/command-line-reference#Pack_Command ) or use true in the csproj file. 或者,您可以在构建后事件中使用nuget.exe pack命令(更多详细信息,请参见http://docs.nuget.org/docs/reference/command-line-reference#Pack_Command ),或者在csproj文件中使用true。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM