Using Visual Studio 2005, I have been having an issue where devenv behaves differently than the GUI IDE, even when calling VCvarsall.bat and using the /useenv switch to devenv. Something is getting called that is creating a bunch of files, even when I only run clean on this project (when I use the GUI, I need devenv to behave the same way). The only thing I can find which might be the cause is the preprocessor macros. There is no prebuild or prelink event, only a post build event which doesn't seem to be the cause for these files being created. I am new to VS and not a programmer, and this is not my project. I am simply responsible for automating it via the CLI. Please excuse my ignorance and assist me.
TL;DR How do I ensure that devenv does exactly the same thing as the GUI when I run /rebuild? How do I ensure that Devenv uses the preprocessor Macros that are defined in the project?
They are different animals probably always have been and the rumor is they aren't in VS2013, but I'll believe that when I see it.
The pre-processor macros do run from both. Check the conditions in your .*proj file that determine if
<DefineConstants>DEBUG;TRACE</DefineConstants>
matches your expectations of what preprocessor conditions would be.run your build both in VS and in msbuild with
/v:diag
and look for differences in the the DefineConstants property. to make VS do that level of logging it is in Tools Menu -> Options -> Projects and Solutions -> Build and Run -> MSBuild project build output verbosity.