Is there a way to export all the Visual Studio Macro variables

418 views Asked by At

Is there a way to export all the Visual Studio Macro Variables? I need to compare what macro variable affect after common configuration file (*.props) changed.

enter image description here

2

There are 2 answers

0
James McNellis On

Build your project with /verbosity:diagnostic. The resulting build log will include listings of all of the MSBuild Properties and Items at various points during the build. You can enable diagnostic verbosity by...

  • Changing the logging verbosity in the IDE. Under Tools => Options, go to Projects and Solutions => Build and Run and change the MSBuild project build log file verbosity and change it to Diagnostic, or

  • Build your project on the command line using msbuild /verbosity:diagnostic myproject.vcxproj.

(Detailed verbosity may also include the Property and Item listings; I'm not 100% sure; I always use Diagnostic verbosity when I need to do this. I like to get as much data as I can get.)

1
p.i.g. On

It's a pretty ugly solution but if you just want to compare a before/after state of the macros maybe it will be good for you.

Select the project which you want to analyze. In the Visual Studio main menu go to the

Tools => Visual Studio Command Prompt

If you don't have this menu item then read this.

  1. Run the command prompt.
  2. From the command prompt call set.
  3. Copy the results into a .txt file.

Do this before and after the *.props file modification and then compare the files.