How to disable Style Cop visual studio extension? - visual-studio

How to disable the Style Cop visual studio extension? It's not listed in Tools / Extensions or in Tools / Add-in manager

I had the same issue: I uninstalled it using Add/Remove programs and got the expected error, when I opened Visual Studio next time. Still after hiding this error message, the StyleCop entries remained in my context menus.
After some research, I found a solution to remove all remains by running devenv.exe /setup on the command prompt. You must run the console elevated and you might have to switch to the C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE folder (or similar; depending on your system) in order to run the command.
Remember to remove the assotiated Code Cleanup profile if you are using ReSharper.
Source: http://stylecop.codeplex.com/discussions/257772

You can't, StyleCop deliberately hides itself from the uninstall menu in Visual Studio.
You can uninstall it in Add/Remove programs. You might get an error the next time you open Visual Studio but it will be gone after that.

why it happens is : mostly because you uninstalled the style-cop while visual studio was open
how to fix it
remove the registry keys
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0_Config\InstalledProducts\StyleCop
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0_Config\Packages{629EB7CC-69C2-43AC-9BC9-482B0F810C4E}
OR
reinstall & then uninstall (make sure your visual studio is closed during this process)
if you are using resharper
you would need to reset the Code Cleanup Profile to factory defualt to get rid of style-cop completely.

I had the same issue. I have already uninstalled it from Visual Studio by ReSharper Extension Manager and it there was under the right click menu still when I click any projects on Solution Explorer.
This way will solve the problem:
Steps:
Remove the StyleCop by Add/Remove Programs on control panel
If you have already uninstalled the StyleCop, install once again by ReSharper extension manager.(There will be many error at the first opening Visual Studio after the styleCop uninstall process. don't worry about it, press enter all)
Then Remove it by Resharper extension manager again.

I had the VS15 StyleCop plug-in installed and later added the ReSharper extension on top.
I removed the extension from ReSharper, then uninstalled StyleCop via Control Panel Add/Remove Programs and then let CCleaner run with registry clean-up.
The StyleCop entries have disappeared from the menus and the billions of squiggly lines have as well.

The easiest way is to install "StyleCop" extension from Visual Studio Marketplace. Which also can be found from the link :
https://marketplace.visualstudio.com/items?itemName=ChrisDahlberg.StyleCop
Now right click your project and click on "StyleCop Settings", there you you can disable or customize the rules.

Related

Specflow - going from feature to steps fails

Since some days the feature files are broken.
VS2017:
Colors dissapeard, everything is white.
When I press F12 nothing happens.
When I run the test from solution explorer the tests work fine.
VS2015:
Everything works fine.
What I tried to do:
Option 1: Run Binding Tool
Right-click on the feature file
Select "Run Custom Tool"
This causes the SpecFlowSingleFileGenerator to regenerate the code-behind for your test framework.
Option 2: Restart Visual Studio
Close Visual Studio
Open Visual Studio
Reopen solution
This causes any bindings that haven't been cached to rerun.
Option 3: Clear SpecFlow Step Mapping Cache
Close Visual Studio
Open Windows Explorer
Type %TEMP% in Address Bar and hit Enter
Search for "specflow-stepmap-*.cache"
Delete those files
Open Visual Studio
Reopen solution
Option4: Uninstall and reinstall visual studio 2017
None of them fixes the issues for VS2017.
Some help is more than welcome.
I solved this issue by updating VS2017 to v15.6.1. Prior to that I've tried all the steps you mentioned and it did not work.
Also, found this article: https://github.com/techtalk/SpecFlow/issues/1049 which is saying the same.
These symptoms sound like you haven't installed Specflow extension on your VisualStudio 2017.
What happens when you dont have it is that VS can't work with feature files and can't navigate to anything when pressing F12.
Tests are working because VisualStudio executes already generated NUnit tests from feature.cs files.
Double check your VisualStudio Tools -> Extensions And Updates -> Check in Installed if you have Specflow for Visual Studio 2017 installed and Enabled.
Note: Each time you install a new Visual Studio you have to install the extension.
Came across the same issue, installed Specflow for Visual Studio 2017 from Tools >> Extensions And Updates and found as working fine.
Go the colours for feature file lines back and F12 is working fine.
Thanks.

Visual Studio "Extensions and Updates" remains disabled

Recently, I disabled all the extensions at "Extensions and Updates" window in Visual Studio 2017. Now I am trying to enable them but it doesn't work. When I enabled the extensions Visual Studio says:
These changes will take effect the next time Microsoft Visual Studio is opened.
But, when I close the VS and reopen it again, they remain disabled. I tried to restart the system after closing the VS, but this also didn't work.
Is there any one knows how to solve this issue?
Is there any one knows how to solve this issue?
Since there is no specific error info, to resolve this issue, I would like provide you some troubleshootings:
Make sure you are using latest version of Visual Studio.
I test it with the latest version 15.5.2 without this issue. If you are not in the latest version, please update your Visual Studio to latest version first.
Run Visual Studio in safe mode:
Please open an administrative CMD window and navigate to C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE and run these commands:               
devenv /safemode
It prevents all third-party VSPackages from loading when Visual Studio starts, thus ensuring stable execution. if it works, this issue should be caused by the extensions and you need to remove the installed extensions under Tools—Extensions and Updates.
Clean the extension cache:
If it doesn’t work in safe mode, please have a try with delete or rename the following folders:
C:\Users\\AppData\Local\Microsoft\VisualStudio\15.0
C:\Users\\AppData\Roaming\Microsoft\VisualStudio\15.0
Meanwhile, run visual studio as administrator, disable any Anti-Virus or Anti-Spyware software on your computer and clean %temp% folder.
Hope this helps.

Can't de-activate Visual Studio Extensions. ReSharper deactivated itself

Most of my Visual Studio Extensions can't be deactivated or activated any more. I've searched for a solution and tried 'Clear MEF Component Cache' but that didn't work.
Another suggestion was to uninstall the extension, restart VS, uninstall the extension again (somehow the extensions are supposed to still there) and restart VS again. The problem here is, that some of the deactivated extensions cant even be uninstalled, so even if that works for some, it won't work for all of them.
I tried to repair DevExpress with the installer but its still the same. It's not too bad with DevExpress though, because DevExpress seems to at least be activated and still works. But somehow ReSharper deactivated itself and now I can't use it any more. I can't uninstall it via the 'Extensions and Updates'-window either. And if I hover the cursor over the 'Activate'-button, it says 'This product can not be DEactivated', which is odd, because it IS deactivated.
Any suggestions on what could be causing this and/or how to fix it?
I am using Visual Studio Professional 2015 Version 14.0.25431.01 Update 3.
The items are greyed out because they are installed per-machine, rather than per-user. Which basically means they were installed by an installer, rather than through Visual Studio's extensions dialog. ReSharper is one such application - it installs via an installer, rather than using Visual Studio's VSIX mechanism. You can't uninstall it from the extensions dialog, but have to go through the Add/Remove Programs dialog in the computer's control panel.
As for ReSharper being deactivated - check in Tools → Options → ReSharper to see if ReSharper has been suspended. In which case, just active it again. If not, go to Add/Remove Programs and either repair the install, or uninstall/reinstall.

Visual Studio extension not loading

I'm using Visual Studio 2012. Recently I find extension for JS unit test doesn't load. I goto menu Tools->Extensions abd Updates, the extension's Enable button is disabled. I tried a few ways to fix this:
Reinstall JS unit test extension
Reinstall latest version of extension
Repair Visual Studio
I almost try to reinstall Visual Studio. How to solve this?
One possible reason is, you are running Visual Studio as administrator, and the extension is installed by another user of this computer. For this case:
Goto menu Tools->Options->Environment->Extensions and Updates, check Load per users extension when running as administrator.

How do you remove/uninstall Add-Ins for Visual Studio if they are broken?

I had EntitySpaces Add-in for Visual Studio (all versions) installed. Upon uninstalling it, when you start up any version of Visual Studio, you get the message "could not rename add-in file". How do you get rid of this or stop Visual Studio from trying to load the Add-In?
It appears this can be a common problem when applications that install Add-Ins or just Add-Ins on their own, don't uninstall properly or just plain break.
For Visual Studio 2015 you have to:
Click on Tool -> Extensions and Updates.
Be sure that Installed option is selected in left part of the window.
Find your addin, select it and click on Uninstall button.
Restart Visual Studio.
There are a few helpful articles which may be useful for your particular Add-In:
http://www.mztools.com/articles/2006/mz2006018.aspx
First of all I tried this (which may work for you) How to: Deactivate and Remove an Add-In.
Note if you don't know the Namespace or ClassName of the addin, you can find it in the .addin file under FullClassName:
To remove an add-in from the integrated development environment (IDE)
Delete the .addin XML registration file for the add-in that you want
to remove. The default location is ..\Users\username\ Documents\Visual
Studio 2010\Addins\
At a Visual Studio command prompt, type devenv
/resetaddin Namespace.ClassName, where Namespace is the name of your
add-in project and Classname is its class name, for example, devenv
/resetaddin MyAddin1.Connect
For me this, although not my exact problem, lead to my resolution, which was simply to run Visual Studio as administrator. Doing this for just one version of Visual Studio solved my problem in that the error message no longer appeared (probably because it was then able to successfully rename as per the original error message).
In Visual Studio 2019, Click on Extensions tab. Then click on Manage Extensions. In the window that opens,select Installed in the left pane. After that search for the Add-in you want to remove. In the results displayed, select the Add-in the hit UNINSTALL. Restart Visual Studio for the process to be completed. The process seems to work for any Add-in.

Resources