Reasons for C# projects to rebuild in Visual Studio

前端 未结 5 976
野趣味
野趣味 2021-02-09 05:17

I have a large solution, of some 320 projects, where even small changes to a single web form result in long build times to test/debug a small change. I suspect post-build file

5条回答
  •  面向向阳花
    2021-02-09 05:44

    320 Projects is a lot of files in the dependency tree: all need to be checked for changes by the build engine. Using something like Process Monitor will allow you to see what file operations are going on to confirm this.

    Also 320 assemblies (on top of the .NET framework assemblies) to load at run time will slow your application down, and really slow the debugger (a lot of symbols to load). Look at the Debug | Windows | Modules to see the modules loaded).

    As well as reducing the number of projects in the solution (it is quite possible to have multiple solutions each with a subset of the projects) do you really need that many separate projects? Outside the debugger the .NET loader only loads and JITs the code from assemblies as it is needed, larger assemblies don't mean slower load time and avoid the per assembly overheads from the Windows loader.

提交回复
热议问题