Skip to content

[Bug] -output file -outputfile gitversion.json exited with code 1. #2993

Description

@ucapbba

Description of issue

I have added GitVersion.MsBuild.5.8.1to my GUI.csproj (contained in a Visual Studio 2017 solution with many projects). My .yml contains the line run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
which is run after push. Having added GitVersion I see (full paths reduced):

   "D:\a\GUI\GUI.csproj" (default target) (2) ->
   (RunGitVersion target) -> 
     D:\a\packages\GitVersion.MsBuild.5.8.1\tools\GitVersion.MsBuild.targets(9,9): error MSB3073: The command ""D:\a\packages\GitVersion.MsBuild.5.8.1\tools\net48/gitversion.exe" "D:\a\GUI" -output file -outputfile gitversion.json" exited with code 1. [D:\a\GUI\GUI.csproj]

Analysis

The line where error occurs in GitVersion.MsBuild.target is

Exec Command="$(GitVersionFileExe) "$(MSBuildProjectDirectory)" $(GitVersion_ToolArgments)"

I add my gitversion.json which appeared in my project folder after local build (I also tried adding to source control but I guess not required) , and my msbuild.yml and GUI.csproj used here:

gitversion - Copy.json.txt
msbuild - Copy.yml.txt
GUI - Copy.csproj.txt

Context

This is the first time I have used GitVersion. I installed using NuGet package and removed AssemblyInfo.cs from the .csproj. The repository is private, if useful I can add a user to assist.

I have been following here to try to understand the issue
https://gitversion.net/docs/usage/msbuild

Your Environment

VS 2017 / Net 4.8 / Windows 10 / GitVersion.MsBuild.5.8.1

Thankyou

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions