After Upgrading to Specflow3 and Deveroom Go To Definition not working for Steps in Feature - specflow

Here is my setup:
Specflow 3.0.191
Specflow.tools.MsBuild.Generation 3.0.191
Specflow.NUnit 3.0.191
Visual Studio 2019 Version 16
Deveroom Extension 1.1.1
When I am in a feature file in Visual Studio I am not able to go to the definition of any of my steps. I have tried F12 as well as right clicking on the step and choosing Go To Definition. Neither goes anywhere or pops any kind of error. There is a disconnect that doesn't prohibit the tests from running but does cause the Go To Definition not to work.
I have followed the configuration guide from the Specflow site (https://specflow.org/2019/updating-to-specflow-3/). My tests are running and working. I have deleted the specmap files from the %TEMP% directory and that didn't do anything. I uninstalled/reinstalled the deveroom Visual Studio plugin also which didn't work.
I welcome any insight.
Thanks,
J.R.

We are having the same issue with what I believe the root cause is the Visual Studio Extension version. According to the link you provided it should be supported by Specflow version 2.3.2 or higher, but we are still having issues with 2.4.1
A workaround for us was to uninstall the extension and then install the version appropriate .vsix file for the Visual Studio version below:
https://github.com/techtalk/SpecFlow.VisualStudio/releases/tag/v2017.2.7
And then remember to un-check automatic updates for this extension

I have been struggling with this for some time. I found that I had the following in my specflow.json config file:
{
"allowDebugGeneratedFiles": true
},
changing this to
{
"allowDebugGeneratedFiles": false
},
and rebuilding fixed the issue for me.

Related

DotVVM extension install errors on Visual Studio 2019

I'm attempting to install DotVVM in Visual Studio 2019. Right now I can find it when I 'manage extensions' and it downloads and installs without error. However when I restart Visual Studio post installation I get an error stating 'The DotVVM package did not load correctly' and points me to an xml output file. The contents of said file shows:
SetSite failed for package [DotvvmPackage]
Source: System.ComponentModel.Composition
Description: The composition produced multiple composition errors, with 3 root causes. The root causes are provided below. Review the CompositionException.Errors property for more detailed information
No exports were found that match the constraint: ContractName DotVVM.Integration.VisualStudio.Dialogs.DialogFactory RequiredTypeIdentity DotVVM.Integration.VisualStudio.Dialogs.DialogFactory Resulting in: Cannot set import DotVVM.Integration.VisualStudio.VsPackages.DotvvmPackageDependencies.DialogFactory (ContractName='DotVVM.Integration.VisualStudio.DialogFactory') on part DotVVM.Integration.VisualStudio.VsPackages.DotvvmPackageDependencies.Element: DotVVM.Integration.VisualStudio.VsPackages.DotvvmDependencies.DialogFactory (ContractName='DotVVM.Integration.VisualStudio.Dialogs.DialogFactory') DotVVM.Integration.VisualStudio.VsPackages.DotvvmPackageDependencies
No exports were found that match the constraint:
Pretty much the same error except it's talking about 'DotVVM.Integration.VisualStudio.Common.Licensing.ILoginProvider'
No exports were found that match the constraint:*
Same error except it's talking about 'DotVVM.Integration.VisualStudio.Services.CommandService'
Now I have been trying to find other topics and came across many that said to delete (or rename) the '%appData%'/Local/Microsoft/VisualStudio/16.0/ComponentModelCache' folder which I've tried with no luck. Removed it out of every VisualStudio version folders as well. Restarted Visual Studio of course after. That folder did rebuild itself but I got the same error again.
I've also tried uninstalling and reinstalling it as well. Tired with running Visual Studio as an admin for kicks. Even downloaded the DotVVM.Integration.VisualStudio.2019.RTM.vsix file directly (both 4.0.534 and 4.0.539) and installing it that way with no luck.
I also tried fully uninstalling and reinstalling Visual Studio 2019 all together with no luck. I made sure the entire VisualStudio/16.0 folder was also gone between installs.
I have been able to install other extensions alright just to see.
It seems like I'm missing something or some files when it's trying to install, but I can't figure out what. Any ideas?
Turns out my version of Visual Studio was the issue. My cooperate environment locks me to 16.10.2 which is not the latest version. Visual Studio updates claims I'm up to date but I am not.
The version of DotVVM (4.0.539) doesn't support version 16.10.2 of visual studio, hence the error. I did find an older version of DotVVM (2.5.254) that does support that version of visual studio and that worked fine.

Package installation error when new blank application in nanoframework is created

When i try create new blank application in nanoframework, i get package installation error.
error message
It seems some problem in nanoframework visual studio extension, my version is NET nanoFramework VS2019 Extension v2019.5.0.8.vsix, but i also tried another versions with same problem.
I have visual studio 2019 community edition and i have installed almost all components.
When i press ok, project is loaded, but is not possible compile it, because there are missing all assemblies. When i try add assembly, theres nothing to add and add nuget packages from nanoframework store leads to error.
when i try this:
pm> Install-Package nanoFramework.CoreLibrary.NoReflection -Version
1.10.1-preview.9
I get this error:
NU1202: Package nanoFramework.CoreLibrary.NoReflection
1.10.1-preview.9 is not compatible with netnanoframework10 (.NETna noFramework,Version=v1.0). Package
nanoFramework.CoreLibrary.NoReflection 1.10.1-preview.9 supports: net
(.NETFramework,Version=v0.0)
similiar when i try another package versions.
So the extensions is installed incorectly, but i cant find why. i tried it more times. uninstall and install again. from extenstion store, and from disc. nothing successfull.
The webserver NuGet released today fixes the issues with the version mismatches.
The issue with VS2019 16.9 remains. Reported to VS Developer Community here. Please up vote to help increase priority.
What is the Community version you're using?
After a little test, there seems to be an issue with the latest release of VS2019. A work around would be to:
Use V16.8.X
or
use an already created solution that you can edit.
or
add the required nuget to the project once it has been loaded (after the error):
Update: now fixed! it was due to a change to fix nuget, but caused an unintended consequence with nanoFramework.

NullReferenceException when installing any Extension in VS2019

I got the exact same problem posted here:
Attempting to Install an extension to VS2019 results in a NullReferenceException
Same error, same log.
But since I cannot comment nor answer and the question has not been answered as of yet, I'm asking again.
I am using VS2019 Community, but I had VS2017 Enterprise at one point. (student license)
Every single extension I tried to install so far has led to this error. For example "Live Share", "Open Command Line", "Github Extension for Visual Studio", "Markdown Editor".
I believe it started with Live Share when suddenly an update wouldn't install for no reason. I guess that was back with VS2017 even. But I cannot recall, I just assume. With the newly installed VS2019 I was never able to install any extension via the in-app Extension feature, nor by downloading with browser and then trying to open it.
What I've tried:
0) Every suggestion by Perry Qian-MSFT
1) Repairing Visual Studio 2019
2) Reinstalling Visual Studio 2019
3) Uninstalling "Live Share"
4) Deleting various Folders or contents thereof:
C:\Users\Admin\AppData\Local\Microsoft\VisualStudio
C:\Program Files (x86)\Microsoft Visual Studio\2017 (trying to get rid of any remnants)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions
Next I'll deinstall as much as possible: VS2019 and Installer and try to see what's left, what could have remained that causes such pain in the a***.
But since my internet will be busy with reinstalling afterwards for a while this question goes up now.
Update1: The installer made some problems getting uninstalled. Deinstallation via Windows Software Management failed with an error but it was still removed from the list. Now I've deleted the folder and will try and reinstall the installer. I don't know why I didn't try that before throwing it all over board.
Update2: I decided to start with a simple barebones VS2019 version without any workloads. But it still doesn't work. So back to throwing everything out and looking for the remainder.
Update3: I now tried to delete various folders then reboot and tried to reinstall a barebone VS 2019 Community again. Still same error.
Here's a list:
C:\Program Files (x86)\Microsoft Visual Studio Tools for Unity
C:\Program Files (x86)\NuGet
C:\Program Files (x86)\MSBuild (except for .\Microsoft\Windows Workflow Foundation)
C:\Users\Admin\AppData\Local\Microsoft\VisualStudio Services
C:\Users\Admin\AppData\Local\Microsoft\VisualStudio\Packages
C:\Users\Admin\AppData\Roaming\Microsoft\Microsoft Visual Studio
C:\Users\Admin\AppData\Roaming\Microsoft\VisualStudio
C:\Users\Admin\AppData\Roaming\Visual Studio Setup
C:\Users\Admin\AppData\Roaming\vs_installershell
C:\Users\Admin\AppData\Roaming\vs-report-problem
C:\Users\Admin\Documents\Visual Studio 2013
C:\Users\Admin\Documents\Visual Studio 2017
C:\Users\Admin\Documents\Visual Studio 2019
Oddly enough my personal settings are still persistent. So these will be my next target. But where are they stored? Any pointers?
Update4: Seems like settings are stored in a cloud, hm. I made a local backup and tried to reset them resulting in yet another error.
Your settings were reset, but there were some errors.
Error 1: An error occurred while importing settings for 'Product Updates' [code 5396].
Was this 'Product Updates' Setting the culprit?
Update5: The settings reset didn't seem to accomplish anything at all.
Update6: So, I've signed out of VS, reinstalled VS2019 again and this time it seems like settings were actually reset. Still no luck. This is getting really frustrating.
That's it. I'm done. Apart from reinstalling Windows 10 I have no clue what could help now. Maybe there was some registry error? I am lost here.
Thanks to #dxiv who made me aware of the InstallCleanup.exe.
I don't know what that tool does additionally to what I did and I cannot tell what was wrong in the first place. But that thing actually helped!
Thanks again!

Which Specflow Visual Studio Plugin version do I need to run SpecFlow 2.2.0?

I am not able to determine, which version of the SpecFlow Visual Studio plugin I need to run the old version 2.2.0 of SpecFlow
Due to administrative constraints, we cannot use any other SpecFlow version than 2.2.0
I have tried several older versions of the VS plugin, but with my existing Code (based on SpecFlow 2.2.0), all these result in the error:
Error CS1029 #error: 'Version conflict - SpecFlow Visual Studio extension
attempted to use SpecFlow code-behind
generator 1.9, but project 'XXXXXXX' references SpecFlow 2.2.'
I suppose that I need some plugin Version, that works internally with 2.2
I cannot use the SpecFlow.Tools.MsBuild.Generation package, as this is not yet supported with 2.2.0.
Anyone can help me out? The release history of the SpecFlow Visual Studio Plugins can be found here:
https://github.com/techtalk/SpecFlow.VisualStudio/releases
EDIT
I use Visual Studio 2017 (15.9.6)
In the "packages" folder there are SpecFlow-2.2.0 and SpecFlow.MsTest-2.2.0. I deleted them, I deleted the nuget package Cache and rebuild the solution.
Problem still exists.
The error you are seeing has nothing to do with the suggestions in the comments. It is an additional check we added to the extension.
For SpecFlow 2.2 you have to use an older version of the extension. You can find them at https://github.com/techtalk/SpecFlow.VisualStudio/releases
When I am remembering correctly v2017.2.7 should work for it.
Don't forget to turn off automatic updates of the extension. If you do, you will get again the latest version.
Blog post about how to do it is here: https://specflow.org/2018/vs-integration-breaking-changes-affects-all-users/
Full disclosure: I am one of the SpecFlow and SpecFlow+ developers.
make sure you install the right Specflow extension for your VS(try uninstall and reinstall as well) also make sure you set "Enable SpecflowSingleFileGenerator to false" in VS>Tools>Options>Specflow. you only need this to be true for version 3 onward I suppose.
I had this issue, and while It worked to some extend however, I just install VS 2015 and use specflow 2.2 under that. you should be able to make it work for VS 17 I guess.

Specflow 1.7.0 - integration with Visual Studio Team System 2008

Does anyone use Specflow 1.7.0 with Visual Studio Team System 2008? There are no Specflow templates available in “Add New Item” window after installation.
Installed previous version 1.6.1 and this time integration works fine. Any idea?
I have the same problem.
I was thinking it was because of a bad update of the msi version... but no.
Now : I need to create manually a .feature file
edit :
I have installed cuke4vs
https://github.com/henritersteeg/cuke4vs/downloads
now it's possible to to add features with "Add New Item"
(and in addition the feature file is colored :) )
Most probably found the bug.
Install the next nightly build from build.specflow.org, I hope it will work then.

Resources