Do not compile t4 file

Suddenly, after running the TFS 2010 get, Visual Studio 2010 tries to compile my .tt file as if it were C #.

Also, anytime I set it to "Build Action = None", the Build Action becomes a mysterious reset for compilation. This destroys our builds on the desktop. I can build assemblies to work on the desktop by closing them and then opening VS again.

Our builds on TFS are completely broken because of this. What to do?

The template creates a (completely ok) C # file, so I need a project to build.

I tried changing the file extension from .tt to .donotbuild, but this did not affect.

+4
source share
1 answer

Do you happen to use the Clairus T4 plugin (or another T4 intellisense provider)?

If so, try to make sure the files do not open when changing the BuildAction settings.

Visual Studio builds intellisense based on the compilation action of your files. It will provide intellisense for files marked as โ€œcompileโ€. Because of this, we change the assembly action when the file is open, and we change it to whatever it was before when checking in, closing the file, closing Visual Studio, and also when opening Visual Studio (if it crashed)

See: http://forums.clariusconsulting.net/viewtopic.php?f=12&t=445

+10
source

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


All Articles