dotnet / dotnet/format

Dotnet format cannot find MSBuild on SDK 7.0.101

Open
#1,785 21 comments 8 reactions 1 assignee Claimed by @RikkiGibson View on GitHub
Dominant language
No language data
Stars
1.9k
Forks
173
Avg merge
10d 13h
Merged PRs (30d)
1

Description

It fails with the error message `Unable to locate MSBuild. Ensure the .NET SDK was installed with the official installer.`.

Steps to reproduce:

```
> docker run --rm -it mcr.microsoft.com/dotnet/sdk:7.0.101-alpine3.17 sh
/ # mkdir /tmp/test
/ # cd /tmp/test
/tmp/test # dotnet new console
The template "Console App" was created successfully.

Processing post-creation actions...
Restoring /tmp/test/test.csproj:
Determining projects to restore...
Restored /tmp/test/test.csproj (in 83 ms).
Restore succeeded.

/tmp/test # dotnet format
Unable to locate MSBuild. Ensure the .NET SDK was installed with the official installer.
```

Output of `dotnet format --version`:
`7.0.352902+f7beff0efdb20b8f22516d310279204a3fa9ef50`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.