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.
will give you the version of MSBuild that is running the build process.
Note that in VS 2010 the build process might be targeting either .Net 4.0 or 3.5 You need to consider carefully if your conditional compilation depends on the msbuild version itself or on the target framework of the build and the tools the build is using. If your condition is based on the target framework, use
.
Of course, if your build also might be run under VS 2008, you need to support proper fallback if
is missing.