mono / monodevelop

MonoDevelop is a cross platform .NET IDE
http://www.monodevelop.com
2.84k stars 1.02k forks source link

[Ide] Type system updates file information less often #9423

Closed mrward closed 4 years ago

mrward commented 4 years ago

With a project that uses the DevExpress.Blazor NuGet package the IDE would get stuck running MSBuild design time builds repeatedly. Every MSBuild target that was run would trigger the DevExpress UpdateStatic MSBuild target to run. This UpdateStatic target would delete and create javascript files in the project. This then triggered the 'Files' project modified event to fire. The type system then re-ran the design time builds again since it uses this event as a trigger. This then resulted in the design time builds being run repeatedly. The status bar would repeatedly show messages, usually Saving, but sometimes some version control messages.

To avoid this repeated calling of the MSBuild design time targets the project now has a new CoreCompileFiles modified event which only fires for a small subset of build actions - Compile, AdditionalFiles, Analyzer and EditorConfigFiles. These build actions are the only ones the type system is interested in so there is no need to re-run a design time build to get the list of source files if files with different build actions are added. This prevents the problem with the dev express build targets since it adds/removes javascript files which are not needed by the type system.

Fixes VSTS #1030001 - Stuck in constant loop of Saving -> Checkout of files after building a solution.

mrward commented 4 years ago

@monojenkins backport release-8.4

slluis commented 4 years ago

Some tests have to be adapted to the change.

mrward commented 4 years ago

@monojenkins backport release-8.4

mrward commented 4 years ago

@monojenkins backport release-8.4