Defining additional conditional compilation characters via devenv to solve C #

I am trying to pass an extra conditional compilation symbol through devenv (vs2010) on the command line to a C # compiler.

I know that this can be done for the C ++ compiler via environment variables. Is there something similar for C #?

Since this build run should run Code Analysis, I'm stuck using devenv to run the build, as far as I know.

+3
source share
2 answers

You cannot specify compilation characters using the command line on devenv.exe, but you can create a separate solution configuration and access it on the command line:

devenv.exe SolutionName /build SolnConfigName 
+1

" ", , vs2008, , vs2010 wilkl .

0

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


All Articles