dotnet / roslynator

Roslynator is a set of code analysis tools for C#, powered by Roslyn.

Home Page:https://josefpihrt.github.io/docs/roslynator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for solution filters (.slnf)

boop5 opened this issue · comments

commented

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

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.

commented

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

commented

dotnet/roslyn#73105 (comment)

see the linked reply please @josefpihrt

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