TfsPendingChangesMargin
TfsPendingChangesMargin copied to clipboard
Extension crashing if specflow .feature file is opened in Visual Studio 2015 RC
Extension is crashing when opening a specflow .feature file is opened in Visual Studio 2015 RC.
https://github.com/techtalk/SpecFlow
Microsoft.CSharp.RuntimeBinder.RuntimeBinderInternalCompilerException: An unexpected exception occurred while binding a dynamic operation at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.Bind(DynamicMetaObjectBinder payload, IEnumerable1 parameters, DynamicMetaObject[] args, DynamicMetaObject& deferredBinding) at Microsoft.CSharp.RuntimeBinder.BinderHelper.Bind(DynamicMetaObjectBinder action, RuntimeBinder binder, IEnumerable
1 args, IEnumerable1 arginfos, DynamicMetaObject onBindingError) at Microsoft.CSharp.RuntimeBinder.CSharpConvertBinder.FallbackConvert(DynamicMetaObject target, DynamicMetaObject errorSuggestion) at System.Dynamic.DynamicMetaObject.BindConvert(ConvertBinder binder) at System.Dynamic.ConvertBinder.Bind(DynamicMetaObject target, DynamicMetaObject[] args) at System.Dynamic.DynamicMetaObjectBinder.Bind(Object[] args, ReadOnlyCollection
1 parameters, LabelTarget returnLabel) at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite1 site, Object[] args) at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0) at AlekseyNagovitsyn.TfsPendingChangesMargin.MarginCore..ctor(IWpfTextView textView, ITextDocumentFactoryService textDocumentFactoryService, SVsServiceProvider vsServiceProvider, IEditorFormatMapService formatMapService, IScrollMapFactoryService scrollMapFactoryService) at AlekseyNagovitsyn.TfsPendingChangesMargin.MarginCoreFactory.<>c__DisplayClass1.<GetMarginCore>b__0() at Microsoft.VisualStudio.Utilities.PropertyCollection.GetOrCreateSingletonProperty[T](Object key, Func
1 creator) at AlekseyNagovitsyn.TfsPendingChangesMargin.MarginCoreFactory.GetMarginCore(IWpfTextViewHost textViewHost) at AlekseyNagovitsyn.TfsPendingChangesMargin.ScrollbarMarginFactory.CreateMargin(IWpfTextViewHost textViewHost, IWpfTextViewMargin marginContainer) at Microsoft.VisualStudio.Text.Utilities.ContainerMargin.<AddMargins>b__25_1(IWpfTextViewMarginProvider mp) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InstantiateExtension[TExtension,TMetadata,TExtensionInstance](Object errorSource, Lazy2 provider, Func
2 getter)
This is happening to me simply when running VS 2015 RTM.
I do have the Specflow extension installed, and a few .feature
files in the project, but the extension was crashing during a clean load of the project, without me opening any files
I don't have Specflow extension. While opening files, VS 2015 RTM won't crash. just shows errors happen, log in ActivityLog.xml. I've seen two kind of exceptions, one is the original, the other is following:
Microsoft.CSharp.RuntimeBinder.RuntimeBinderInternalCompilerException: An unexpected exception occurred while binding a dynamic operation at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.Bind(DynamicMetaObjectBinder payload, IEnumerable'1 parameters, DynamicMetaObject[] args, DynamicMetaObject& deferredBinding) at Microsoft.CSharp.RuntimeBinder.BinderHelper.Bind(DynamicMetaObjectBinder action, RuntimeBinder binder, IEnumerable'1 args, IEnumerable'1 arginfos, DynamicMetaObject onBindingError) at Microsoft.CSharp.RuntimeBinder.CSharpConvertBinder.FallbackConvert(DynamicMetaObject target, DynamicMetaObject errorSuggestion) at System.Dynamic.DynamicMetaObject.BindConvert(ConvertBinder binder) at System.Dynamic.ConvertBinder.Bind(DynamicMetaObject target, DynamicMetaObject[] args) at System.Dynamic.DynamicMetaObjectBinder.Bind(Object[] args, ReadOnlyCollection'1 parameters, LabelTarget returnLabel) at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite'1 site, Object[] args) at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0) at AlekseyNagovitsyn.TfsPendingChangesMargin.MarginCore..ctor(IWpfTextView textView, ITextDocumentFactoryService textDocumentFactoryService, SVsServiceProvider vsServiceProvider, IEditorFormatMapService formatMapService, IScrollMapFactoryService scrollMapFactoryService) at AlekseyNagovitsyn.TfsPendingChangesMargin.MarginCoreFactory.<>c__DisplayClass1.<GetMarginCore>b__0() at Microsoft.VisualStudio.Utilities.PropertyCollection.GetOrCreateSingletonProperty[T](Object key, Func'1 creator) at AlekseyNagovitsyn.TfsPendingChangesMargin.MarginCoreFactory.GetMarginCore(IWpfTextViewHost textViewHost) at AlekseyNagovitsyn.TfsPendingChangesMargin.EditorMarginFactory.CreateMargin(IWpfTextViewHost textViewHost, IWpfTextViewMargin marginContainer) at Microsoft.VisualStudio.Text.Utilities.ContainerMargin.<AddMargins>b__25_1(IWpfTextViewMarginProvider mp) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InstantiateExtension[TExtension,TMetadata,TExtensionInstance](Object errorSource, Lazy'2 provider, Func'2 getter)
The only difference to original post is ScrollbarMarginFactory
change to ScrollbarMarginFactory
.
Disable TfsPendingChangesMargin solve this problem.
Here is a release that works with 2015.
The issue had nothing to do with SpecFlow
Can you give us the installer? I don't have Visual Studio Extensibility Tools installed so can't build the solution.
I feel dumb. My apologies, as soon as i get to that machine I will upload the visx to the release page linked above
Here is a better version thanks to @mika76
Not sure about better, all I did was to replace references with vs2015 ones. Should do a pull request? I have no idea what effect it'll have with 2013 though...
What you did is better as you fixed a number of dll's. I only switched one It will not work with 2013 as far as my testing goes
One tip though - you used paths that are unique to your computer.
It might be better to use C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions
- or whatever is relevant to a given dll
- as the starting path
Cool. I added it using the GUI so didn't even think about it really. Did you test it with vs2013?
Oh I misread your previous comment. You did test and it will not work. I guess there will have to be 2 releases? I read somewhere Microsoft want to release these dll's as a nuget package.
I don't remember hearing something about nuget's. But yes until such a time that such packages are released there will need to be two releases of the extension
Hmm found this conversation and then the packages here
So who tries them? me or you?
Also do you know specifically which packages we need?
I can try no problem but it's late here currently so I will have a sleep and try in the morning :smile:
Not sure - but it'll be trial-by-error I suppose
Great. Thank you. I'll be around tomorrow if there is any help I can give
Tried it. All references are supplied except for TeamFoundationServerExt - can't seem to find that class anywhere...
Which of the four packages did you add?
Maybe you can commit the changes and I can download the files from your fork?
I asked the question on stack overflow and there's an interesting discussion going on...
Check out NuGet Package Explorer. In general it is a great tool. Either way, it's either a hard coded path to VS install location or reg key lookup The advantage of the registry lookup solution is that you only need one visx? Otherwise - if you install the extension for vs2015 then the dll's should be there no? So I see no issue with having the path hardcoded (per the path I suggested above)