Quantcast
Channel: MSBuild forum
Viewing all articles
Browse latest Browse all 2763

Ho to pass additional conditional compilation symbols on msbuild commandline

$
0
0
Hi,
 
I want to add some conditional compilation symbols when invoking msbuild to a solution file.
I tried to use msbuild /p:DefineConstants:MY_DEFINE file.sln, but the problem is that instead of adding MY_DEFINE to the existing list, it replaces it, so if a specific project in the solution has a conditional compilation symbol set, it stops being defined.

When invoking csc directly I can do this easily by passing /D. Isn't there any way to do this in msbuild (whithout requiring to change the individual .csproj's)?

Best Regards,
Gustavo Guerra

Viewing all articles
Browse latest Browse all 2763

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>