Skip to content

[ISSUE]: Command 'gitversion /version' has finished with exit code  #4133

@kishorekumar-anchala

Description

@kishorekumar-anchala

Prerequisites

  • I have written a descriptive issue title
  • I have searched issues to ensure it has not already been reported

GitVersion package

GitVersion.MsBuild

GitVersion version

6.x

Operating system

Windows

What are you seeing?

Describing GitVersion
azure-arm.image: [-] gitversion is installed 2.3s (2.29s|5ms)
azure-arm.image: Command 'gitversion /version' has finished with exit code -532462766 and output:
azure-arm.image: Unhandled exception. System.IO.DirectoryNotFoundException: Cannot find the .git directory
azure-arm.image: at GitVersion.Git.GitRepositoryInfo.GetProjectRootDirectory() in //src/GitVersion.LibGit2Sharp/Git/GitRepositoryInfo.cs:line 88
azure-arm.image: at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) azure-arm.image: at System.Lazy1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
azure-arm.image: at System.Lazy1.CreateValue() azure-arm.image: at GitVersion.Git.GitRepositoryInfo.get_ProjectRootDirectory() in /_/src/GitVersion.LibGit2Sharp/Git/GitRepositoryInfo.cs:line 31 azure-arm.image: at GitVersion.Git.GitRepositoryInfo.GetGitRootPath() in /_/src/GitVersion.LibGit2Sharp/Git/GitRepositoryInfo.cs:line 96 azure-arm.image: at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode)
azure-arm.image: at System.Lazy1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) azure-arm.image: at System.Lazy1.CreateValue()
azure-arm.image: at GitVersion.Git.GitRepositoryInfo.get_GitRootPath() in /
/src/GitVersion.LibGit2Sharp/Git/GitRepositoryInfo.cs:line 30
azure-arm.image: at GitVersion.GitVersionLibGit2SharpModule.<>c.b__0_0(IServiceProvider sp) in //src/GitVersion.LibGit2Sharp/GitVersionLibGit2SharpModule.cs:line 16
azure-arm.image: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, RuntimeResolverContext context)
azure-arm.image: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) azure-arm.image: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) azure-arm.image: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
azure-arm.image: at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
azure-arm.image: at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
azure-arm.image: at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
azure-arm.image: at GitVersion.Program.Main(String[] args) in /
/src/GitVersion.App/Program.cs:line 18
azure-arm.image: at GitVersion.Program.

(String[] args)

What is expected?

It has to be fixed with 6.x

Steps to Reproduce

N/A

RepositoryFixture Test

N/A

Output log or link to your CI build (if appropriate).

azure-arm.image:           at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
    azure-arm.image:           at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
    azure-arm.image:           at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
    azure-arm.image:           at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
    azure-arm.image:           at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
    azure-arm.image:           at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
    azure-arm.image:           at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
    azure-arm.image:           at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
    azure-arm.image:           at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitIEnumerable(IEnumerableCallSite enumerableCallSite, RuntimeResolverContext context)
    azure-arm.image:           at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
    azure-arm.image:           at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
    azure-arm.image:           at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
    azure-arm.image:           at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
    azure-arm.image:           at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(ServiceIdentifier serviceIdentifier)
    azure-arm.image:           at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
    azure-arm.image:           at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope)
    azure-arm.image:           at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
    azure-arm.image:           at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
    azure-arm.image:           at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
    azure-arm.image:           at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
    azure-arm.image:           at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
    azure-arm.image:           at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
    azure-arm.image:           at GitVersion.Program.Main(String[] args) in /_/src/GitVersion.App/Program.cs:line 18
    azure-arm.image:           at GitVersion.Program.<Main>(String[] args)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions