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

Add support for solution filters (.slnf) #1431

Closed
boop5 opened this issue Mar 25, 2024 · 4 comments · Fixed by #1447
Closed

Add support for solution filters (.slnf) #1431

boop5 opened this issue Mar 25, 2024 · 4 comments · Fixed by #1447
Assignees

Comments

@boop5
Copy link

boop5 commented Mar 25, 2024

Product and Version Used:
Roslynator CLI

$ roslynator --version
0.8.4.0

Steps to Reproduce:
Try to use a .slnf (Solution Filter) with the fix command (probably all commands affected)

$ roslynator fix somefilter.slnf

Actual Behavior:
Command fails

Error message is in de-DE and means something like: ".slnf cant be matched to any language"

Error occurred while loading project 'somefilter.slnf'
System.InvalidOperationException: Projekt "somefilter.slnf" kann nicht geöffnet werden, da die Dateierweiterung ".slnf" keiner Sprache zugeordnet ist.
   at Microsoft.CodeAnalysis.MSBuild.DiagnosticReporter.Report(DiagnosticReportingMode mode, String message, Func`2 createException)
   at Microsoft.CodeAnalysis.MSBuild.ProjectFileLoaderRegistry.TryGetLoaderFromProjectPath(String projectFilePath, DiagnosticReportingMode mode, IProjectFileLoader& loader)
   at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.Worker.LoadProjectFileInfosAsync(String projectPath, DiagnosticReportingOptions reportingOptions, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.Worker.LoadProjectInfosFromPathAsync(String projectPath, DiagnosticReportingOptions reportingOptions, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.Worker.LoadAsync(CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.LoadProjectInfoAsync(String projectFilePath, ProjectMap projectMap, IProgress`1 progress, ILogger msbuildLogger, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.OpenProjectAsync(String projectFilePath, ILogger msbuildLogger, IProgress`1 progress, CancellationToken cancellationToken)
   at Roslynator.CommandLine.MSBuildWorkspaceCommand`1.OpenProjectOrSolutionAsync(String path, MSBuildWorkspace workspace, IProgress`1 progress, CancellationToken cancellationToken) in /_/src/CommandLine/Commands/MSBuildWorkspaceCommand.cs:line 242

Expected Behavior:
Command does not fail

@josefpihrt
Copy link
Collaborator

I agree that it should be possible to load slnf, but this issue should be filed to Roslyn repo. It's Roslyn code that is responsible for loading a project/solution.

@boop5
Copy link
Author

boop5 commented Apr 19, 2024

Alright. Took me a while but here it is dotnet/roslyn#73105

@boop5 boop5 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 19, 2024
@boop5
Copy link
Author

boop5 commented Apr 22, 2024

dotnet/roslyn#73105 (comment)

see the linked reply please @josefpihrt

@boop5 boop5 reopened this Apr 22, 2024
@josefpihrt
Copy link
Collaborator

My apologies, it's a bug. I'll fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants