Skip to content

Commit ae75ca0

Browse files
authored
Adopt central package management and update references (#453)
* Adopt central package management and update references Introduces Directory.Packages.props for central NuGet package version management. Removes explicit version numbers from project files and Directory.build.props, updating them to use centrally managed versions. Cleans up test project references and deletes obsolete API approval test files. Updates solution file to include the new props file and reflect Visual Studio 18. * Update NUnit packages and fix nullable property casing Upgraded NUnit3TestAdapter to 5.2.0 and added NUnit.Analyzers 4.10.0 in package and build props. Also corrected the casing of the Nullable property in Fusillade.csproj to 'Enable' for consistency. * Enable preview C# features and nullable in projects Set <LangVersion> to 'preview' and <Nullable> to 'enable' in both Fusillade and Fusillade.Tests project files to allow use of upcoming C# features and enforce nullable reference types. * Update Directory.build.props * Update test dependencies and project metadata Added and updated several test-related package references, including ReactiveUI, System.Reactive, and NUnit packages. Updated project metadata to reference ReactiveUI and Contributors, and added repository and release notes URLs. * Update package versions and add test SDK reference Bumped Splat to 17.1.1 and Akavache.SystemTextJson to 11.4.1 in central package management. Added Microsoft.NET.Test.Sdk as a direct dependency in Fusillade.Tests.csproj to ensure test discovery and execution.
1 parent aa8bdb5 commit ae75ca0

8 files changed

+63
-160
lines changed

src/Directory.Packages.props

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
<PropertyGroup>
4+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
5+
</PropertyGroup>
6+
<ItemGroup>
7+
<!-- Central package versions -->
8+
<PackageVersion Include="punchclock" Version="4.0.2" />
9+
<PackageVersion Include="Splat" Version="17.1.1" />
10+
<PackageVersion Include="Akavache.SystemTextJson" Version="11.4.1" />
11+
<PackageVersion Include="ReactiveUI.Testing" Version="22.2.1" />
12+
<PackageVersion Include="ReactiveUI" Version="22.2.1" />
13+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
14+
<PackageVersion Include="NUnit" Version="4.4.0" />
15+
<PackageVersion Include="NUnit3TestAdapter" Version="5.2.0" />
16+
<PackageVersion Include="NUnit.Analyzers" Version="4.11.2" />
17+
<PackageVersion Include="Verify.NUnit" Version="30.10.0" />
18+
<PackageVersion Include="FluentAssertions" Version="8.8.0" />
19+
<PackageVersion Include="PublicApiGenerator" Version="11.4.6" />
20+
<PackageVersion Include="coverlet.msbuild" Version="6.0.4" />
21+
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
22+
<PackageVersion Include="Nerdbank.GitVersioning" Version="3.8.118" />
23+
<PackageVersion Include="stylecop.analyzers" Version="1.2.0-beta.556" />
24+
<PackageVersion Include="Roslynator.Analyzers" Version="4.14.0" />
25+
<PackageVersion Include="Microsoft.Reactive.Testing" Version="6.1.0" />
26+
<PackageVersion Include="System.Reactive" Version="6.1.0" />
27+
</ItemGroup>
28+
</Project>

src/Directory.build.props

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,43 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project>
33
<PropertyGroup>
4+
<Copyright>Copyright (c) ReactiveUI and Contributors</Copyright>
5+
<Authors>ReactiveUI and Contributors</Authors>
6+
<PackageProjectUrl>https://github.com/reactiveui/fusillade/</PackageProjectUrl>
7+
<PackageReleaseNotes>https://github.com/reactiveui/fusillade/releases</PackageReleaseNotes>
8+
<RepositoryUrl>https://github.com/reactiveui/fusillade</RepositoryUrl>
9+
410
<NoWarn>$(NoWarn);VSX1000</NoWarn>
511
<Platform>AnyCPU</Platform>
612
<IsTestProject>$(MSBuildProjectName.Contains('Tests'))</IsTestProject>
713
<RepositoryType>git</RepositoryType>
814
<GenerateDocumentationFile>true</GenerateDocumentationFile>
915
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)analyzers.ruleset</CodeAnalysisRuleSet>
1016
<DebugType>Embedded</DebugType>
11-
<Authors>.NET Foundation and Contributors</Authors>
12-
<Copyright>Copyright (c) .NET Foundation and Contributors</Copyright>
1317
<PackageIcon>main.png</PackageIcon>
1418
<PackageReadmeFile>README.md</PackageReadmeFile>
1519
<PackageLicenseExpression>MIT</PackageLicenseExpression>
16-
<!-- Optional: Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
1720
<PublishRepositoryUrl>true</PublishRepositoryUrl>
18-
<!-- Optional: Embed source files that are not tracked by the source control manager in the PDB -->
1921
<EmbedUntrackedSources>true</EmbedUntrackedSources>
20-
<!-- Optional: Include PDB in the built .nupkg -->
2122
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
22-
<!-- disable sourcelink on mono, to workaround https://github.com/dotnet/sourcelink/issues/155 -->
2323
<EnableNETAnalyzers>True</EnableNETAnalyzers>
2424
<AnalysisLevel>latest</AnalysisLevel>
25-
<LangVersion>preview</LangVersion>
2625
</PropertyGroup>
2726

2827
<ItemGroup Condition="'$(IsTestProject)' != 'true'">
29-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
28+
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
3029
</ItemGroup>
3130

32-
<ItemGroup Condition="'$(IsTestProject)' == 'true'">
33-
<PackageReference Include="ReactiveUI.Testing" Version="21.*" />
34-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
35-
<PackageReference Include="NUnit" Version="4.4.0" />
36-
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
37-
<PackageReference Include="Verify.NUnit" Version="30.10.0" />
38-
<PackageReference Include="FluentAssertions" Version="8.8.0" />
39-
<PackageReference Include="PublicApiGenerator" Version="11.4.6" />
40-
<PackageReference Include="coverlet.msbuild" Version="6.0.4" PrivateAssets="All" />
41-
</ItemGroup>
42-
4331
<ItemGroup>
44-
<None Include="$(MSBuildThisFileDirectory)..\images\main.png" Pack="true" PackagePath="\"/>
45-
<None Include="$(MSBuildThisFileDirectory)..\LICENSE" Pack="true" PackagePath="LICENSE" />
46-
<None Include="$(MSBuildThisFileDirectory)..\README.md" Pack="true" PackagePath="\" />
32+
<None Include="$(MSBuildThisFileDirectory)../images/main.png" Pack="true" PackagePath="/"/>
33+
<None Include="$(MSBuildThisFileDirectory)../LICENSE" Pack="true" PackagePath="LICENSE" />
34+
<None Include="$(MSBuildThisFileDirectory)../README.md" Pack="true" PackagePath="/" />
4735
</ItemGroup>
4836

4937
<ItemGroup>
50-
<PackageReference Include="Nerdbank.GitVersioning" Version="3.8.118" PrivateAssets="all" />
51-
<PackageReference Include="stylecop.analyzers" Version="1.2.0-beta.556" PrivateAssets="all" />
52-
<PackageReference Include="Roslynator.Analyzers" Version="4.14.0" PrivateAssets="All" />
38+
<PackageReference Include="Nerdbank.GitVersioning" PrivateAssets="all" />
39+
<PackageReference Include="stylecop.analyzers" PrivateAssets="all" />
40+
<PackageReference Include="Roslynator.Analyzers" PrivateAssets="All" />
5341
</ItemGroup>
5442

5543
<ItemGroup>

src/Fusillade.Tests/API/ApiApprovalTests.FusilladeTests.DotNet6_0.verified.txt

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

src/Fusillade.Tests/API/ApiApprovalTests.FusilladeTests.DotNet7_0.verified.txt

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

src/Fusillade.Tests/API/ApiApprovalTests.FusilladeTests.Net4_7.verified.txt

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

src/Fusillade.Tests/Fusillade.Tests.csproj

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,27 @@
44
<NoWarn>$(NoWarn);1591;CA1707;SA1633</NoWarn>
55
<IsPackable>false</IsPackable>
66
<NoWarn>$(NoWarn);CA2000;CA1031;CA1307;CA1305</NoWarn>
7+
<LangVersion>preview</LangVersion>
8+
<Nullable>enable</Nullable>
79
</PropertyGroup>
810

911
<ItemGroup>
10-
<ProjectReference Include="..\Fusillade\Fusillade.csproj" />
12+
<ProjectReference Include="../Fusillade/Fusillade.csproj" />
1113
</ItemGroup>
1214

1315
<ItemGroup>
14-
<PackageReference Include="Akavache.SystemTextJson" Version="11.1.1" />
16+
<PackageReference Include="Akavache.SystemTextJson" />
17+
<PackageReference Include="System.Reactive" />
18+
<PackageReference Include="Microsoft.Reactive.Testing" />
19+
<PackageReference Include="ReactiveUI" />
20+
<PackageReference Include="ReactiveUI.Testing" />
21+
<PackageReference Include="Microsoft.NET.Test.Sdk" />
22+
<PackageReference Include="NUnit" />
23+
<PackageReference Include="NUnit3TestAdapter" />
24+
<PackageReference Include="NUnit.Analyzers" PrivateAssets="All" />
25+
<PackageReference Include="Verify.NUnit" />
26+
<PackageReference Include="PublicApiGenerator" />
27+
<PackageReference Include="FluentAssertions" />
28+
<PackageReference Include="coverlet.msbuild" PrivateAssets="All" />
1529
</ItemGroup>
1630
</Project>

src/Fusillade.sln

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# 17
4-
VisualStudioVersion = 17.7.34031.279
3+
# Visual Studio Version 18
4+
VisualStudioVersion = 18.0.11205.157 d18.0
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Fusillade", "Fusillade\Fusillade.csproj", "{26493C47-6A4A-4F2A-9F92-046AA8CD95CC}"
77
EndProject
@@ -17,6 +17,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1717
..\CONTRIBUTING.md = ..\CONTRIBUTING.md
1818
Directory.build.props = Directory.build.props
1919
Directory.build.targets = Directory.build.targets
20+
Directory.Packages.props = Directory.Packages.props
2021
..\LICENSE = ..\LICENSE
2122
..\README.md = ..\README.md
2223
..\.github\workflows\release.yml = ..\.github\workflows\release.yml

src/Fusillade/Fusillade.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
<PropertyGroup>
33
<TargetFrameworks>netstandard2.0;net8.0;net9.0</TargetFrameworks>
44
<PackageId>fusillade</PackageId>
5+
<LangVersion>preview</LangVersion>
56
<Nullable>enable</Nullable>
67
<WarningsAsErrors>CS8625;CS8604;CS8600;CS8614;CS8603;CS8618;CS8619</WarningsAsErrors>
78
</PropertyGroup>
89

910
<ItemGroup>
10-
<PackageReference Include="punchclock" Version="4.0.2" />
11-
<PackageReference Include="Splat" Version="16.2.1" />
11+
<PackageReference Include="punchclock" />
12+
<PackageReference Include="Splat" />
1213
</ItemGroup>
1314
</Project>

0 commit comments

Comments
 (0)