Share via


How can I disable Live Code Analysis in VS 2019 16.1.4?

Question

Wednesday, June 26, 2019 5:28 PM

Hi VS experts,

my problem: Live Code Analysis slows VS 2019 extremely down. The solution has 29 projects (c#, .NET 4.7.1). 30% processor usage for minutes after just typing one new character. This is not usable anymore. I went back to VS 2017.

So how can I disable the Live Code Analysis in VS 2019, till the bug is fixed?

Thanks a lot!

Greetings Ulrich

All replies (3)

Wednesday, June 26, 2019 9:38 PM ✅Answered | 1 vote

There seems to be an on/off bug

https://developercommunity.visualstudio.com/content/problem/532880/live-code-analysis-slow.html

Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

NuGet BaseConnectionLibrary for database connections.

StackOverFlow


Thursday, June 27, 2019 3:17 AM ✅Answered | 1 vote

Hi Ulrich Schumacher,

For your requirement, I'm afraid that the answer is negative. As far as I know, we have no such function in visual studio. But you could reduce some features which is associated with code analysis.

## Open Tools/ Options/ Text Editor/ C#/ Advanced, disable the options in Analysis group

## right-click project then open Properties, select the code analysis tab, disable "enable code analysis on build", and under ruleset group, you could also create a null rule for your solution.

BTW, you could vote the link from Kareninstructor. If it gets more votes, the product team experts would improve it or think about adding a new feature to disable it in the future product. 

Best Regards,

Dylan

MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected]


Thursday, June 27, 2019 5:50 PM

Thanks a lot Karen and Dylan!

The "Enable Code Analysis on Build" checkbox was not set in my projects.

After I've disabled the rules of ONE of the 29 projects in our solution, LCA is now much faster. From 1:20 to 5 seconds after each keystroke!

It is a class library that is referenced by many projects but this effect is hard to understand...

It is still a bug I think but now I can use VS 2019 again.

Have a nice day, you made mine :-)

Ulrich