Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS 2017 An exception was thrown while initializing part "GitFlowVS.Extension.GitFlowActionSection" #83

Open
brianthielagilethought opened this issue Mar 8, 2019 · 3 comments

Comments

@brianthielagilethought
Copy link

On a new installation of Visual Studio 2017 (after the update), I get the following error when opening the GitFlow window for the first time:

Microsoft.VisualStudio.Composition.CompositionFailedException: An exception was thrown while initializing part "GitFlowVS.Extension.GitFlowActionSection". ---> System.ArgumentException: String cannot be of zero length.
Parameter name: oldValue
at System.String.ReplaceInternal(String oldValue, String newValue)
at System.String.Replace(String oldValue, String newValue)
at GitFlow.VS.GitFlowWrapper.<>c__DisplayClass37_0.b__1(Branch b)
at System.Linq.Enumerable.WhereSelectListIterator2.MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)
at GitFlow.VS.GitFlowWrapper.GetAllBranchesThatStartsWithConfigPrefix(String config)
at GitFlow.VS.GitFlowWrapper.get_AllFeatures()
at GitFlowVS.Extension.ViewModels.ActionViewModel.get_AllFeatures()
at GitFlowVS.Extension.ViewModels.ActionViewModel.set_ShowFinishFeature(Visibility value)
at GitFlowVS.Extension.ViewModels.ActionViewModel..ctor(GitFlowActionSection te)
at GitFlowVS.Extension.GitFlowActionSection..ctor()
--- End of inner exception stack trace ---
at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.CreateValue()
at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.Create()
at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState)
at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)
at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()
at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass53_0.b__0()
at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass55_0.b__1()
at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass54_0.b__0()
at Microsoft.VisualStudio.Composition.DelegateServices.<>c__DisplayClass2_01.<As>b__0() at System.ComponentModel.Composition.ExportFactory1.CreateExport()
at Microsoft.VisualStudio.Composition.NetFxAdapters.MefV1ExportProvider.ComposablePartDefinitionForExportFactory.CreatePart()
at System.ComponentModel.Composition.ReflectionModel.ExportFactoryCreator.LifetimeContext.GetExportLifetimeContextFromExport[T](Export export)
at System.ComponentModel.Composition.ReflectionModel.ExportFactoryCreator.<>c__DisplayClass6_02.<CreateStronglyTypedExportFactoryOfTM>b__0() at System.ComponentModel.Composition.ExportFactory1.CreateExport()
at Microsoft.TeamFoundation.Controls.WPF.TeamExplorer.Framework.TeamExplorerSectionHost.Create()

@neilmiddleton-klaw
Copy link

+1 consistently getting this too on VS 15.9.8, 15.9.9 and 15.9.10

@wikiped
Copy link

wikiped commented Dec 26, 2019

On VS 16.4.2 as well.

@wikiped
Copy link

wikiped commented Jan 29, 2020

I appears the reason for this error was rooted in empty prefixes which were result of improper initialization of the working directory for whatever reason:

$ git flow init -d
Using default branch names.

How to name your supporting branch prefixes?
Feature branches? []
Bugfix branches? []
Release branches? []
Hotfix branches? []
Support branches? []
Version tag prefix? []
Hooks and filters directory? [/tmp/test/.git/hooks]

After updating git-flow to latest version 1.12.3 (AVH Edition) and running git flow init -f the problem was fixed. Default non-empty prefixes look like these:

How to name your supporting branch prefixes?
Feature branches? [feature/]
Bugfix branches? [bugfix/]
Release branches? [release/]
Hotfix branches? [hotfix/]
Support branches? [support/]

There is also a manual way to add prefixes to config desribed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants