开发者

Generate Nuget Command Automatically?

开发者 https://www.devze.com 2023-03-08 18:29 出处:网络
I\'ve recently k开发者_JAVA技巧nown NuGet and MVCScaffolding , So I think it\'s really good to write a custom scaffolding package for my company to generate some template code,

I've recently k开发者_JAVA技巧nown 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 ?? ...


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号