SpecFlow for Visual Studio 2017 v2017.1.12 fails to install

Created on 24 Feb 2018  Â·  23Comments  Â·  Source: SpecFlowOSS/SpecFlow

Note - Works fine after updating Visual Studio to Version 15.5.7 - This is not always quick to do when you are behind a corporate firewall :)

SpecFlow for Visual Studio 2017 v2017.1.12 fails to install and breaks scenarios / definitions
Same Behavior as issue #783

SpecFlow Version:

  • [x ] 2.2
  • [ ] 2.1
  • [ ] 2.0
  • [ ] 1.9

Used Test Runner

  • [ ] SpecFlow+Runner
  • [ ] MSTest
  • [x ] NUnit
  • [ ] Xunit

Version number: 2.2

Visual Studio Version

  • [ x] VS 2017
  • [ ] VS 2015
  • [ ] VS 2013

Are the latest Visual Studio updates installed?

  • [ x] Yes
  • [ ] No

.NET Framework:

  • [x ] >= .NET 4
  • [ ] before .NET 4

Test Execution Method:

  • [x ] Visual Studio Test Explorer
  • [ ] TFS/VSTS – Task – PLEASE SPECIFY THE NAME OF THE TASK
  • [ ] Command line – PLEASE SPECIFY THE FULL COMMAND LINE

<SpecFlow> Section in app.config

Does not apply, the Extension simply does not install.

Repro Project

Issue Description

SpecFlow for Visual Studio 2017 v2017.1.12 fails to install via Extensions and Updates. Error reads possible configuration change or another extension may be causing the issue. This renders all SpecFlow projects unusable -- scenarios are not recognized. The error log follows

828 Initialized ServiceProvider.GlobalProvider from SetSite. Package Framework 2018/02/23 23:20:04.595
829 ERROR LegacySitePackage failed for package [SpecFlowPackagePackage]Source: 'Microsoft.VisualStudio.Composition' Description: Expected 1 export(s) with contract name "TechTalk.SpecFlow.VsIntegration.LanguageService.IGherkinLanguageServiceFactory" but found 0 after applying applicable constraints. Microsoft.VisualStudio.Composition.CompositionFailedException: Expected 1 export(s) with contract name "TechTalk.SpecFlow.VsIntegration.LanguageService.IGherkinLanguageServiceFactory" but found 0 after applying applicable constraints. at Microsoft.VisualStudio.Composition.ExportProvider.GetExports(ImportDefinition importDefinition) at Microsoft.VisualStudio.Composition.ExportProvider.GetExportsT,TMetadataView at Microsoft.VisualStudio.Composition.ExportProvider.GetExportT,TMetadataView at Microsoft.VisualStudio.Composition.ExportProvider.GetExportT at Microsoft.VisualStudio.Composition.ExportProvider.GetExportT at Microsoft.VisualStudio.Composition.ExportProvider.GetExportedValueT at Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetServiceT at TechTalk.SpecFlow.VsIntegration.Utils.VsxHelper.ResolveMefDependencyT at TechTalk.SpecFlow.VsIntegration.DefaultDependencyProvider.RegisterVsDependencies(IObjectContainer container, IServiceProvider serviceProvider) at TechTalk.SpecFlow.VsIntegration.DefaultDependencyProvider.RegisterDefaults(IObjectContainer container) at TechTalk.SpecFlow.VsIntegration.VsContainerBuilder.RegisterDefaults(IObjectContainer container) at TechTalk.SpecFlow.VsIntegration.VsContainerBuilder.CreateContainer(SpecFlowPackagePackage package) at TechTalk.SpecFlow.VsIntegration.SpecFlowPackagePackage.Initialize() at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp) {5D978B7F-8F91-41C1-B7BA-0B4C056118E8} 80131500 VisualStudio 2018/02/23 23:20:04.672

830 ERROR SetSite failed for package SpecFlowPackagePackage {5D978B7F-8F91-41C1-B7BA-0B4C056118E8} 80131500 VisualStudio 2018/02/23 23:20:04.837

831 ERROR End package load [SpecFlowPackagePackage] {5D978B7F-8F91-41C1-B7BA-0B4C056118E8} 80131500 VisualStudio 2018/02/23 23:20:04.844

Steps to Reproduce

Click Download in Visual Studio Extensions and Updates.

Bug VisualStudioIntegration

Most helpful comment

@SabotageAndi everything fine when VS is updated to latest.

All 23 comments

@jronay & @vinnyrose: could you try what happens if you delete the VS MEF Cache?
It is located at: %localappdata%\Microsoft\VisualStudio\15.0\ComponentModelCache

I just recognized that there could be more than 1 ComponentModelCache folder to delete:
image

I have them in multiple folders of different VS versions. Please delete it in all VS version folders.

I had the same issue. For me, updating VS helped (i had 15.3.3 when the issue was reproducible). On 15.5.7, the problem was not present.

@SabotageAndi it may take a few days. I have a demo of SpecFlow on Monday, and can't risk breaking my setup again. It is a production laptop. :)

I put the old releases on GitHub. Use the 2017.1.10

@SabotageAndi Thanks. Can you include a link to the old releases please?

@jronay Is it working for you now?

@SabotageAndi have tried to install the 2017.1.10 version of vs extension, but am seeing this error

2/28/2018 10:13:57 AM - Searching for applicable products...
2/28/2018 10:13:57 AM - Found installed product - Global Location
2/28/2018 10:13:57 AM - Found installed product - Visual Studio Build Tools 2017
2/28/2018 10:13:57 AM - System.IO.FileNotFoundException: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\
at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName)
at VSIXInstaller.SupportedVSSKU.get_VersionWithBuildRevisionInfo()
at VSIXInstaller.App.IsValidSKUForExtension(SupportedVSSKU supportedSKU, IExtension extension, List1 validSKUs) at VSIXInstaller.App.ShouldAddSkuToValidSkuList(SupportedVSSKU sku, IInstallableExtension extension, List1 validSKUs)
at VSIXInstaller.App.GetInstallableData(String vsixPath, Boolean isRepairSupported, IEnumerable1& skuData) at VSIXInstaller.App.Initialize(Boolean isRepairSupported) at VSIXInstaller.App.Initialize() at System.Threading.Tasks.Task1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()

Any ideas

Many thanks

Marc

@mp-marc For which version of Visual Studio do you want to install the extension?

Hi @SabotageAndi

My version of Visual Studio is 2017, 15.2

Thanks

@SabotageAndi For now I am using version 2017.1.6 and this is working. Were any changes made to the .12 version?

@SabotageAndi I have tried all versions of the extension from 2017.1.6-2017.1.9 (inclusive), and all give the same error as above.

Any help would be greatly appreciated.

@jronay btw what version of visual studio are you using

Many thanks

@mp-marc VS2017 15.2 was released in May 2017. We are currently at 15.5 and 15.6 will be released soon.
Here is the changelog: https://docs.microsoft.com/en-us/visualstudio/releasenotes/vs2017-relnotes

Please update your Visual Studio.

@SabotageAndi I updated Visual Studio to 15.5.7 and it is working fine now.

@SabotageAndi That is the SpecFlow 2017.1.12 Extension version is working fine with Visual Studio version 15.5.7

@SabotageAndi everything fine when VS is updated to latest.

@jronay & @vinnyrose: cool
So we know, that you need the latest VS version that the extension gets installed without problems.

Solved for me => I am closing this issue.

Same issue with 15.6.6 VS2017
Install Error : Microsoft.VisualStudio.ExtensionManager.MissingTargetFrameworkException: The extension 'SpecFlow for Visual Studio 2017' requires a version of the .NET Framework that is not installed.

Tried cleaning up MEF directory, no luck.

@vijay-rbt The VS Extension for VS 2017 needs .NET 4.6. According to the error message, you don't have it installed. No idea how that is possible.

@SabotageAndi - i do have .NET 4.6, (4.6.000079) that's why error is so weird and i am unable to circumvent it.

@vijay-rbt Open an issue via the feedback client in Visual Studio at Microsoft. I don't think we can help you here.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings