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.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The property value you should be using is
BuildingInsideVisualStudio, when you are building inside of Visual Studio this property will be set to true. SinceProductVersionis 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.