Skip to content

[BUG]: Build fails if .NET 5 is not installed #2790

Description

@martincostello

What happened?

Trying to build octokit with build.ps1 fails if a .NET 5 SDK is not installed on the local system.

This is because the version of GitVersion.Tool used in the build targets .NET 5.

context.GitVersionToolPath = ToolInstaller.DotNetToolInstall(context, "GitVersion.Tool", "5.6.5", "dotnet-gitversion");

Versions

This repository as of 0238092.

Relevant log output

Calculating semantic version...
You must install or update .NET to run this application.

App: C:\Coding\octokit\octokit.net\tools\dotnet-gitversion.exe
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '5.0.0' (x64)
.NET location: C:\Program Files\dotnet

The following frameworks were found:
  6.0.22 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  7.0.11 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  8.0.0-rc.1.23419.4 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

Learn more:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=5.0.0&arch=x64&rid=win-x64&os=win10

----------------------------------------
Teardown
----------------------------------------
Error: GitVersion: Process returned an error (exit code -2147450730).

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: TriageThis is being looked at and prioritizedType: BugSomething isn't working as documented

    Type

    No type

    Projects

    Status
    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions