使用Nuget打包源代码
我已经成功创建了一个 Nuget 包,其中包含已编译的 DLL 和未编译的内容,例如图像、样式等。
控制器、帮助器、资源和其他代码已编译。当只需要编译的 DLL 和公共内容时,这个包对于分发很有用,但我也想要一个包含所有内容的完整源代码的包。
我阅读了 命令行参考 但没有找到这样的选项(不过可能错过了) 。
如何打包源文件(.cs)?
I've successfully created a Nuget package which contains the compiled DLL and uncompiled content such as images, styles, etc.
Controllers, helpers, resources and other code has been compiled. This package is useful for distribution when only the compiled DLL and public stuff is required but I also want to have a package that would contain a whole source of everything.
I read the command line reference but did not find such an option (might have missed it though).
How can I package source files (.cs)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这应该可以引导其他想要使用 Nuget 重用源代码文件的人走向正确的方向:
http://blogs.clariusconsulting.net/kzu/how-to-create-lightweight-reusable-source-code-with-nuget/
This should guide anyone else who finds himself wanting to use Nuget to reuse the source code files into the right direction:
http://blogs.clariusconsulting.net/kzu/how-to-create-lightweight-reusable-source-code-with-nuget/
在原始项目(将成为包)中,将 .cs 文件重命名为 .cs.pp。
In the original project (which will be the package) rename the .cs files to .cs.pp.