开发者

Add autogenerated C# file into solution

开发者 https://www.devze.com 2023-03-08 04:24 出处:网络
In C++ I can autogenerate some classes and then modify an empty cpp file to #include \"myautoclass.cpp\"

In C++ I can autogenerate some classes and then modify an empty cpp file to

 #include "myautoclass.cpp"
开发者_开发技巧

in the prebuild step and these classes will be compiled and linked. Is there a way to do this in C# in a prebuild step? I'm on VS2010. Thanks.


One way of generating classes (and any other files) is by using T4 templates.

An excellent set of tutorials can be found here.

0

精彩评论

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