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 fileis 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
MSBuildfrom 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 filechecked some files withCopy always.Repro:
XML documentation fileTextFile1.txtCopy to Output DirectorytoCopy alwaysExpected: 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: