How does Visual Studio know my project is up to date so it can skip running MSBuild?

前端 未结 4 1404
青春惊慌失措
青春惊慌失措 2020-12-16 23:39

I have a custom MSBuild target included in my C++ project that produces a data file in the $(OutDir) folder for each item of a given item type. I have the item type hooked u

4条回答
  •  我在风中等你
    2020-12-17 00:29

    You can find out why a project is being rebuilt by enabling the verbosity of the fast up to date checker in the registry key:

    New-ItemProperty              `
     -Name U2DCheckVerbosity      `
     -PropertyType DWORD -Value 1 `
     -Path HKCU:\Software\Microsoft\VisualStudio\14.0\General -Force
    

    You should be able to see in the build log messages like

    Project 'Caliburn.Micro.Silverlight.Extensions' is not up to date. Project item 'C:\dev\projects\Caliburn.Micro.Silverlight.Extensions\NavigationBootstrapperSample.cs.pp' has 'Copy to Output Directory' attribute set to 'Copy always'.

    [1] https://blogs.msdn.microsoft.com/kirillosenkov/2014/08/04/how-to-investigate-rebuilding-in-visual-studio-when-nothing-has-changed/

提交回复
热议问题