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

[ISSUE]: dotnet build fails after GitVersion.MsBuild nuget package added to C# project #4157

Closed
2 tasks done
anyfreenick opened this issue Aug 12, 2024 · 2 comments
Closed
2 tasks done
Labels
Milestone

Comments

@anyfreenick
Copy link

anyfreenick commented Aug 12, 2024

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.0.1

Operating system

Windows

What are you seeing?

I have a console app, target framework - .NET8.0.
I've added nuget package - GitVersion.MsBuild - version 6.0.1
Now I try to build my by typing in console - dotnet build and getting the following error:

C:\Users\<user_name>\SRC\C#\CSVParser.NET> dotnet build
  Determining projects to restore...
  All projects are up-to-date for restore.
  Possible reasons for this include:
    * You misspelled a built-in dotnet command.
    * You intended to execute a .NET program, but dotnet---roll-forward does not exist.
  Could not execute because the specified command or file was not found.
    * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
C:\Users\<user_name>\.nuget\packages\gitversion.msbuild\6.0.1\tools\GitVersion.MsBuild.targets(18,9): error MSB3073: The command "dotnet --roll-forward Major "C:\Users\<user_name>\.nuget\packages\gitversion.msbuild\6.0.1\tools\gitversion.dll" "C:\Users\<user_name>\SRC\C#\CSVParser.NET\CSVParser.NET"  -output file -outputfile "obj\gitversion.json"" exited with code 1. [C:\Users\<user_name>\SRC\C#\CSVParser.NET\CSVParser.NET\CSVParser.NET.csproj]
Build FAILED.
C:\Users\<user_name>\.nuget\packages\gitversion.msbuild\6.0.1\tools\GitVersion.MsBuild.targets(18,9): error MSB3073: The command "dotnet --roll-forward Major "C:\Users\<user_name>\.nuget\packages\gitversion.msbuild\6.0.1\tools\gitversion.dll" "C:\Users\<user_name>\SRC\C#\CSVParser.NET\CSVParser.NET"  -output file -outputfile "obj\gitversion.json"" exited with code 1. [C:\Users\<user_name>\SRC\C#\CSVParser.NET\CSVParser.NET\CSVParser.NET.csproj]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:01.73

As I found out the file C:\Users\<user_name>\.nuget\packages\gitversion.msbuild\6.0.1\tools\gitversion.dll does not exist
It exists at net6.0 and net8.0 subfolders under *C:\Users\<user_name>\.nuget\packages\gitversion.msbuild\6.0.1\tools* folder

What is expected?

Build successful

Steps to Reproduce

  1. Create console project using Visual Studio, Select target framework .NET8.0
  2. Add nuget package GitVersion.MsBuild, version 6.0.1
  3. Run dotnet build from solution folder

RepositoryFixture Test

No response

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

No response

@arturcic
Copy link
Member

duplicate of #4148

@arturcic arturcic added this to the 6.x milestone Aug 12, 2024
@arturcic arturcic added bug and removed needs triage labels Aug 12, 2024
@arturcic arturcic modified the milestones: 6.x, 6.0.2 Aug 12, 2024
@arturcic
Copy link
Member

🎉 This issue has been resolved in version 6.0.2 🎉
The release is available on:

Your GitReleaseManager bot 📦🚀

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

No branches or pull requests

2 participants