Skip to content

Commit d6fb3ce

Browse files
bieluclaude
andauthored
build: migrate to slnx and central package management (#51)
* build: migrate to slnx and central package management - Replace AsyncAPI.sln with AsyncAPI.slnx (generated via `dotnet sln migrate`). - Add Directory.Packages.props and drop Version attributes from all src/test PackageReferences; versions are unchanged. - Opt the example projects out of CPM, since they float on published prerelease packages. - Point CI restore explicitly at AsyncAPI.slnx. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * build: bump SourceLink and Test SDK past vulnerable dependencies Microsoft.SourceLink.GitHub 8.0.0 pulled in Microsoft.Build.Tasks.Git 8.0.0 (GHSA-23fw-v26w-5fgq, moderate). Microsoft.NET.Test.Sdk 16.11.0 pulled in Newtonsoft.Json 9.0.1 (GHSA-5crp-9r3c-p9vr, high). dotnet list package --vulnerable now reports none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 6177244 commit d6fb3ce

11 files changed

Lines changed: 62 additions & 68 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
9.0.x
4949
10.0.x
5050
- name: Restore dependencies
51-
run: dotnet restore
51+
run: dotnet restore AsyncAPI.slnx
5252
- name: Build
5353
run: dotnet build --no-restore
5454
- name: Test

‎AsyncAPI.sln‎

Lines changed: 0 additions & 49 deletions
This file was deleted.

‎AsyncAPI.slnx‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<Solution>
2+
<Folder Name="/Solution Items/">
3+
<File Path=".editorconfig" />
4+
<File Path="Common.Build.props" />
5+
<File Path="Directory.Packages.props" />
6+
</Folder>
7+
<Project Path="src/ByteBard.AsyncAPI.Bindings/ByteBard.AsyncAPI.Bindings.csproj" />
8+
<Project Path="src/ByteBard.AsyncAPI.Readers/ByteBard.AsyncAPI.Readers.csproj" />
9+
<Project Path="src/ByteBard.AsyncAPI/ByteBard.AsyncAPI.csproj" />
10+
<Project Path="test/ByteBard.AsyncAPI.Tests/ByteBard.AsyncAPI.Tests.csproj" />
11+
</Solution>

‎Directory.Packages.props‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<Project>
2+
<PropertyGroup>
3+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
4+
</PropertyGroup>
5+
6+
<ItemGroup Label="Library">
7+
<PackageVersion Include="JsonPointer.Net" Version="5.3.1" />
8+
<PackageVersion Include="System.Text.Json" Version="9.0.1" />
9+
<PackageVersion Include="YamlDotNet" Version="13.0.1" />
10+
</ItemGroup>
11+
12+
<ItemGroup Label="Build">
13+
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="10.0.401" />
14+
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
15+
</ItemGroup>
16+
17+
<ItemGroup Label="Test">
18+
<PackageVersion Include="coverlet.collector" Version="3.1.2" />
19+
<PackageVersion Include="FluentAssertions" Version="7.0.0" />
20+
<PackageVersion Include="LiquidTestReports.Markdown" Version="1.0.9" />
21+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
22+
<PackageVersion Include="NUnit" Version="3.13.2" />
23+
<PackageVersion Include="NUnit3TestAdapter" Version="4.0.0" />
24+
<PackageVersion Include="ReportGenerator" Version="5.1.2" />
25+
</ItemGroup>
26+
</Project>

‎examples/ByteBard.AsyncAPI.Readers.JsonExample/ByteBard.AsyncAPI.Readers.JsonExample.csproj‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
<TargetFramework>net10.0</TargetFramework>
66
<ImplicitUsings>disable</ImplicitUsings>
77
<Nullable>enable</Nullable>
8+
<!-- Examples reference floating/prerelease published packages, so opt out of central package management. -->
9+
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
810
</PropertyGroup>
911

1012
<ItemGroup>

‎examples/ByteBard.AsyncAPI.Readers.YamlExample/ByteBard.AsyncAPI.Readers.YamlExample.csproj‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
<TargetFramework>net10.0</TargetFramework>
66
<ImplicitUsings>disable</ImplicitUsings>
77
<Nullable>enable</Nullable>
8+
<!-- Examples reference floating/prerelease published packages, so opt out of central package management. -->
9+
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
810
</PropertyGroup>
911

1012
<ItemGroup>

‎examples/ByteBard.AsyncAPI.Writers.Example/ByteBard.AsyncAPI.Writers.Example.csproj‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
<TargetFramework>net10.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
8+
<!-- Examples reference floating/prerelease published packages, so opt out of central package management. -->
9+
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
810
</PropertyGroup>
911

1012
<ItemGroup>

‎src/ByteBard.AsyncAPI.Bindings/ByteBard.AsyncAPI.Bindings.csproj‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
11+
<PackageReference Include="Microsoft.SourceLink.GitHub">
1212
<PrivateAssets>all</PrivateAssets>
1313
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1414
</PackageReference>
15-
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
15+
<PackageReference Include="StyleCop.Analyzers">
1616
<PrivateAssets>all</PrivateAssets>
1717
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1818
</PackageReference>

‎src/ByteBard.AsyncAPI.Readers/ByteBard.AsyncAPI.Readers.csproj‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="JsonPointer.Net" Version="5.3.1" />
13-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
12+
<PackageReference Include="JsonPointer.Net" />
13+
<PackageReference Include="Microsoft.SourceLink.GitHub">
1414
<PrivateAssets>all</PrivateAssets>
1515
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1616
</PackageReference>
17-
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
17+
<PackageReference Include="StyleCop.Analyzers">
1818
<PrivateAssets>all</PrivateAssets>
1919
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2020
</PackageReference>
21-
<PackageReference Include="System.Text.Json" Version="9.0.1" Condition="'$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netstandard2.1'" />
22-
<PackageReference Include="YamlDotNet" Version="13.0.1" />
21+
<PackageReference Include="System.Text.Json" Condition="'$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netstandard2.1'" />
22+
<PackageReference Include="YamlDotNet" />
2323
</ItemGroup>
2424

2525
<ItemGroup>

‎src/ByteBard.AsyncAPI/ByteBard.AsyncAPI.csproj‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
11+
<PackageReference Include="Microsoft.SourceLink.GitHub">
1212
<PrivateAssets>all</PrivateAssets>
1313
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1414
</PackageReference>
15-
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
15+
<PackageReference Include="StyleCop.Analyzers">
1616
<PrivateAssets>all</PrivateAssets>
1717
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1818
</PackageReference>
19-
<PackageReference Include="System.Text.Json" Version="9.0.1" Condition="'$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netstandard2.1'" />
19+
<PackageReference Include="System.Text.Json" Condition="'$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netstandard2.1'" />
2020

2121
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
2222
<_Parameter1>$(MSBuildProjectName).Tests</_Parameter1>

0 commit comments

Comments
 (0)