-
Notifications
You must be signed in to change notification settings - Fork 660
Closed as not planned
Closed as not planned
Copy link
Description
I am using GitVersion for the first time, and exploring the various options available in gitversion init
.
Choosing 5) Branch Increment mode (per commit/after tage) (Current: ) always results in a System.InvlidOperationException
being throw, and the GitVersion process crashes and exits.
This problem is reproducible in 100% of various attempts with GitVersion 5.1.2.
Repro steps
- Execute
gitversion init
from repository root. - Choose option 5)
Result
GitVersion init will guide you through setting GitVersion up to work for you
Which would you like to change?
0) Save changes and exit
1) Exit without saving
2) Run getting started wizard
3) Set next version number
4) Branch specific configuration
5) Branch Increment mode (per commit/after tag) (Current: )
6) Assembly versioning scheme (Current: )
7) Setup build scripts
> 5
ERROR [12/02/19 16:49:00:95] An unexpected error occurred:
System.InvalidOperationException: A suitable constructor for type 'GitVersion.Configuration.Init.SetConfig.GlobalModeSetting' could not be located. Ensure the type is concrete and services are registered for all parameters of a public constructor.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, Type serviceType, Type implementationType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, Type serviceType, CallSiteChain callSiteChain, Int32 slot)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(Type serviceType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateCallSite(Type serviceType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.<>c__DisplayClass7_0.<GetCallSite>b__0(Type type)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(Type serviceType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.CreateServiceAccessor(Type serviceType)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
at GitVersion.Configuration.Init.Wizard.ConfigInitStepFactory.CreateStep[T]()
at GitVersion.Configuration.Init.EditConfigStep.HandleResult(String result, Queue`1 steps, Config config, String workingDirectory)
at GitVersion.Configuration.Init.Wizard.ConfigInitWizardStep.Apply(Queue`1 steps, Config config, String workingDirectory)
at GitVersion.Configuration.Init.Wizard.ConfigInitWizard.Run(Config config, String workingDirectory)
at GitVersion.Configuration.ConfigProvider.Init(String workingDirectory)
at GitVersion.GitVersionExecutor.VerifyArgumentsAndRun(Arguments arguments)
INFO [12/02/19 16:49:00:95]
INFO [12/02/19 16:49:00:95] Attempting to show the current git graph (please include in issue):
INFO [12/02/19 16:49:00:95] Showing max of 100 commits
INFO [12/02/19 16:49:01:38] * 689f1b7 72 seconds ago (HEAD -> master, develop)
INFO [12/02/19 16:48:46:22] Working directory: C:\Dev\Kortext\GitMigration\test-repoINFO [12/02/19 16:48:46:23] IsDynamicGitRepository: FalseINFO [12/02/19 16:48:46:42] Returning Project Root from DotGitDirectory: C:\Dev\Kortext\GitMigration\test-repo\.git\ - C:\Dev\Kortext\GitMigration\test-repo\ERROR [12/02/19 16:49:00:95] An unexpected error occurred:
System.InvalidOperationException: A suitable constructor for type 'GitVersion.Configuration.Init.SetConfig.GlobalModeSetting' could not be located. Ensure the type is concrete and services are registered for all parameters of a public constructor.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, Type serviceType, Type implementationType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, Type serviceType, CallSiteChain callSiteChain, Int32 slot)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(Type serviceType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateCallSite(Type serviceType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.<>c__DisplayClass7_0.<GetCallSite>b__0(Type type)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(Type serviceType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.CreateServiceAccessor(Type serviceType)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
at GitVersion.Configuration.Init.Wizard.ConfigInitStepFactory.CreateStep[T]()
at GitVersion.Configuration.Init.EditConfigStep.HandleResult(String result, Queue`1 steps, Config config, String workingDirectory)
at GitVersion.Configuration.Init.Wizard.ConfigInitWizardStep.Apply(Queue`1 steps, Config config, String workingDirectory)
at GitVersion.Configuration.Init.Wizard.ConfigInitWizard.Run(Config config, String workingDirectory)
at GitVersion.Configuration.ConfigProvider.Init(String workingDirectory)
at GitVersion.GitVersionExecutor.VerifyArgumentsAndRun(Arguments arguments)INFO [12/02/19 16:49:00:95] INFO [12/02/19 16:49:00:95] Attempting to show the current git graph (please include in issue): INFO [12/02/19 16:49:00:95] Showing max of 100 commitsINFO [12/02/19 16:49:01:38] * 689f1b7 72 seconds ago (HEAD -> master, develop)