visual-studiovariablesdebuggingmsbuild

The value of the Visual Studio IDE setting variables


How to "echo" and know the value of the Visual Studio IDE setting variables ( ie. with $() )
e.g. $(WindowsSDK_IncludePath)

How to know what it's


Solution

  • If you want to see the currently available macros, for example you can go to Project Properties for a C++ project.

    Right click project->Properties->Configuration Properties->VC++ Directories->Include Directories->Edit->Macros, type $(WindowsSDK_IncludePath)and you will see it's value.

    enter image description here

    Besides, you can also echo the value of the Visual Studio IDE setting variables in via MSBuild Task. Add the following to your project file:

     <Target Name="Test">
         <Message Text="WindowsSDK_IncludePath value:$(WindowsSDK_IncludePath)" />
      </Target>
    

    Test Result: enter image description here

    Docs Referred:

    View the current properties and macros