Specflow - going from feature to steps fails - visual-studio

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.

Related

visual studio 2019 open solution file incompatible

I think I was using visual studio 2017 and wrote a SSIS package. Now I installed visual studio 2019 and can't open the solution file. Error:
Unsupported This version of Visual Studio is unable to open the
following projects. The project types may not be installed or this
version of Visual Studio may not support them. For more information
on enabling these project types or otherwise migrating your assets,
please see the details in the "Migration Report" displayed after
clicking OK.
- ABC, "C:\Users\XYZ\ABC.dtproj"
Non-functional changes required Visual Studio will automatically make
non-functional changes to the following projects in order to enable
them to open in Visual Studio 2015, Visual Studio 2013, Visual Studio
2012, and Visual Studio 2010 SP1. Project behavior will not be
impacted.
- ABC_SSIS, "C:\Users\XYZ\ABC_SSIS.sln"
I tried "Right-click on the project and reload" - didn't work.
I tried to confirm SSDT is installed:
it is installed at the installation interface, but doesn't exist in extension manager:
SSIS is a seperate extension now in Visual Studio 2019. You can install that extension in Visual Studio market place. Choose Online tab and search for "SQL Server Integration Services Projects".Hope it can help your problem
1.Extensions -> Microsoft Reporting Service Project
2.and then close visual studio
3.VSIX installer will complete automatically
4.If your project unloaded, right click on project and reload
Today I faced this issue,
Cause
The reason for issue is,
I saw a yellow bg notification at the top of IDE showing performance issue , with option to "disable this" to improve the performance.
I chose disable, later next day when I opened the project, It showed the project is not compatible.
I did Repair SSIS, Uninstall and Reinstall SSIS, and also updated the SSIS to latest version. None of these 3 ways resolved the issue.
Solution
But, I found Manage Extension submenu item under Extension menu, Under installed tab, SSIS extension was in disabled status. I reverted to Enabled status. Sample screenshot of the same for reference is here. If it disabled, simply enable it. Then restart VS with SSIS project.
Enabling the SSIS in manage extensions solved this for me.
Extensions ... Manage Extensions
Online ... Visual Studio Marketplace
SQL Server Integration Services Projects
Download
Close Visual Studio and then run the download
When finished, open your existing SSIS project and right-click the project and select "Reload" or "Reload with dependancies"
You can also now start a new Integration Services project.

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.

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 to disable Style Cop visual studio extension?

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.

Visual Studio freezes or hangs on startup

I have been using Visual Studio for a while and found that when I open visual studio and open the project all the files that were open last time remain open.
This causes my Visual Studio to freeze or crash on startup.
I am using a lot of plugins in my installation and wonder if there is a way to prevent this from happening.
Have you tried resetting user settings? It did help me:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe /ResetUserData
Run: Devenv /ResetSkipPkgs
http://msdn.microsoft.com/en-us/library/ms241276%28VS.80%29.aspx
or
You are probably looking for the /SafeMode command line switch:
devenv.exe /SafeMode
This will start Visual Studio with all add-ins disabled.
You can change your Visual Studio 2010 start up settings.
Tools --> Options --> Startup --> At startup --> Show empty environment --> Save
Visual Studio has a plugins limit. Use only plugins that best for you. There is a list for best Visual Studio 2010 plugins for developers.
Visual Studio 2010 - recommended extensions
devenv.exe /ResetSettings
or
devenv.exe /ResetSetting
Worked fine for me
I had the same issue with Community 2015 version. I solved it with Vidas Vasiliauskas suggestion, which was to erase user settings.
The thing is that I previously had enterprise 2015 version, in which I was logged in with my Microsoft account. When trying to open community version, it tried to do so with that same account, which I believe was the cause of the issue.
Therefore, I would suggest to those with the same problem to run the following command at Command Line Prompt:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe /ResetUserData
In my case, VS 2013 Professional was hanging on startup because the license was no longer valid.
Last item in the log file:
<entry>
<record>367</record>
<time>2015/07/13 20:11:05.051</time>
<type>Information</type>
<source>UserConnection</source>
<description>myemailaddrs#gmail.com signed in for IDE user</description>
</entry>
And on the msdn.microsoft.com subscription page: "Your subscription is no longer active, contact your administrator."
I had to get an updated subscription from my employer.
When it hangs on the splash screen:
It could be that an anti-virus solution is blocking Visual Studio.
Kaspersky Internet Security 16.0.1.445 makes Visual Studio 2015 hang on the splash screen. The older version 16.0.0.614 works fine.
Clear the tag's elements in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config
Also do the same with C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config
The tag should just be <runtime/>
If your Visual Studio 2019 is stuck due to a faulty extensions, here is a way to get it back to normal.
First, start Visual Studio in safe mode (devenv.exe /SafeMode) and uninstall the troublemaker.
Hereafter, if Visual Studio 2019 is still unresponsive, you need to do the following:
Browse to %LOCALAPPDATA% and go to Microsoft -> VisualStudio -> 16.0_bb6da863 (or whatever version you have installed)
Delete the following folders (all cache related):
ComponentModelCache
ImageLibrary
MFECacheBackup
Extensions\*.cache
For reference:
Hope it helps you and safe a VS repair/reinstall.
Happy coding :-)
I was having this issue when using the Git source-control plugin.
I ran devenv.exe /SafeMode
And then in Options -> Source Control -> Plug-in Selection made sure "None" or "Visual Studio Team Foundation Server" was selected. After that, VS started normally.
Check Task Manager. I had a Setup.exe running (not sure what it was installing), but once I killed it, VS unfroze.
I have got recently VS2017 stucked on start up . so I did this and worked for me :
1 - start cmd as admin : run the following:
cd "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE"
devenv.exe /SafeMode
2- once VS is started , go to
Tools => Extentions and Updates :
then uninstall all plug-ins that installed recently ( notice the installed date ) and unnecessary ones)
This helped me: I deleted all SDK, JDK & JRE folders that had been rooted in VS settings before. After that I used devenv.exe /ResetUserData and devenv.exe /ResetSettings.
Worked for me on Visual Studio 2015.
This is becuase of rendering IDE UI try this hope it will resolve
1- Open "Visual Studio"
2- Select "Options" from the top menu
3- Navigate to "Environment => General"
4- Unchecked "Optimize rendering for screens with different pixel densities"
5- Restart visual studio

Resources