Skip to content

Commit 2e5a191

Browse files
committed
feat: Add .slnx solution format metadata generation support (dotnet#10540)
* feat: add `.slnx` solution format (Requires .NET 9 or later) * chore: fix ci error of plantuml test
1 parent 6e8edee commit 2e5a191

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

Directory.Packages.props

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@
2525
<PackageVersion Include="YamlDotNet" Version="15.3.0" />
2626
</ItemGroup>
2727

28+
<!-- .slnx solution format is supported Microsoft.Build 17.13.9 or later. -->
29+
<ItemGroup>
30+
<PackageVersion Include="Microsoft.Build" Version="[17.11.4]" Condition="'$(TargetFramework)' == 'net8.0'"/>
31+
<PackageVersion Include="Microsoft.Build" Version="17.13.9" Condition="'$(TargetFramework)' != 'net8.0'"/>
32+
</ItemGroup>
33+
2834
<ItemGroup>
2935
<PackageVersion Include="Microsoft.CodeAnalysis" Version="4.12.0" />
3036
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="4.12.0" />

src/Docfx.Dotnet/Docfx.Dotnet.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
<PackageReference Include="OneOf" />
3232
<PackageReference Include="OneOf.SourceGenerator" PrivateAssets="All" />
3333
<PackageReference Include="Markdig" />
34+
<PackageReference Include="Microsoft.Build" />
3435
<PackageReference Include="Microsoft.CodeAnalysis" />
3536
<PackageReference Include="Microsoft.CodeAnalysis.Common" />
3637
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic" />

src/Docfx.Dotnet/FileInformation.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ private static FileType GetFileType(string filePath)
4848
case ".sln":
4949
case ".slnf":
5050
return FileType.Solution;
51+
52+
case ".slnx":
53+
#if NET9_0_OR_GREATER
54+
return FileType.Solution;
55+
#else
56+
return FileType.NotSupported;
57+
#endif
58+
5159
case ".csproj":
5260
case ".vbproj":
5361
return FileType.Project;

0 commit comments

Comments
 (0)