Hi am using GitVersion for bitbucket pipeline but the build is failing with this error
<span>Unhandled exception. GitVersion.WarningException: Could not parse command line parameter '/buildserver'. If it is the target path, make sure it exists.</span>
<span> at GitVersion.ArgumentParser.ParseTargetPath(Arguments arguments, String name, IReadOnlyList`1 values, String value, Boolean parseEnded) in D:\a\GitVersion\GitVersion\src\GitVersion.App\ArgumentParser.cs:line 190</span>
<span> at GitVersion.ArgumentParser.ParseArguments(String[] commandLineArguments) in D:\a\GitVersion\GitVersion\src\GitVersion.App\ArgumentParser.cs:line 86</span>
<span> at GitVersion.Program.<>c__DisplayClass4_0.<CreateHostBuilder>b__2(IServiceProvider sp) in D:\a\GitVersion\GitVersion\src\GitVersion.App\Program.cs:line 30</span>
<span> at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, RuntimeResolverContext context)</span>
<span> at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)</span>
<span> at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)</span>
<span> at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)</span>
<span> at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)</span>
<span> at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)</span>
<span> at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)</span>
<span> at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)</span>
<span> at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)</span>
<span> at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)</span>
<span> at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)</span>
<span> at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)</span>
<span> at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)</span>
<span> at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)</span>
<span> at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)</span>
<span> at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)</span>
<span> at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitIEnumerable(IEnumerableCallSite enumerableCallSite, RuntimeResolverContext context)</span>
<span> at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)</span>
<span> at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)</span>
<span> at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)</span>
<span> at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)</span>
<span> at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(Type serviceType)</span>
<span> at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)</span>
<span> at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)</span>
<span> at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)</span>
<span> at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)</span>
<span> at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)</span>
<span> at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)</span>
<span> at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)</span>
<span> at GitVersion.Program.Main(String[] args) in D:\a\GitVersion\GitVersion\src\GitVersion.App\Program.cs:line 15</span>
<span> at GitVersion.Program.<Main>(String[] args)</span><span>+ dotnet-gitversion /buildserver</span>
This is the pipeline file I am using
image: mcr.microsoft.com/dotnet/sdk:6.0
clone:
depth: full
pipelines:
default:
- step:
name: Version and build
script:
- export PATH="$PATH:/root/.dotnet/tools"
- dotnet tool install --global GitVersion.Tool --version 5.*
- dotnet-gitversion /buildserver
- source gitversion.properties
- echo Building with semver $GITVERSION_FULLSEMVER
- dotnet build