MSBuildWorkspace should support traversal projects
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
I tried to pass dotnet format a `.proj` file (https://github.com/open-telemetry/opentelemetry-dotnet/blob/625f32f33ea3c0bad11d1cd6b756294dd44e46bd/OpenTelemetry.proj) but it returns an error because only `.sln` and `.csproj` files are supported:
> Could not format 'D:\Source\open-telemetry\OpenTelemetry.proj'. Format currently supports only C# and Visual Basic projects.
I tracked this down in the dotnet-format code to calls to `MSBuildWorkspace` `OpenSolutionAsync` & `OpenProjectAsync`. It seems `MSBuildWorkspace` doesn't support `.proj` files.
Just wondering, is there a reason for this?
The big $$ question: Why am I trying to use a `.proj` file?
We have a `.sln` but also lots of devs use other IDEs and don't care about it. It is common for things to not get added to the `.sln`. Using the `.proj` we can glob. So what I was hoping to do was make the CI invoking `dotnet format` resilient to people skipping the solution.
Contributor guide
Assessment
This issue has not been assessed yet.