Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

nuget

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.

like image 212
Blaise Avatar asked Nov 27 '13 18:11

Blaise


1 Answers

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.

like image 164
Dan Liu Avatar answered Dec 03 '22 12:12

Dan Liu