Are the any MSBuild properties that Visual Studio sets? I\'m looking to have some conditional behavior depending on the version (if any) of visual studio.
The property value you should be using is BuildingInsideVisualStudio
, when you are building inside of Visual Studio this property will be set to true. Since ProductVersion
is declared in the project file you cannot use it because it will have the same value whether building inside of VS or via msbuild.exe.
Foo
Bar