Specflow plugin failure for Visual Studio 2017 - visual-studio-2017

I have both VS 2015 Update 3 and VS 2017 15.7 installed on my machine. After installing new VS2017 I downloaded the specflow for visual studio 2017 to install in VS 2017 Enterprise (15.7)
I am able to build the code after I do getlatest but not when I edit. When I try to Add New Item a new feature file I am not able to do this using VS 2017 I can't see the SpecFlow feature template, or, indeed, any SpecFlow template. I get following error when I am trying to build after I edit/Add a line in the feature file -
Below is the error in .cs file for respective feature file :-
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Enumerator.MoveNext()
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at BoDi.ObjectContainer.NamedInstanceDictionaryRegistration.Resolve(ObjectContainer container, RegistrationKey keyToResolve, ResolutionList resolutionPath)
at BoDi.ObjectContainer.ResolveObject(RegistrationKey keyToResolve, ResolutionList resolutionPath)
at BoDi.ObjectContainer.Resolve(Type typeToResolve, ResolutionList resolutionPath, String name)
at TechTalk.SpecFlow.Generator.UnitTestConverter.FeatureGeneratorRegistry..ctor(IObjectContainer objectContainer)
--- End of inner exception stack trace ---
t System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at TechTalk.SpecFlow.Generator.TestGeneratorFactory.CreateGenerator(ProjectSettings projectSettings)
at TechTalk.SpecFlow.VisualStudio.CodeBehindGenerator.Actions.GenerateTestFileAction.GenerateTestFile(GenerateTestFileParameters opts)
specflowvisual-studio-2017
Others in my team are able to build the latest code as well as they are able to edit feature file and build it successfully. How do I fix this issue on my local? I don't see any other updated version of SpecFlow where this issue got fixed. Please advise.

Related

Building Visual Studio 2010 C++ project with a system that has only Visual Studio 2017 installed

We're currently upgrading our systems and want to use that opportunity to upgrade from VS 2010 to VS 2017.
Before switching over, we're running some tests with our existing projects (C++ and C#). Compiling and debugging C# projects worked - as expected - without a hitch.
We've got one pretty big C++ solution that we'd also like to continue developing in VS 2017, but for now we'd like to neither upgrade the platform toolset or sdk version.
Just installing VS 2017 and compiling the solution results in the error:
The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, please install Visual Studio 2010 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".
While googling i've found the following question: How to install Visual Studio Build Tools 2010 on Visual Studio 2015 Community?
Which is similar to the problem we're facing. I tried installing the Headers and Tools from the Windows 7 SDK. I also installed the C++ Compiler Update, but now get the following errors (for every project):
Could not find WindowsSDKDir variable from the registry. TargetFrameworkVersion or PlatformToolset may be set to an invalid version number. in C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets on line 297
Required file "" is missing. in C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets on line 153
The element mentioned in above error has the following text:
<!-- Rest of the sources -->
<CL Condition="'%(ClCompile.PrecompiledHeader)' != 'Create' and '%(ClCompile.ExcludedFromBuild)'!='true'"
BuildingInIDE ="$(BuildingInsideVisualStudio)"
Sources ="#(ClCompile)"
AdditionalIncludeDirectories ="%(ClCompile.AdditionalIncludeDirectories)"
AdditionalOptions ="%(ClCompile.AdditionalOptions)"
AdditionalUsingDirectories ="%(ClCompile.AdditionalUsingDirectories)"
AssemblerListingLocation ="%(ClCompile.AssemblerListingLocation)"
AssemblerOutput ="%(ClCompile.AssemblerOutput)"
BasicRuntimeChecks ="%(ClCompile.BasicRuntimeChecks)"
BrowseInformation ="%(ClCompile.BrowseInformation)"
BrowseInformationFile ="%(ClCompile.BrowseInformationFile)"
BufferSecurityCheck ="%(ClCompile.BufferSecurityCheck)"
CallingConvention ="%(ClCompile.CallingConvention)"
CompileAsManaged ="%(ClCompile.CompileAsManaged)"
CompileAs ="%(ClCompile.CompileAs)"
DebugInformationFormat ="%(ClCompile.DebugInformationFormat)"
DisableLanguageExtensions ="%(ClCompile.DisableLanguageExtensions)"
DisableSpecificWarnings ="%(ClCompile.DisableSpecificWarnings)"
EnableEnhancedInstructionSet ="%(ClCompile.EnableEnhancedInstructionSet)"
EnableFiberSafeOptimizations ="%(ClCompile.EnableFiberSafeOptimizations)"
EnablePREfast ="%(ClCompile.EnablePREfast)"
ErrorReporting ="%(ClCompile.ErrorReporting)"
ExceptionHandling ="%(ClCompile.ExceptionHandling)"
ExcludedInputPaths ="$(ExcludePath)"
ExpandAttributedSource ="%(ClCompile.ExpandAttributedSource)"
FavorSizeOrSpeed ="%(ClCompile.FavorSizeOrSpeed)"
FloatingPointExceptions ="%(ClCompile.FloatingPointExceptions)"
FloatingPointModel ="%(ClCompile.FloatingPointModel)"
ForceConformanceInForLoopScope ="%(ClCompile.ForceConformanceInForLoopScope)"
ForcedIncludeFiles ="%(ClCompile.ForcedIncludeFiles)"
ForcedUsingFiles ="%(ClCompile.ForcedUsingFiles)"
FunctionLevelLinking ="%(ClCompile.FunctionLevelLinking)"
GenerateXMLDocumentationFiles ="%(ClCompile.GenerateXMLDocumentationFiles)"
IgnoreStandardIncludePath ="%(ClCompile.IgnoreStandardIncludePath)"
InlineFunctionExpansion ="%(ClCompile.InlineFunctionExpansion)"
IntrinsicFunctions ="%(ClCompile.IntrinsicFunctions)"
MinimalRebuild ="%(ClCompile.MinimalRebuild)"
MultiProcessorCompilation ="%(ClCompile.MultiProcessorCompilation)"
ObjectFileName ="%(ClCompile.ObjectFileName)"
OmitDefaultLibName ="%(ClCompile.OmitDefaultLibName)"
OmitFramePointers ="%(ClCompile.OmitFramePointers)"
OpenMPSupport ="%(ClCompile.OpenMPSupport)"
Optimization ="%(ClCompile.Optimization)"
PrecompiledHeader ="%(ClCompile.PrecompiledHeader)"
PrecompiledHeaderFile ="%(ClCompile.PrecompiledHeaderFile)"
PrecompiledHeaderOutputFile ="%(ClCompile.PrecompiledHeaderOutputFile)"
PreprocessKeepComments ="%(ClCompile.PreprocessKeepComments)"
PreprocessorDefinitions ="%(ClCompile.PreprocessorDefinitions)"
PreprocessSuppressLineNumbers ="%(ClCompile.PreprocessSuppressLineNumbers)"
PreprocessToFile ="%(ClCompile.PreprocessToFile)"
ProcessorNumber ="%(ClCompile.ProcessorNumber)"
ProgramDataBaseFileName ="%(ClCompile.ProgramDataBaseFileName)"
RuntimeLibrary ="%(ClCompile.RuntimeLibrary)"
RuntimeTypeInfo ="%(ClCompile.RuntimeTypeInfo)"
ShowIncludes ="%(ClCompile.ShowIncludes)"
SmallerTypeCheck ="%(ClCompile.SmallerTypeCheck)"
StringPooling ="%(ClCompile.StringPooling)"
StructMemberAlignment ="%(ClCompile.StructMemberAlignment)"
SuppressStartupBanner ="%(ClCompile.SuppressStartupBanner)"
TreatSpecificWarningsAsErrors ="%(ClCompile.TreatSpecificWarningsAsErrors)"
TreatWarningAsError ="%(ClCompile.TreatWarningAsError)"
TreatWChar_tAsBuiltInType ="%(ClCompile.TreatWChar_tAsBuiltInType)"
UndefineAllPreprocessorDefinitions ="%(ClCompile.UndefineAllPreprocessorDefinitions)"
UndefinePreprocessorDefinitions ="%(ClCompile.UndefinePreprocessorDefinitions)"
UseFullPaths ="%(ClCompile.UseFullPaths)"
UseUnicodeForAssemblerListing ="%(ClCompile.UseUnicodeForAssemblerListing)"
WarningLevel ="%(ClCompile.WarningLevel)"
WholeProgramOptimization ="%(ClCompile.WholeProgramOptimization)"
XMLDocumentationFileName ="%(ClCompile.XMLDocumentationFileName)"
CreateHotpatchableImage ="%(CLCompile.CreateHotpatchableImage)"
TrackerLogDirectory ="%(ClCompile.TrackerLogDirectory)"
TLogReadFiles ="#(CLTLogReadFiles)"
TLogWriteFiles ="#(CLTLogWriteFiles)"
ToolExe ="$(CLToolExe)"
ToolPath ="$(CLToolPath)"
TrackFileAccess ="$(TrackFileAccess)"
MinimalRebuildFromTracking ="%(ClCompile.MinimalRebuildFromTracking)"
ToolArchitecture ="$(CLToolArchitecture)"
TrackerFrameworkPath ="$(CLTrackerFrameworkPath)"
TrackerSdkPath ="$(CLTrackerSdkPath)"
TrackedInputFilesToIgnore ="#(ClNoDependencies)"
AcceptableNonZeroExitCodes ="%(ClCompile.AcceptableNonZeroExitCodes)"
YieldDuringToolExecution ="$(ClYieldDuringToolExecution)"
>
Looking for ways to solve the warning, that the WindowsSDKDir couldn't befound led me to this question
Chaning the Platform Toolset to "Windows7.1SDK" gets rid of the "Could not find WindowsSDKDir variable from the registry." error, but the "Required file "" is missing." error remains.
Installing Visual Studio 2010 C++ Express does solve the problem (at least for compiling and running the solution in Release).
Is there a way to work with VS 2017 and without upgrading our projects without needing to install VS 2010?
It is apparently not possible. You've got to either install Visual Studio 2010 or upgrade the toolset to Visual Studio 2017 as outlined in this blogpost - and comments.

TFS 2017 Build Fails - can't publish test results

TFS 2017 Build is failing on the Visual Studio Test task when it tries to publish tests result. Using task version 2.* ... version 1.* was not working anymore (couldn't find path vstest.console.exe and acted strange when I put specific path)... how can I get this to work? using tfs 2017.5 on the build server, and TFS Version 15.117.26714.0, using the latest agent from that.
2017-09-21T20:29:13.5158841Z Results File: D:\agent1_work\1\s\Dev\20170305_MD_4.4\TestResults\TfsService_DEVBUILD5 2017-09-21 15_14_33.trx
2017-09-21T20:29:14.5470386Z ##[warning]Vstest failed with error. Check logs for failures. There might be failed tests.
2017-09-21T20:29:14.5470386Z ##[error]Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe failed with return code: 1
2017-09-21T20:29:17.9532729Z ##[warning]Failed to publish test results: '', hexadecimal value 0x10, is an invalid character. Line 10256, position 10.
2017-09-21T20:29:17.9532729Z ##[error]Vstest exited with return code: 1.
OK found an answer, have to use a newer version of vstest.console.exe provided by the TFS tasks team. see last item here:
https://github.com/Microsoft/vstest/issues/683
basically, need pass custom vstest.console.exe path which is VS-Insallation-Directory\Common7\IDE\Extensions\TestPlatform\vstest.console.exe in your vstest V2 task.

Visual studio 2017 unable to update, installer uninstall with error log

I'm facing as issue where i can not do anything with my VS 2017 installer, it happened that I tried to updated via auto update but it was unsuccessful then , i close the program then reopen it again, but now it wont be able to do anything, i try to use clean up tool from Github but still fail.. follow the MS instruction but also fail
https://learn.microsoft.com/en-us/visualstudio/install/troubleshooting-installation-issues
Below is my error log
[0914:0009][2017-08-30T14:59:35] Error 0x80070057: at
Microsoft.VisualStudio.Setup.Dependencies.DependencyManager.BuildGraphCore(IPackage
root, IEnumerable`1 packages, DependencyComparer comparer,
Dictionary`2 packageIndex, Dictionary`2 nodeIndex, Boolean splitNodes,
DependencyCollection deprecated) at
Microsoft.VisualStudio.Setup.Dependencies.DependencyManager.BuildGraph(IPackage
root, IEnumerable`1 packages, Boolean isUpdate,
IDependencyComparisonSeed seed, DependencyCollection deprecated) at
Microsoft.VisualStudio.Setup.Engine.GetDependencyGraph(Product
product) at Microsoft.VisualStudio.Setup.Engine.PreChecks(String
installationPath, Boolean isLayoutSet, Product product, ExecuteAction
bootstrapperAction, ITelemetryOperation operation, IQuery query) at
Microsoft.VisualStudio.Setup.Engine.Uninstall(CancellationToken
token)The root node
"Microsoft.VisualStudio.Product.Community,version=15.0.26430.16" is
not in the package collection. Parameter name: root`
Thank you so much in advance for every answer, really appreciate all help,
best regards
The error for 0x80070057 in the OS Header files is:
An argument does not meet the contract of the method.
DDERR_INVALIDPARAMS ddraw.h
DIERR_INVALIDPARAM dinput.h
DPERR_INVALIDPARAM dplay.h
DPERR_INVALIDPARAMS dplay.h
DPNERR_INVALIDPARAM dplay8.h
DSERR_INVALIDPARAM dsound.h
DVERR_INVALIDPARAM dvoice.h
ecInvalidParam ec.h
ecInvalidSession ec.h
ecBadBuffer ec.h
MAPI_E_INVALID_PARAMETER mapicode.h
STIERR_INVALID_PARAM stierr.h
E_INVALIDARG winerror.h
Some problem with an invalid parameter. Based on this try and do a /ResetSettings (devenv.exe)
DevEnv /ResetSettings
https://msdn.microsoft.com/en-us/library/ms241273.aspx
Failing that you should:
Uninstall VS2017.
Use a tool called MSIZap/msicuu2 to remove any left overs.
Reinstall.
Failing that you have little choice but to rebuild your PC.
Troubleshooting Visual Studio 2017 installation and upgrade issues
See this link

VS2015.3/PTVS Python Tools no longer working?

strong textI reinstalled VS 2015 Update 3 (from Web install) w/Python Tools, but Python Tools don't seem to work anymore. From ActivityLog.xml, the error is:
<record>494</record>
<time>2016/07/04 15:59:16.031</time>
<type>Error</type>
<source>VisualStudio</source>
<description>LegacySitePackage failed for package [Python Tools
Package]Source:
&apos;Microsoft.VisualStudio.Composition&apos;
Description: Expected 1 export(s) with contract name
"Microsoft.PythonTools.Interpreter.IInterpreterOptionsService"
but found 0 after applying applicable constraints.
#x000D;
Microsoft.VisualStudio.Composition.CompositionFailedException:
Expected 1 export(s) with contract name
"Microsoft.PythonTools.Interpreter.IInterpreterOptionsService"
but found 0 after applying applicable constraints.
Microsoft.VisualStudio.Composition.ExportProvider.GetExports
(ImportDefinition importDefinition)
at
Microsoft.VisualStudio.Composition.ExportProvider.GetExports
[T,TMetadataView](String contractName, ImportCardinality
cardinality)
at
Microsoft.VisualStudio.Composition.ExportProvider.GetExport
[T,TMetadataView] (String contractName)
at
Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T]
(String contractName)
at
Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T]
()
at
Microsoft.VisualStudio.Composition.ExportProvider.GetExportedValue
[T] ()
at
Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetService
[T] ()
at
Microsoft.PythonTools.PythonToolsService..ctor(IServiceContainer
container)
at
Microsoft.PythonTools.PythonToolsPackage.Initialize()
at
Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.
Interop.IVs Package.SetSite(IServiceProvider sp)</description>
<guid>{6DBD7C1E-1F1B-496D-AC7C-C55DAE66C783}</guid>
<hr>80131500</hr> <errorinfo></errorinfo>
I de-installed/re-installed VS 2015 Python support (directly from PTVS 2.2.4 VS 2015.msi). Same error.
What to do? The Machine (Win 10) has Python 2.7/x64 in PATH.
There seems to be a real problem for other too. See here:
Visual Studio Python Environments window does not display
Interestingly, I have two similar dev machines (Win10/x64), both installed recently, both have VS 2013Pro + VS2015 Community installed. On one box, everything works fine, on the other: see above.
Had the same issue.
Visual Studio 2015 Update 3, PTVS 2.2.4
Resolved it by:
Closing VS
Clearing the content of C:\Users\YOUR_USERNAME\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache folder. * notice the YOUR_USERNAME and replace it with your actual username to get the local path.
Relaunching VS.
Hope this helps
Delete the contents from the following folders:
C:\Users{user}\AppData\Local\Microsoft\VisualStudio
C:\Users{user}\AppData\Local\Microsoft\VSCommon
and run Visual Studio 2015 again:
[x64] C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
[x86] C:\Program Files\Microsoft Visual Studio 14.0\Common7\IDE
It seems like they fixed these issues in PTVS 2.2.5: github.com/Microsoft/PTVS/issues/1411 and github.com/Microsoft/PTVS/issues/1415
Control Panel/Uninstall change
Select VS2015, click change
Once the dialog builds, select modify, then select Python tools.
Done.

MSB4018 The "ResolveComReference" task failed unexpectedly

I am currently trying to upgrade our c++ mfc solution from visual studio 2010 to a visual studio 2013 solution. When i try to build it i get the error MSB4018 The "ResolveComReference" task failed unexpectedly. I enabled fusion logging and this is what it tells me:
=== Pre-bind state information ===
LOG: DisplayName = System
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: System | Domain ID: 1
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/Program Files (x86)/MSBuild/12.0/bin/
LOG: Initial PrivatePath = NULL
Calling assembly : Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. ===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Program Files (x86)\MSBuild\12.0\bin\MSBuild.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Program Files (x86)/MSBuild/12.0/bin/System.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/MSBuild/12.0/bin/System/System.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/MSBuild/12.0/bin/System.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/MSBuild/12.0/bin/System/System.EXE.
I understand that msbuild has been moved, but i dont understand why it is trying to find System.dll in the msbuild path, how can i make it look for it in its proper location?
Edit:
I have now also tried upgrading to visual studio 2012 which worked without bigger problems and I did not run into the same problem. However i noticed that when running devenv /upgrade (with vs2013) it seems to completely change everything under vc++ directories (it stayed unchanged when upgrading to vs2012). Could this have something to do with this issue?
Edit2:
Tried to build the project in vs2013 after upgrading it to 2012 (without running devenv /upgrade), this also didnt work so I guess the problem is not related to that...
After enabling diagonostic build output i found that it was 3 broken COM references in the project that where failing to load. Removing these references solved the building issue. These where only showing up as warnings in vs2010 but resulted in MSB4018 in vs 2013 for some reason.
This is your problem:
LOG: Appbase = file:///C:/Program Files (x86)/MSBuild/12.0/bin/
Fix the base folder in your build system if you really need it to point to another filder. However it would probably be better to redo you build system targeting 2013 instead of patching the 2010 version.