How to automatically include generated source files in a C # project in Visual Studio?

I have a situation where I need to create a bunch of C # code files at the stage of preliminary assembly of the project and include the generated files in the current project for compilation. Is there a way to do this cleanly without resorting to the project file every time a pre-build step is performed?

My solution should work for both IDE-based builds and Team Builds based on MSBuild. Since both are based on MSBuild, I suspect there won't be much difference; but wanted to call him.

Any help is much appreciated, thanks!

+3
source share
2 answers

- Custom Tool, , Linq 2 SQL dbml MSLinqToSQLGenerator. , MSBuild.

Visual Studio

+2

. , , , , .

, , ; , . .

-1

Source: https://habr.com/ru/post/1744401/


All Articles