In MSBuild is it possible to determine if I'm running in Visual Studio

后端 未结 4 1285
情话喂你
情话喂你 2021-02-05 01:36

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.

4条回答
  •  失恋的感觉
    2021-02-05 02:26

    To directly address the question in your title - if you just want to know if you are being built from VS or not, check the value of IsDesktopBuild which will return true or false appropriately.

提交回复
热议问题