3 Answer(s)
-
0
It also takes an insanely long time to build the project with the latest version. V13.1 took ~10-20 seconds.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi @ajayak
Thank you for reporting this. We have tried to reproduce this on different machines with the latest version of an ASP.NET Zero project, but we did not observe the same high resource consumption you're experiencing. This suggests the issue might be related to your specific environment, the size of your customized solution, or cached files from the migration.
The solutions below are highly effective for resolving this kind of performance problem. <br/> <br/> This is the most effective solution to immediately reduce high CPU and memory usage caused by
ServiceHub.RoslynCodeAnalysisService.exe. The problem is that Visual Studio is trying to analyze your entire solution in real-time. By changing this setting, you tell it to only analyze the files you currently have open.- In Visual Studio, go to the top menu and click Tools > Options.
- In the new window, navigate to Text Editor > C# > Advanced.
- Scroll down to the Analysis section.
- Uncheck the box for Enable full solution analysis.
After applying this change, restart Visual Studio. You should see a significant drop in memory and CPU consumption. <br/> <br/> Corrupted or outdated cache files from the previous version can cause performance bottlenecks and strange behavior after a migration. Clearing them forces Visual Studio to create fresh ones.
a) Delete the
.vsfolder:- Close Visual Studio completely.
- Open your project's root folder in File Explorer.
- Find the hidden
.vsfolder. (If you can't see it, enable "Show hidden items" in File Explorer's "View" tab). - Delete the entire
.vsfolder. Visual Studio will regenerate it the next time you open the solution.
b) Clear the Component Model Cache:
- Close Visual Studio.
- Press
Win + Rto open the "Run" dialog. - Type the following path and press Enter:
%LOCALAPPDATA%\Microsoft\VisualStudio\ - Open the folder corresponding to your Visual Studio version (e.g.,
17.0_...for VS 2022). - Find and delete the folder named
ComponentModelCache.
Applying these two solutions will resolve the vast majority of performance issues related to the Roslyn analysis service after a project upgrade.
If the problem persists, please do not hesitate to contact me.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
The issue was caused by too many ef migrations. Deleting old migrations fixed the memory issue
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)

