-
Notifications
You must be signed in to change notification settings - Fork 172
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
dotnet format does not respect the .NET install location #1925
Comments
@CollinAlpert I would recommend setting DOTNET_ROOT to the directory where you keep your installation. |
We've seen the same issue in .NET 8 on Linux. We had to disable related tests in 8.0 source-build due to this issue. We are setting I see that
7.0 version of @Forgind it appears that this was regressed with microsoft/MSBuildLocator#161 |
We ship in the SDK and could save ourselves this hassle, if we used a relative path to the MSBuild libraries. The CLI should invoke the dotnet-format from the correct SDK with regards to global.json pinning. |
That seems like a best long-term solution for |
You're correct that I didn't take into account DOTNET_ROOT when I made that PR. I made a follow-up here that should resolve that issue. Thanks for diagnosing this! |
I manage my own .NET installations and have the
dotnet
command aliased to the directory where I keep my installations. This works perfectly fordotnet run
,dotnet build
,dotnet pack
etc. When runningdotnet format
however, I get the following error message:I am using macOS 13.4.1 with an M1 Pro.
The text was updated successfully, but these errors were encountered: