3

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?

1

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

2 Comments

Can you point us at a simple example that uses the Code Model from within a NuGet package?
@Simon Gill It's not pretty:- stackoverflow.com/a/13255356/11635 I used the related answer I cited on the question

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.