Dotnet format cannot find MSBuild on SDK 7.0.101
See original GitHub issueIt 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
Issue Analytics
- State:
- Created 9 months ago
- Reactions:8
- Comments:20 (2 by maintainers)
Top Results From Across the Web
dotnet format fails to locate msbuild · Issue #27332
Running dotnet format on a recent build from main fails with Unable to locate MSBuild. Ensure the .NET SDK was installed with the...
Read more >NETSDK1045: The current .NET SDK does not support ...
This error occurs when the build tools can't find the version of the .NET SDK that's needed to build a project. This is...
Read more >The SDK 'Microsoft.NET.Sdk' specified could not be found - ...
The compiler can not find the SDK. You need it installed togeher with the Compiler to make a build. Ideally you picked the...
Read more >Net Core/MSBuild Tooling not finding right version
Error : Version 3.1.401 of the .NET Core SDK requires at least version 16.7.0 of MSBuild. The current available version of MSBuild is...
Read more >Support for .NET SDK 7
I was able to resolve the issue "The current .NET SDK does not support targeting .NET 7.0". I don't know if this is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@craigktreasure i’ve tried with
7.0.103
and it results in the same problem 😦 it would be great to get some feedback from the dotnet devs, do we know they’re even aware of this issue?Still an issue on the 8.0-preview image as well:
Note that
7.0.200
has no Docker image published yet (see https://github.com/dotnet/dotnet-docker/discussions/4434), so can’t test behavior for that.