Version Used: 2.6.0.6232903
Visual Studio 2017 marks Bar()
with red squiggle before project is built:
Is it possible to alter this behavior to show errors only after manually triggered build?
In Error List I see that the error message is produced by IntelliSense. I tried to disable full solution analysis in Text Editor options, set HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\Roslyn\Internal\OnOff\Features\Squiggles
registry to 0
, alter analyzer Active Rule Set.
For more information see Disable 'Show live semantic errors' for C# in Visual Studio 2017 and How to disable real time compilation in Visual Studio 2015 discussions on Stack Overflow.
💠This may be a case where the feature was so infrequently used that it became prone to higher rates of regression bugs between releases (lack of use meant bugs in the behavior were not detected).
/cc @kuhlenh
Disabling full solution analysis does not disable analysis in the current file. In between VS 2013 and VS 2015 we removed the option to disable design-time analysis. Sounds like this is a request to bring that feature back.
I do not find syntax error squiggles that distracting because most of the time I pay attention to them only after I finish writing particular code snippet. But I can see where Stack Overflow OP is coming from. For experienced developer live error squiggles may look like false positives.
Is it correct that you can't disable design-time analysis using registry key? Can you do that using Language Service and Editor Extensions?
Is it correct that you can't disable design-time analysis using registry key? Can you do that using Language Service and Editor Extensions?
There is no way to disable analysis today.
:link: I marked Bc42024 Visual Basic and VB.NET unused local variable as a duplicate of this issue.
that is the worst issue with each new version of VS. the shitload of useless features that CANNOT be disabled. Your roslyn "experimantal" shit should be in the core, which is now an extension whilest a lot of "core components" like code analysis should be extensions. WHY DO YOU INSIS ON TAKING FEATURES FROM RESHARPER AND IMPLEMENTING THEM IN THE MOST CRAPPY WAY YOU CAN THINK OF??? is there a contest amongs your developers to create the most crappy version or something??? The fact that all your shit reaches us as end users means that your developers are aither too stupid to use VS themselves or to braindead to do their job propertly. I'M TIRED OF WASTING A SHITLOAD OF TIME WAITING FOR YOUR SHIT SOLUTION TO RESPOND AGAIN. A GENERATED file is a little too bijg and your shit hangs. even all your code generation tools keep on insisting to crap all out in a single file BY DEFAULT. How dumb can you be???
Thank god it's almost Haloween so your abominations become enjoyable, sarcasticaly speaking
@d4e666 Would you be willing to collect some perf traces to help get to the bottom of any slowdowns you're seeing? Thanks!
As long as this does not interfere wothbmy active development sure. Beware: I have resharper installed and am not planning on remmoving it no pattervwhat your suggestions point out. The main reason for me is the fact that there are a lot of features I do not use (like code lens) and many "live detection" features like test code detection and find thztvthis does NOT belong in the code base but should be a plugin like most other features. The only thiby thatvshould remain are debugging and performance measurements due to the time factor. All other features should be extensions. You can then even make these payable for express users. I don't like to pay for the 1 feature I do use whilst there are 10 I never use.
Kind regards
-------- Oorspronkelijk bericht --------
Van: CyrusNajmabadi notifications@github.com
Datum: 17/10/18 19:29 (GMT+01:00)
Aan: dotnet/roslyn roslyn@noreply.github.com
Cc: d4e666 wesley.kenis@outlook.com, Mention mention@noreply.github.com
Onderwerp: Re: [dotnet/roslyn] How to disable live code compilation/analysis in Visual Studio 2017? (#24513)
@d4e666https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fd4e666&data=02%7C01%7C%7Cada81f8167d942bc0e6708d634560c1f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636753941506895247&sdata=%2FqJ4vEdTzl5KgJPs4cdeN%2FuupYG0Xn5E8hOYqEn4Y6I%3D&reserved=0 Would you be willing to collect some perf traces to help get to the bottom of any slowdowns you're seeing? Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdotnet%2Froslyn%2Fissues%2F24513%23issuecomment-430717309&data=02%7C01%7C%7Cada81f8167d942bc0e6708d634560c1f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636753941506895247&sdata=xOWkt33iBdWLD1jrZSCjQsYvaRbb1AoaToF5nqKS66g%3D&reserved=0, or mute the threadhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAHkbl9tIQpSPV71lmr4NZdSe1ZjzHcznks5ul2jlgaJpZM4Rwr3o&data=02%7C01%7C%7Cada81f8167d942bc0e6708d634560c1f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636753941506895247&sdata=9jTCD6pBjZbyXajLBv063KluVIABY5Wve9dxQIwQljM%3D&reserved=0.
As long as this does not interfere wothbmy active development sure
here is the guidance for getting a perf trace.
there are a lot of features I do not use
Under Tools -> Options you can disable CodeLens
Not a complete solution but hopefully it can get rid of some of the clutter for you.
@d4e666 Here are the instructions on collecting and reporting perf issues: https://github.com/dotnet/roslyn/wiki/Reporting-Visual-Studio-crashes-and-performance-issues
This would be very helpful in terms of determining what is the root cause of the problem. Thanks!
and many "live detection" features like test code detection
'test code detection' can be disabled here:
and find thztvthis
Sorry... this is garbled. I don't know what this is referring to.
I don't like to pay for the 1 feature I do use whilst there are 10 I never use.
In general, the features which are costly can be disabled. If performance tracing reveals something that is an issue, but can't be disabled, we can add options for it. But without tracing, there's no way to know what the root cause is. For example, you mentioned you didn't like experiences pauses. However, there is no way to know (without a trace) what is causing that pause. It may be something in Roslyn. It may be something in Resharper. It may be something in some other extension you're using. If any of those end up using the UI thread in an inappropriate manner, you may experience pauses. We'll need the tracing data to know what's up.
Thanks!
@d4e666 your comment was hidden as it violates our code of conduct. Please keep future contributions in line with the COC or we may have to consider banning your account from this organization.
The go ahead and remove my account as you don't care about frustrated users that reveal the REAL issues with your organization. You are just as retarded as trump "we don't like your text so we just ban you instead of solving it". As soon as I can have a proper alternative for vs I'm gone since there are issued on your list that have been coming back FIR YEARS IN A ROW and you simply don't WANT to solve because new crappy features take priority. Good riddance I would say.
Farewell from a REAL devoted. Net developer
-------- Oorspronkelijk bericht --------
Van: Jared Parsons notifications@github.com
Datum: 17/10/18 22:06 (GMT+01:00)
Aan: dotnet/roslyn roslyn@noreply.github.com
Cc: d4e666 wesley.kenis@outlook.com, Mention mention@noreply.github.com
Onderwerp: Re: [dotnet/roslyn] How to disable live code compilation/analysis in Visual Studio 2017? (#24513)
@d4e666https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fd4e666&data=02%7C01%7C%7C30abed8235144cb8ec3608d6346c1532%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636754036141368936&sdata=Prvb%2BAT8FwaqHXxBRvi%2Fn1KHDGYFVjV4mLwBEQnZAOo%3D&reserved=0 your comment was hidden as it violates our code of conduct. Please keep future contributions in line with the COC or we may have to consider banning your account from this organization.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdotnet%2Froslyn%2Fissues%2F24513%23issuecomment-430769343&data=02%7C01%7C%7C30abed8235144cb8ec3608d6346c1532%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636754036141368936&sdata=mIFcGPtpsQzUAjuCZ3FqXUzarhXT43YBKNNHRqlWH8E%3D&reserved=0, or mute the threadhttps://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAHkbl1cOgYIMwxUGGej5kJkBaqUhfhY6ks5ul43cgaJpZM4Rwr3o&data=02%7C01%7C%7C30abed8235144cb8ec3608d6346c1532%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636754036141368936&sdata=f1dKngm1qeyJvaHEX69eHexwP2gwY5vKTlmmwfUKrDs%3D&reserved=0.
@d4e666 Here are the instructions on collecting and reporting perf issues: https://github.com/dotnet/roslyn/wiki/Reporting-Visual-Studio-crashes-and-performance-issues
This would be very helpful in terms of determining what is the root cause of the problem. Thanks!
@d4e666
Since you ignored the warning I've blocked your account. We all have passion and want to see the right thing happen, but insulting and yelling at us isn't a productive mode of discourse. If you have any concerns, please contact [email protected].
Hi,
I'm running Visual Studio 2017 on a 32GB/i7/win10 machine.
Words cannot describe the slowness and frustration.
On each and every code change, it hangs. I see that the live code analysis is running in the background.
Is there a way to disable the live code analysis?
Everything is off, beside the code analysis on build, but code analysis run in background when open/edit/save file (.cs) some times runs on a single file other times on all opened files.
Before, I had same setup on same machine Win10 64 + VS 2017 no problem, after reinstalling windows this issue appeared.
Found a workaround, Code Analysis still runs at any action on opened file but editor is quite faster.
Tools -> Options -> Text Editor -> C# (in my case) -> Advanced -> Perform editor feature analysis in external process (experimental)
Explained here: https://github.com/dotnet/roslyn/issues/26076
Another place that can cause slow code analysis might be included analyses from nuget packages.
I removed those AWSSDK analyzers.
Hi,
Is there perhaps an update on this issue?
Disabling the Live Analyzers seems to be pretty basic feature which is currently missing.
I'd appreciate an update as well. There's a number of questions about how to opt out of live code analysis on Stackoverflow and some frustration that it's not supported. On Google, the top searches triggered by typing "Visual Studio live code analysis" are
On Bing, the corresponding top searches are
I've had various exchanges with the Visual Studio team on a number of incarnations of this issue since 2006. While live analysis performance on VS 2017 was acceptable on the solutions I work with I'm finding it intrusive with the VS 2019 nugets, to the point where it interferes with fundamental operations like scrolling. There also seem to be problems with either thread leaks or infinite loops which require Visual Studio restarts to recover from in 16.1.3. These are particularly tedious as having the CPU pinned at 100% predictably makes VS slow to exit.
I like live code analysis and find it quite useful but, during its episodes of poor behavior, it's not a feature which adds value. As such it seems appropriate to offer some form of opt out. While Code Analysis is being deprecated, something I think it gets right is its ability to run the ruleset on demand and get out of the way the rest of the time. It seems like this is currently semi-supported in that one can make a .ruleset file with few or no analyzers, switch projects to reduced .rulesets to duck some of the compute cost, and switch the projects back later. This is awkward and doesn't appear to be getting discovered by users. It also has the less than ideal result of opting out of warning level issues while retaining the overhead for information level issues like changing "out Foo ignored" to "out Foo _". It'd be valuable to have a design which preferentially allowed opting out of live informationals but still caught the more significant coding time concerns (_e.g_. missing Dispose() calls and CurrentCulture/InvariantCulture risks).
VS has had a model somewhat like this for CodeLens for some time. Personally, I opt out of CodeLens completely as it's too much of a drag on UX responsiveness but use find all references as a pay as you need it alternative regularly. I wouldn't really want to do this with live analysis but it'd be great if there was a way quickly move an entire solution between live analyses levels to manage background compute costs.
There seems to be a lot of pain around this feature online doing a simple search.
Is it really difficult to just add a flag to just disable code analysis until roslyn is a bit more performant for those of us who wish to do so? For me, it kills my productivity with missed keystrokes and an unresponsive UI. A simple reg entry to turn it off would be appreciated!
Especially for the folks that use R# for productivity, Roslyn has a huge impact on general performance in VS. There are moments, where VS just hangs, mouse clicks take a second or two to get recognized, typing lags etc. (that's with Windows Defender already disabled). And it gets worse with every major version change.
I understand, that Roslyn is a needed feature for general VS users, but for Resharper users, Roslyn's analysis is just a nuisance, kills your productivity and brings nothing new to the table that Resharper doesn't at least provide as well.
Obviously, the VS team is well aware of the performance problems, because they implemented this nice little yellow info bar, that tells you every couple of seconds, that Resharper is to blame. The truth is though, that VS and Resharper worked fluently together until Roslyn came along.
That Roslyn and Resharper are now competing for resources is obvious and it should be left to the user, which refactoring platform to use.
So until Roslyn can fully replace Resharper, the option to disabling as much of Roslyn's analysis as possible, is a highly needed feature.
Is this on the agenda of the team, or can the pros and cons or possibilities be discussed here @CyrusNajmabadi @sharwell ?
@lauxjpn We work hard to fix all cases that get reported with traces that we can investigate. You can find the instructions here: https://aka.ms/reportPerf. Unfortunately, the number of different user configurations is almost unimaginatively gigantic, so there is no realistic way for us to confidently address your specific scenario without the additional information. Each release tends to behave like this:
Most people who move from the first category to the third category do so because they were able to capture the scenario in a way that allowed us to focus our investigation on it.
This issue is likely to be addressed as part of #38429.
I for one need to disable live code analysis not because it is slow (which it is) but rather because it is so annoying when VS complains about a missing return
statement before I have finished typing the function. It makes me miss good old VS 2008 that checked my code when I told it to.
It makes me miss good old VS 2008 that checked my code when I told it to.
vs2008 certainly checked many things in a live fashion. It didn't check more primarily due to limitations in the implementation which made narrow and incremental checking hard. But it would give live errors for all sorts of things :)
That said, i have no problem with an option to disable live editor squiggles. Either as a specific option, or as part of a larger "lightweight editing" mode. Tagging @mavasani for context as he's been looking into this.
Yes, we are actively planning for some top level option(s) or a more fine grained knob with multiple settings which would allow users to customize their preferred mode of operation and background analysis.
@mavasani Thanks!
This feature requested has been implemented for VS2019 16.5 release. Let me summarize a few things here for clarity.
Visual Studio executes a bunch of background analyses while you are editing source files in the editor. Some of this is required minimal analysis for acceptable IDE editing experience, some of this is to improve responsiveness for IDE features by proactively analyzing closed files in the solution and some of this is to enable additional rich functionality (such as IDE code style suggestions). Based on the functionality, the analyses can be bucketed as follows:
Run on live analysis
checkbox on that property page is a per-user option that gets written to a .csproj.user file and is also respected for built-in IDE analyzer execution. However, if the configuration is a repo preference instead of a personal user preference, you can configure this at a solution level Directory.Build.props with the MSBuild property RunAnalyzersDuringLiveAnalysis
.Run Code Analysis
command to perform on-demand analyzer execution from top level Build
menu or top level Analyze
menu or from the Analyze and Code Cleanup
menu by right clicking the project/solution node in solution explorer. Prior to VS2019 16.5, this was used to run legacy FxCop analysis, but this command now runs Roslyn analyzers.Combining the above features, users can choose any of their preferred code analysis workflows for analyzer execution OR configure scope for all the Roslyn based background analysis.
We will ensure that the above support is documented when VS2019 16.5 is released. We will look forward to any further feedback on code analysis configuration support once these features are available.
@mavasani I've downloaded VS 2019 Preview and I do not see the selected options. Will they be available in one of the future builds?
Thanks
@Mrsevic Yes, this is not yet available and will be first available in VS2019 16.5 Preview2, which is the next preview.
Thanks.
Most helpful comment
I'd appreciate an update as well. There's a number of questions about how to opt out of live code analysis on Stackoverflow and some frustration that it's not supported. On Google, the top searches triggered by typing "Visual Studio live code analysis" are
On Bing, the corresponding top searches are
I've had various exchanges with the Visual Studio team on a number of incarnations of this issue since 2006. While live analysis performance on VS 2017 was acceptable on the solutions I work with I'm finding it intrusive with the VS 2019 nugets, to the point where it interferes with fundamental operations like scrolling. There also seem to be problems with either thread leaks or infinite loops which require Visual Studio restarts to recover from in 16.1.3. These are particularly tedious as having the CPU pinned at 100% predictably makes VS slow to exit.
I like live code analysis and find it quite useful but, during its episodes of poor behavior, it's not a feature which adds value. As such it seems appropriate to offer some form of opt out. While Code Analysis is being deprecated, something I think it gets right is its ability to run the ruleset on demand and get out of the way the rest of the time. It seems like this is currently semi-supported in that one can make a .ruleset file with few or no analyzers, switch projects to reduced .rulesets to duck some of the compute cost, and switch the projects back later. This is awkward and doesn't appear to be getting discovered by users. It also has the less than ideal result of opting out of warning level issues while retaining the overhead for information level issues like changing "out Foo ignored" to "out Foo _". It'd be valuable to have a design which preferentially allowed opting out of live informationals but still caught the more significant coding time concerns (_e.g_. missing Dispose() calls and CurrentCulture/InvariantCulture risks).
VS has had a model somewhat like this for CodeLens for some time. Personally, I opt out of CodeLens completely as it's too much of a drag on UX responsiveness but use find all references as a pay as you need it alternative regularly. I wouldn't really want to do this with live analysis but it'd be great if there was a way quickly move an entire solution between live analyses levels to manage background compute costs.