1

I've recently known NuGet and MVCScaffolding ,

So I think it's really good to write a custom scaffolding package for my company to generate some template code,

Then I did it , and It works great,

But in some cases I need a code generator that generate my code Automatically (like custom tool that can generate some code automatically)

I mean I don't want to force users to run command when they change their class,

As I mentioned previously I can do that by a Custom Tool but I want do all of that generation via a single path

Do you think there is any solution to run nuget command from a custom tool or

I don't know any way to runs nuget commands automatically ...

or any other ideas ?? ...

hm1984ir
  • 554
  • 3
  • 7

1 Answers1

0

T4 Templates might help. They let you create a ".tt" file, that when changed, will rebuild a code file.

There are a few different ways of using them ("Text Template" vs "Preprocessed Text Template"), but you can probably do what you need. By default, VS doesn't give any intellisense/syntax highlighting for them, but there are some VS addins that do that.

Danny Tuppeny
  • 40,147
  • 24
  • 151
  • 275