No option to suppress StyleCop warnings in context menu - visual-studio-2010

I have just installed StyleCop v4.7.36.0 and am using Visual Studio 2010.
When I run StyleCop on the solution or individual project the warnings are being correctly reported in the Error List window.
When I right click, however there is no option to suppress the warning message(s).
Is there any way to fix this? I really don't want to have to resort to manually editing the GlobalSuppressions.cs file.

Right click on your project inside visual studio project explorer. And then to StyleCop settings. You can disable any warning you want from the window that is shown.
You can find the specific warning from the code as it appears in your picture. So for example to disable the first warning show, you'd go to warning 1633 in the StyleCop settings window and just uncheck what you want.

Related

Disable Visual Studio code style recommendations

Is there a way to get Visual studio to stop spamming me with these messages?
Visual Studio version info
I am also running Resharper 2021.1.2 which I have set up with the recommendations I want.
This is what I did for my .NET Framework project:
Open up the project properties, and click the Code Analysis tab. You'll see the active rule is Microsoft Managed Recommended Rules. To the right, there's a Configure button. Click that.
There's going to be a notice at the top saying "This is a Microsoft rule set and cannot be modified." That's ok. Click the dropdown for Microsoft.CodeAnalysis.CSharp.Features and uncheck all of the IDE#### hints that are bothering you.
Hit ctrl+s to save your new ruleset. Because this is now a custom ruleset you will be prompted with a place to save it. You can save it anywhere and name it whatever you want.
Now, back in the Code Analysis tab in your project settings, click the Active rules dropdown. Second from the bottom there is a <Browse...> option. Choose that and select the .ruleset file you just saved in the previous steps.
For me my active rule is now Copy of Microsoft Managed Recommended Rules, so if you see that you're on the right track.
The IDE hints should now be gone!
I should add that something still didn't feel right with me. I eventually went through and deleted all my .dotsettings files and .editorconfig files, and reset my resharper settings (Extensions -> Resharper -> Options... -> Manage... -> Reset All Settings). This also fixed my unwanted hint problems.

How can I find all unsed using statements with ReSharper?

I want to find all unused using statements in my Xamarin C# project using Visual Studio and ReSharper.
How can I do this?
You can see the unused using statements as warnings in ReSharper Errors/Warnings in Solution window.
You can open it by,
Navigating to ReSharper | Windows | Solution Errors or,
By double clicking on the Errors/Warnings link at the bottom right corner of Visual Studio
In the appearing window, click on ⚠️ icon to show warnings. If there are unused using statements there will be warnings listed. Expand the warnings to find using statement related warnings.
Double clicking on the warning will take you to the relevant file. The unused using statement can be found in gray colour.
Note: Enable Solution Wide Analysis and Reanalyze All to make sure you want miss anything.

How to get Visual Studio to open Resolve Conflicts window after a TFS Get

When I do a Get Latest in Visual Studio, if there are conflicts, there is nothing that is displayed to me to make it obvious. Invariably I think everything is OK, do a build, and often the build works.
The onus is always on me to remember to look for conflicts, to open the Conflicts window.
Is there any way to make VS get in my face, and tell me that there is now a conflict?
You can re open the Resolve Conflicts window if you closed it by mistake from Team Explorer. Goto: Pending Changes, then from the Actions drop down, select Resolve Conflicts.
From there you can click Get All Conflicts.
Normally VS will prompt you to resolve any conflicts as soon as you do one of the following:
Get latest
Check in
Merge
Click the link I surrounded with a red contour in the Team Explorer pane.
And in Visual Studio 2013:
If you're coding in C# then on your Visual Studios editor, select the Tools menu, then the options submenu.
A dialog will pop up. From there select Text Editor, then select C#, then select Advanced.
Then check the box for Show live semantic errors.

How do I make Warning messages stop printing in Visual Studio 2010

Visual studio 2010 output window is constantly printing out "Warning:" message on output window. I would like to make it not print out those messages. How should I accomplish this?
Thanks. (of course getting rid of the message is the best solution but at the moment I just want to hide those messages)
In the properties dialog for your project, you can change the warning level to 0 to turn off all warnings.
Instructions can be found here:
Open the project's Properties page
Click the Build property page.
Modify the Warning Level property.

Visual Studio Editor does not underline errors anymore

My Visual Studio (2008) Editor has stopped to underline Errors (this nifty wavy red lines). I can't really tell when, but it can be related to the installation of .Net Framework 3.5 SP 1 or the MVC Beta (which I guess is unlikely). Furthermore have I installed and uninstalled both CodeRush and Resharper for evaluation purposes (decided not to keep either one of them).
Does anyone know the problem and how to restore this functionality again?
Have you checked Tools→Options...→Text Editor→C#→Advanced→Underline errors in the editor?
I usually like to reset my settings after messing around with plugins, as they tend to mess with settings: Tools→Import and Export Settings...→Reset all settings.
About possible causes.
For VS 2012 and 2013 if you have more than one instance of Visual Studio on different machines binded to one "live" account and have installed ReSharper on one of them, it disables the native IntelliSense and error underlines (to replace by it's own rules) that will be synchronised through your account to another machine without ReSharper.
Found it in Visual Studio 2019 as: Tools > Options > Text Editor > General > Show error squiggles
This is generally called Disable Squiggly or Wavy lines in Visual Studio.
How you will do in Visual studio 2013?
TOOLS -> Options... -> Text Editor -> C/C++ -> Advanced -> Disable Squiggles: True/False (Under IntelliSense) -> Press OK
I know its an old question, and with various solutions, but I have fixed it in different way. I'm working with Unity3D on my C# code using VS2017, when suddenly VS decides to stop underlining error while im typing. However, if I close the file tab and reopen, it suddenly undelines the error.
For example:
class A {
public int x;
s;
}
should obvsiouly give an error for that lonely 's' symbol. But, VS doesn't underline it until I close and reopen this file tab.
Solution:
Copied the entire Unity Project folder (which is like a regular VS Solution folder basically) and worked with the new folder, which issue was gone there.
For visual studio 2017 act according to HeeJae's comments in:
https://developercommunity.visualstudio.com/content/problem/113112/design-time-error-checking-isnt-working.html
i.e:
Hi. you are probably hitting a known issue. can you try this?
1.Update to latest release If that doesn’t solve it
2.Go to Tools\Options\Projects and Solutions\General and uncheck “Allow parallel project initialization”.
3.Close VS.
4.Delete the “.vs” directory beside their solution file.
5.Reopen VS.
..
thank you
You can re-enable the "Allow parallel project initialization" option after the issue was solved.
I tried to upgrade VS, reset VS settings, clear VS cache and everything people do conventionally but none of them solved this issue! At the end the mentioned solution worked for me magically.
Good luck
Unloading and loading same project again from the solution does the trick. Just right click on the project and click "Unload Project". Once unloaded, again right click the same project and click "Reload Project". Error highlighting will return.
I had the same issue with 2017. There was a 'disable intelisense' option, make sure that is set to false.
For everyone wondering in 2021..
search for "C_Cpp.errorSquiggles" in the settings.
Make sure to have it active for the user, as well as the workspace.
No need to restart Visual Studio.
For me (VS 2019) , after trying the other answers also, setting the scope of analysis from "Current document" to Open document" brought back the missing error markers
Just go to settings and search for errors and Image in Error Squiggles. You can see the Error squiggles (Modified: Workspace - Right now you can't see it because I modified it). Just click on modified and you will see the disabled option. If by mistake you disabled it, just enable it and you can see the red line errors again in your code.
In latest edition, check for .vscode folder in same project folder. There will be a setting.json file in that. Delete the key value pair of "C_Cpp.errorSquiggles": "Disabled". Restart the vs code.

Resources