Skip to content

Commit

Permalink
feat: Add .slnx solution format metadata generation support (dotnet…
Browse files Browse the repository at this point in the history
…#10540)

* feat: add `.slnx` solution format (Requires .NET 9 or later)

* chore: fix ci error of plantuml test
  • Loading branch information
filzrev committed Feb 18, 2025
1 parent 6e8edee commit 2e5a191
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
<PackageVersion Include="YamlDotNet" Version="15.3.0" />
</ItemGroup>

<!-- .slnx solution format is supported Microsoft.Build 17.13.9 or later. -->
<ItemGroup>
<PackageVersion Include="Microsoft.Build" Version="[17.11.4]" Condition="'$(TargetFramework)' == 'net8.0'"/>
<PackageVersion Include="Microsoft.Build" Version="17.13.9" Condition="'$(TargetFramework)' != 'net8.0'"/>
</ItemGroup>

<ItemGroup>
<PackageVersion Include="Microsoft.CodeAnalysis" Version="4.12.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="4.12.0" />
Expand Down
1 change: 1 addition & 0 deletions src/Docfx.Dotnet/Docfx.Dotnet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<PackageReference Include="OneOf" />
<PackageReference Include="OneOf.SourceGenerator" PrivateAssets="All" />
<PackageReference Include="Markdig" />
<PackageReference Include="Microsoft.Build" />
<PackageReference Include="Microsoft.CodeAnalysis" />
<PackageReference Include="Microsoft.CodeAnalysis.Common" />
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic" />
Expand Down
8 changes: 8 additions & 0 deletions src/Docfx.Dotnet/FileInformation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ private static FileType GetFileType(string filePath)
case ".sln":
case ".slnf":
return FileType.Solution;

case ".slnx":
#if NET9_0_OR_GREATER
return FileType.Solution;
#else
return FileType.NotSupported;
#endif

case ".csproj":
case ".vbproj":
return FileType.Project;
Expand Down

0 comments on commit 2e5a191

Please sign in to comment.