Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When creating a NuGet package, can I modify existing source code files?

I'm trying to create a series of NuGet packages for local use within my organization.

I'm aware I can create source-code transformation files (i.e. MyModel.cs.pp) to help with adding new source code files, i.e.:

namespace $rootnamespace$.Models {
    public struct CategoryInfo {
        public string categoryid;
        public string description;
    }
}

But what if I want to modify an existing source-code file? Is there any way to do this? Perhaps using PowerShell?

like image 549
Pandincus Avatar asked Dec 07 '25 09:12

Pandincus


1 Answers

You can do this using CodeModel http://msdn.microsoft.com/en-us/library/envdte.codemodel.aspx.

like image 59
davidfowl Avatar answered Dec 12 '25 05:12

davidfowl



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!