问题描述
我在 Startup.cs
文件中添加了几行代码.如何在 NuGet 包中仅包含该更改?我当然不想包含整个 Startup.cs
,因为它会执行覆盖.
I have added a few lines of code into the Startup.cs
file. How can I include only that change in the NuGet package? I certainly don't want to include the whole Startup.cs
, for, it will perform an overwrite.
推荐答案
目前 NuGet 不支持此方案,不会覆盖现有的 startup.cs 文件.
Right now NuGet does not support this scenario, without overwriting the existing startup.cs file.
NuGet 确实支持使用 http://msdn.microsoft 语法转换 XML 文件.com/en-us/library/dd465326.aspx.
NuGet does support transforming XML files with syntax of http://msdn.microsoft.com/en-us/library/dd465326.aspx though.
如果这不能解决您的需求,请在 nuget.codeplex.com 上打开一个问题作为功能请求.
Please open an issue on nuget.codeplex.com as a feature request if this does not solve your need.
这篇关于如何向 NuGet 包中的现有文件添加几行代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!