Skip to content
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] CSharpFormattingCodeFixProvider and CSharpRemoveUnnecessaryImportsCodeFixProvider code fixes fail with .NET 9 preview 3 #40174

Open
martincostello opened this issue Apr 15, 2024 · 3 comments
Labels
Area-Format untriaged Request triage from a team member

Comments

@martincostello
Copy link
Member

Describe the bug

Running dotnet format for .NET 9 preview 3 outputs errors similar to the following:

Failed to apply code fix CSharpRemoveUnnecessaryImportsCodeFixProvider for IDE0005: Unable to load one or more of the requested types.
Method not found: 'Boolean Microsoft.CodeAnalysis.IParameterSymbol.get_IsParamsArray()'.

To Reproduce

  1. Clone martincostello/dotnet-bumper@0560615.
  2. Run dotnet format from the root of the repostory.

Exceptions (if any)

dotnet format
Failed to apply code fix CSharpFormattingCodeFixProvider for IDE0055: Unable to load one or more of the requested types.
Method not found: 'Boolean Microsoft.CodeAnalysis.IParameterSymbol.get_IsParamsArray()'.
Failed to apply code fix CSharpFormattingCodeFixProvider for IDE0055: Unable to load one or more of the requested types.
Method not found: 'Boolean Microsoft.CodeAnalysis.IParameterSymbol.get_IsParamsArray()'.
Failed to apply code fix CSharpFormattingCodeFixProvider for IDE0055: Unable to load one or more of the requested types.
Method not found: 'Boolean Microsoft.CodeAnalysis.IParameterSymbol.get_IsParamsArray()'.
Failed to apply code fix CSharpFormattingCodeFixProvider for IDE0055: Unable to load one or more of the requested types.
Method not found: 'Boolean Microsoft.CodeAnalysis.IParameterSymbol.get_IsParamsArray()'.
Failed to apply code fix CSharpFormattingCodeFixProvider for IDE0055: Unable to load one or more of the requested types.
Method not found: 'Boolean Microsoft.CodeAnalysis.IParameterSymbol.get_IsParamsArray()'.
Failed to apply code fix CSharpFormattingCodeFixProvider for IDE0055: Unable to load one or more of the requested types.
Method not found: 'Boolean Microsoft.CodeAnalysis.IParameterSymbol.get_IsParamsArray()'.
Failed to apply code fix CSharpFormattingCodeFixProvider for IDE0055: Unable to load one or more of the requested types.
Method not found: 'Boolean Microsoft.CodeAnalysis.IParameterSymbol.get_IsParamsArray()'.

Further technical details

.NET SDK 9.0.100-preview.3.24204.13

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Request triage from a team member label Apr 15, 2024
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@martincostello
Copy link
Member Author

Maybe a dependency issue related to this: dotnet/roslyn#71816

@bertenbobje
Copy link

bertenbobje commented May 16, 2024

This issue is happening for me as well when I update to .NET SDK 8.0.300.
Downgrading back to 8.0.205 solves it.

Opened a new issue (dotnet/roslyn#73508)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Format untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

3 participants