Blaise
Blaise

Reputation: 22212

How to add a few lines of code to an existing file in my NuGet package?

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.

Upvotes: 6

Views: 663

Answers (1)

Dan Liu
Dan Liu

Reputation: 827

Right now NuGet does not support this scenario, without overwriting the existing startup.cs file.

NuGet does support transforming XML files with syntax of http://msdn.microsoft.com/en-us/library/dd465326.aspx though.

Please open an issue on nuget.codeplex.com as a feature request if this does not solve your need.

Upvotes: 3

Related Questions