有没有办法用 nuspec 指定 Build Action=None ?
我的公司有一个程序集版本控制包,是我用 powershell 编写的,并通过我们的内部 nuget feed 分发给我的同事。
有几个模板文件,用户可以在安装软件包后对其进行修改。这些文件包含在我们通过我们生成的包中。
nuget pack xxxx.csproj
我们做了一些调查,当我们将 Build Action
更改为 None
时,这些文件不会被打包。
有没有办法告诉 nuspec 将文件添加到项目中,并将 Build Action
设置为 None
*?
或者有没有办法告诉 nuget pack 不要在生成的包中包含某些文件?
My company has an assembly versioning package that I've written in powershell and is distributed amongst my colleagues via our internal nuget feed.
There are a couple of template files which can be user-modified after the package in installed. These files are being included in the package which we generate via
nuget pack xxxx.csproj
We've done a little investigation and there files are not packaged when we change the Build Action
to None
.
Is there a way to tell nuspec to add the files to the project with Build Action
set to None
*?
Alternatively is there a way to tell nuget pack
to not include certain files in the package in generates?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
更多信息请点击这里:
http://docs.nuget.org/docs /creating-packages/creating-and-publishing-a-package#From_a_project
http://docs.nuget.org/docs/reference/command-line -参考#Pack_Command
More information here:
http://docs.nuget.org/docs/creating-packages/creating-and-publishing-a-package#From_a_project
http://docs.nuget.org/docs/reference/command-line-reference#Pack_Command
nuget pack
将忽略以句点/句号开头的任何文件或文件夹。因此,一种简单的方法是重命名模板文件或它们所在的文件夹,如果可能的话,以句点/句号开头。nuget pack
will ignore any files or folders that start with period/full stop. So one easy way would be to rename your template files or the folder they are located in to start with a period/full stop if possible.