-
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
--fix-analyzers
is broken on .NET 6
#1433
Comments
--fix-analyzers
is broken on Linux--fix-analyzers
is broken on .NET 6
@LorianColtof A newer dotent-format 6.x ships in the .NET 6 SDK. You can read our announcement at #1268. |
I have the same issue with the integrated
Doesn't matter if I run it on a clean machine or with an already successfully built project, the result is the same Is there anything I can do to work around this? |
@LevYas Can you run with the |
@JoeRobich I can surely run it with the My project is not open-source, so if the output will not be helpful, we will need to figure something out. |
Having the same issue with Here's the repository: https://github.com/GGG-KILLER/Loretta |
I had the same issue when running command:
Seems to work if you use the following:
|
The issue in my case is running |
I think this is related to #23972 |
Hello @JoeRobich has there been any progress in this? I've been trying to use the PublicAPI analyzer together with some source generators and this bug is making the PublicAPI analyzer unusable since I can't use code fixes from the VS UI. |
@GGG-KILLER Your issue is resolved in the latest 6.x builds. Need to get the main branch updated with #1473 before the 7.x build is working. |
Oh ok, thank you! I'll give it a try then! |
@JoeRobich, I've checked out the branch Had the same exception as before:
Repository: https://github.com/TheGreatSageEqualToHeaven/Loretta |
@GGG-KILLER When you run |
The SDK being resolved is 7.0.0-preview.1.22076.8:
|
@GGG-KILLER Thanks for the updates. Upon reviewing the changes in the release/6.x branch we were still behind the 6.0.200 SDK. I've been busy getting the channel subscriptions updated. Task list:
cc: @jmarolf |
A workaround until new SDKs are released would be to install dotnet-format as a global tool and invoke it with If you are only using .NET 6 SDKs: If you are previewing .NET 7 SDKs: |
I've installed the version for .NET 7 SDKs and can confirm it is working now. Thank you very much! |
Am I reading the last comment right, that there will be no fix in an upcoming .NET 6.x SDK (like some upcoming 6.0.300 SDK) and it'll be only in .NET 7? |
What @JoeRobich said was that while a new version of .NET 6 or .NET 7 (whichever you're using) isn't released (with the fix for this issue), you can use the commands they've provided to get a version of dotnet-format with the fix. At least this is my understanding of it. |
I can confirm @JoeRobich 's workaround worked for me: dotnet tool install -g dotnet-format --version "6.*" --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json then dotnet-format -v |
@JoeRobich I believe everything for this issue is resolved except for releasing a new version of the global tool on nuget.org. |
Do we now if the fix will be in SDK 6.0.202? I used the provided workaround for now to run it manually (loving |
@LorianColtof #1519 was closed and .NET 6.0.202 SDK has been released |
@JoeRobich @jmarolf Should this issue be closed now? |
Shows the following error:
Steps to reproduce:
mkdir TestProject cd TestProject dotnet new console dotnet new tool-manifest dotnet tool install dotnet-format dotnet tool run dotnet-format --fix-analyzers
Tested on .NET 6.0 Debian and Alpine Docker images
EDIT: Also seems to be broken on Windows (tested in
6.0-nanoserver-20H2
Docker image)The text was updated successfully, but these errors were encountered: