1

Affects: Visual C++ in Visual Studio 2015

When I start a build on my project in the VS-Solution it compiles all the project's source files. If I do it again and I have nothing changed, the build is up to date. But if I build from console like:

msbuild c:\path\to\my\project\my-project.vcxproj /t:build /p:configuration=Debug /p:Platform=Win32 /p:VisualStudioVersion=14.0.25425.01

... the sources will be compiled again. (By building again in console, the build is up to date, too. On building after a console-build in VS, the build compiles all the project's source files.)

I noticed that my VS-Version (14.0.25425.01) differs from the showing console output (14.0.25420.1), so I added the /p:VisualStudioVersion=14.0.25425.01-Parameter. But this did nothing (even the console's output is still to Microsoft (R)-Buildmodul, Version 14.0.25420.1). Maybe this can be the problem? But if, How do i fix it?

I also noticed via the Windows TaskManager, that the MSBuild.exe-Runtime started by Visual Studio will be active until VS is exited. (In my console, the MSBuild.exe-runtime ends, when the build has finished.)

Another curious thing i've noticed is, that in my console sometimes MSBuild.exe is started from C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE (as always from Visual Studio) and sometimes MSBuild.exe is started from C:\Program Files (x86)\MSBuild\14.0\Bin. By comparing those files, they're identical.

D. Walz
  • 75
  • 7
  • Use the /verbosity:detailed option to find out why it decided to rebuild. – Hans Passant Apr 03 '17 at 14:12
  • Uuhh.... TMI... I noticed at the first difference at the target `CustomBuild` the line `Forcing rebuild of all source files due to a change in the command line since the last build.` (and then some uic'ing and moc'ing from Qt-Custom-Build-Steps begin to work) even though the previous output says `All files are up to date`. – D. Walz Apr 04 '17 at 08:48
  • I've found Issue [link](http://stackoverflow.com/questions/28888014/visual-studio-custom-build-event-always-executing) and added manually the output file to _Additional Dependencies_ from the build step with no effect. – D. Walz Apr 04 '17 at 09:39

0 Answers0