After some changes to my project, Visual Studio started to always re-compiles all sources, causing all dependent project to also re-compile, slowing down development considerably. Why is that?
- Happens only when
XML documentation file
is checked and there's some file withCopy always
. If you change either of these, the sources don't get re-compiled. - Happens only when compiling inside Visual Studio - when compiling using
MSBuild
from commandline, the sources don't get re-compiled. - Visual Studio 2012 Update 4.
This appears to be a bug in Visual Studio, when project has
XML documentation file
checked some files withCopy always
.Repro:
XML documentation file
TextFile1.txt
Copy to Output Directory
toCopy always
Expected: Project shouldn't be built, build output should say:
Actual: Project is build, output is:
Intestigation: Turning on detailed log, you see:
Looking in procmon, you see that devenv.exe renames "ClassLibrary1.XML" into "vsA381.tmp" just before MSBuild.exe runs. Stack trace for the rename: