Provide an Escape Hatch for SolutionProjectType.KnownToBeMSBuildFormat
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 141
Description
### The Short
There should be some type of escape hatch to allow new project system types to be detected as `Solution.KnownToBeMSBuildFormat` the current system of getting on the blessed list probably is not the most efficient way to do things: https://github.com/dotnet/msbuild/blob/d39f2e4f5f3d461bc456f9abed9adec4a2f0f542/src/Build/Construction/Solution/SolutionFile.cs#L1278-L1290
### The Long
A bunch of tooling, both inside and outside of Microsoft leverage code similar to the following:
```csharp
SolutionFile.Parse("Solution.sln")
.ProjectsInOrder
.Where(p => p.ProjectType == SolutionProjectType.KnownToBeMSBuildFormat)
```
Right, wrong, or whatever, the die has been cast.
For various ISV's that have extended the Project System, unless you're willing to dump a PR on Microsoft (like we had our ISV do here: https://github.com/dotnet/msbuild/pull/5698) you are outta luck.
As more and more tooling starts to crop up which has this expectation a lot of people are going to get a bunch of undefined behavior unless they're smart enough to realize what is going on.
See the following:
* https://github.com/NuGet/Home/issues/10307#issuecomment-738505272
* https://github.com/dotnet/msbuild/issues/5159
We have been encountering this as we push forward with attempting `/graphBuild` internally, and while we got a PR accepted that fixed our projects, how do we help the next guy? I am sure there are more than just the list above.
One solution is to try and have an "escape hatch", historically this would have been something like a Registry key, however with the transition into a more platform agnostic MSBuild this probably has fallen out of favor. What is the best possible solution that gives people the ability to register themselves as an `SolutionProjectType.KnownToBeMSBuildFormat` short of making the if check any longer?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.