Skip to content

Commit

Permalink
Update to Net 9.0 & bump to version 2.3.0-beta.1
Browse files Browse the repository at this point in the history
  • Loading branch information
xaviersolau committed Nov 20, 2024
1 parent c4c222a commit a1f9e9a
Show file tree
Hide file tree
Showing 21 changed files with 110 additions and 79 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.402
dotnet-version: 9.0.100
- name: Install dependencies
run: dotnet restore
- name: Build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.402
dotnet-version: 9.0.100
- name: Install dependencies
run: dotnet restore
- name: Build
Expand Down
54 changes: 27 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ It also provides:
[![Build - CI](https://github.com/xaviersolau/CodeQuality/actions/workflows/build-ci.yml/badge.svg)](https://github.com/xaviersolau/CodeQuality/actions/workflows/build-ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)

| Package | Nuget.org |
|-----------------------------------------|-----------|
|**SoloX.CodeQuality.Prod** |[![NuGet Beta](https://img.shields.io/nuget/vpre/SoloX.CodeQuality.Prod.svg)](https://www.nuget.org/packages/SoloX.CodeQuality.Prod)
|**SoloX.CodeQuality.Test** |[![NuGet Beta](https://img.shields.io/nuget/vpre/SoloX.CodeQuality.Test.svg)](https://www.nuget.org/packages/SoloX.CodeQuality.Test)
|**SoloX.CodeQuality.Playwright** |[![NuGet Beta](https://img.shields.io/nuget/vpre/SoloX.CodeQuality.Playwright.svg)](https://www.nuget.org/packages/SoloX.CodeQuality.Playwright)
|**SoloX.CodeQuality.Test.Helpers** |[![NuGet Beta](https://img.shields.io/nuget/vpre/SoloX.CodeQuality.Test.Helpers.svg)](https://www.nuget.org/packages/SoloX.CodeQuality.Test.Helpers)
|**SoloX.CodeQuality.Test.Helpers.XUnit** |[![NuGet Beta](https://img.shields.io/nuget/vpre/SoloX.CodeQuality.Test.Helpers.XUnit.svg)](https://www.nuget.org/packages/SoloX.CodeQuality.Test.Helpers.XUnit)
|**SoloX.CodeQuality.Test.Helpers.NUnit** |[![NuGet Beta](https://img.shields.io/nuget/vpre/SoloX.CodeQuality.Test.Helpers.NUnit.svg)](https://www.nuget.org/packages/SoloX.CodeQuality.Test.Helpers.NUnit)
|**SoloX.CodeQuality.WebHost** |[![NuGet Beta](https://img.shields.io/nuget/vpre/SoloX.CodeQuality.WebHost.svg)](https://www.nuget.org/packages/SoloX.CodeQuality.WebHost)
| Package | Nuget.org | Pre-release |
|-----------------------------------------|-----------|-------------|
|**SoloX.CodeQuality.Prod** |[![NuGet Beta](https://img.shields.io/nuget/v/SoloX.CodeQuality.Prod.svg)](https://www.nuget.org/packages/SoloX.CodeQuality.Prod) |[![NuGet Beta](https://img.shields.io/nuget/vpre/SoloX.CodeQuality.Prod.svg)](https://www.nuget.org/packages/SoloX.CodeQuality.Prod)
|**SoloX.CodeQuality.Test** |[![NuGet Beta](https://img.shields.io/nuget/v/SoloX.CodeQuality.Test.svg)](https://www.nuget.org/packages/SoloX.CodeQuality.Test) |[![NuGet Beta](https://img.shields.io/nuget/vpre/SoloX.CodeQuality.Test.svg)](https://www.nuget.org/packages/SoloX.CodeQuality.Test)
|**SoloX.CodeQuality.Playwright** |[![NuGet Beta](https://img.shields.io/nuget/v/SoloX.CodeQuality.Playwright.svg)](https://www.nuget.org/packages/SoloX.CodeQuality.Playwright) |[![NuGet Beta](https://img.shields.io/nuget/vpre/SoloX.CodeQuality.Playwright.svg)](https://www.nuget.org/packages/SoloX.CodeQuality.Playwright)
|**SoloX.CodeQuality.Test.Helpers** |[![NuGet Beta](https://img.shields.io/nuget/v/SoloX.CodeQuality.Test.Helpers.svg)](https://www.nuget.org/packages/SoloX.CodeQuality.Test.Helpers) |[![NuGet Beta](https://img.shields.io/nuget/vpre/SoloX.CodeQuality.Test.Helpers.svg)](https://www.nuget.org/packages/SoloX.CodeQuality.Test.Helpers)
|**SoloX.CodeQuality.Test.Helpers.XUnit** |[![NuGet Beta](https://img.shields.io/nuget/v/SoloX.CodeQuality.Test.Helpers.XUnit.svg)](https://www.nuget.org/packages/SoloX.CodeQuality.Test.Helpers.XUnit) |[![NuGet Beta](https://img.shields.io/nuget/vpre/SoloX.CodeQuality.Test.Helpers.XUnit.svg)](https://www.nuget.org/packages/SoloX.CodeQuality.Test.Helpers.XUnit)
|**SoloX.CodeQuality.Test.Helpers.NUnit** |[![NuGet Beta](https://img.shields.io/nuget/v/SoloX.CodeQuality.Test.Helpers.NUnit.svg)](https://www.nuget.org/packages/SoloX.CodeQuality.Test.Helpers.NUnit) |[![NuGet Beta](https://img.shields.io/nuget/vpre/SoloX.CodeQuality.Test.Helpers.NUnit.svg)](https://www.nuget.org/packages/SoloX.CodeQuality.Test.Helpers.NUnit)
|**SoloX.CodeQuality.WebHost** |[![NuGet Beta](https://img.shields.io/nuget/v/SoloX.CodeQuality.WebHost.svg)](https://www.nuget.org/packages/SoloX.CodeQuality.WebHost) |[![NuGet Beta](https://img.shields.io/nuget/vpre/SoloX.CodeQuality.WebHost.svg)](https://www.nuget.org/packages/SoloX.CodeQuality.WebHost)

## License and credits

Expand Down Expand Up @@ -52,26 +52,26 @@ You can checkout this Github repository or you can use the NuGet package:

**Install using the command line from the Package Manager:**
```bash
Install-Package SoloX.CodeQuality.Prod -version 2.2.2
Install-Package SoloX.CodeQuality.Prod -version 2.3.0-beta.1
or
Install-Package SoloX.CodeQuality.Test -version 2.2.2
Install-Package SoloX.CodeQuality.Test -version 2.3.0-beta.1
```

**Install using the .Net CLI:**
```bash
dotnet add package SoloX.CodeQuality.Prod --version 2.2.2
dotnet add package SoloX.CodeQuality.Prod --version 2.3.0-beta.1
or
dotnet add package SoloX.CodeQuality.Test --version 2.2.2
dotnet add package SoloX.CodeQuality.Test --version 2.3.0-beta.1
```

**Install editing your project file (csproj):**
```xml
<PackageReference Include="SoloX.CodeQuality.Prod" Version="2.2.2">
<PackageReference Include="SoloX.CodeQuality.Prod" Version="2.3.0-beta.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
or
<PackageReference Include="SoloX.CodeQuality.Test" Version="2.2.2">
<PackageReference Include="SoloX.CodeQuality.Test" Version="2.3.0-beta.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down Expand Up @@ -218,17 +218,17 @@ You can checkout this Github repository or use the NuGet package:

**Install using the command line from the Package Manager:**
```bash
Install-Package SoloX.CodeQuality.Playwright -version 2.2.2
Install-Package SoloX.CodeQuality.Playwright -version 2.3.0-beta.1
```

**Install using the .Net CLI:**
```bash
dotnet add package SoloX.CodeQuality.Playwright --version 2.2.2
dotnet add package SoloX.CodeQuality.Playwright --version 2.3.0-beta.1
```

**Install editing your project file (csproj):**
```xml
<PackageReference Include="SoloX.CodeQuality.Playwright" Version="2.2.2" />
<PackageReference Include="SoloX.CodeQuality.Playwright" Version="2.3.0-beta.1" />
```

* * *
Expand Down Expand Up @@ -420,29 +420,29 @@ You can checkout this Github repository or you can use the NuGet package:

**Install using the command line from the Package Manager:**
```bash
Install-Package SoloX.CodeQuality.Test.Helpers -version 2.2.2
Install-Package SoloX.CodeQuality.Test.Helpers -version 2.3.0-beta.1

Install-Package SoloX.CodeQuality.Test.Helpers.XUnit -version 2.2.2
Install-Package SoloX.CodeQuality.Test.Helpers.XUnit -version 2.3.0-beta.1

Install-Package SoloX.CodeQuality.Test.Helpers.NUnit -version 2.2.2
Install-Package SoloX.CodeQuality.Test.Helpers.NUnit -version 2.3.0-beta.1
```

**Install using the .Net CLI:**
```bash
dotnet add package SoloX.CodeQuality.Test.Helpers --version 2.2.2
dotnet add package SoloX.CodeQuality.Test.Helpers --version 2.3.0-beta.1

dotnet add package SoloX.CodeQuality.Test.Helpers.XUnit --version 2.2.2
dotnet add package SoloX.CodeQuality.Test.Helpers.XUnit --version 2.3.0-beta.1

dotnet add package SoloX.CodeQuality.Test.Helpers.NUnit --version 2.2.2
dotnet add package SoloX.CodeQuality.Test.Helpers.NUnit --version 2.3.0-beta.1
```

**Install editing your project file (csproj):**
```xml
<PackageReference Include="SoloX.CodeQuality.Test.Helpers" Version="2.2.2" />
<PackageReference Include="SoloX.CodeQuality.Test.Helpers" Version="2.3.0-beta.1" />

<PackageReference Include="SoloX.CodeQuality.Test.Helpers.XUnit" Version="2.2.2" />
<PackageReference Include="SoloX.CodeQuality.Test.Helpers.XUnit" Version="2.3.0-beta.1" />

<PackageReference Include="SoloX.CodeQuality.Test.Helpers.NUnit" Version="2.2.2" />
<PackageReference Include="SoloX.CodeQuality.Test.Helpers.NUnit" Version="2.3.0-beta.1" />
```

* * *
Expand Down
2 changes: 1 addition & 1 deletion src/SharedProperties.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<Version>2.2.2</Version>
<Version>2.3.0-beta.1</Version>
<Authors>Xavier Solau</Authors>
<Copyright>Copyright © 2021 Xavier Solau</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Import Project="../../libs/SoloX.CodeQuality.Prod/build/SoloX.CodeQuality.Prod.targets" />

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>

<CodeQualityHeaderEnable>true</CodeQualityHeaderEnable>

Expand All @@ -21,7 +21,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Import Project="../../libs/SoloX.CodeQuality.Test/build/SoloX.CodeQuality.Test.targets" />

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>

<CodeQualityUpdateGitIgnore>true</CodeQualityUpdateGitIgnore>

Expand All @@ -17,7 +17,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

<Import Project="../../SharedProperties.props" />

<Import Project="../../libs/SoloX.CodeQuality.Prod/build/SoloX.CodeQuality.Prod.props" />
<Import Condition=" '$(TargetFramework)' == 'net9.0'" Project="../../libs/SoloX.CodeQuality.Prod/build/SoloX.CodeQuality.Prod.props" />

<Import Project="../../libs/SoloX.CodeQuality.Prod/build/SoloX.CodeQuality.Prod.targets" />
<Import Condition=" '$(TargetFramework)' == 'net9.0'" Project="../../libs/SoloX.CodeQuality.Prod/build/SoloX.CodeQuality.Prod.targets" />

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand All @@ -18,9 +18,16 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.12.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.8" />
<PackageReference Include="Microsoft.Playwright" Version="1.47.0" />
<PackageReference Include="FluentAssertions" Version="6.12.2" />
<PackageReference Include="Microsoft.Playwright" Version="1.48.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.11" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net9.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<DocumentationFile>$(OutputPath)$(MSBuildProjectName).xml</DocumentationFile>

<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisLevel>8.0</AnalysisLevel>
<AnalysisLevel>9.0</AnalysisLevel>

<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<!--<AnalysisMode>AllDisabledByDefault</AnalysisMode>-->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="../../SharedProperties.props" />

Expand All @@ -7,7 +7,7 @@
<Import Project="../../libs/SoloX.CodeQuality.Test/build/SoloX.CodeQuality.Test.targets" />

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>

<PackageId>SoloX.CodeQuality.Test.Helpers.NUnit</PackageId>

Expand All @@ -27,9 +27,18 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit" Version="4.2.2" />
</ItemGroup>


<ItemGroup Condition=" '$(TargetFramework)' == 'net9.0' ">
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="[8.0.0,9.0.0)" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="[8.0.0,9.0.0)" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
<PackageReference Include="xunit" Version="2.6.5" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0" />
<PackageReference Include="xunit" Version="2.9.2" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
<PackageReference Include="System.Net.Http.Json" Version="9.0.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<DocumentationFile>$(OutputPath)$(MSBuildProjectName).xml</DocumentationFile>

<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisLevel>8.0</AnalysisLevel>
<AnalysisLevel>9.0</AnalysisLevel>

<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<!--<AnalysisMode>AllDisabledByDefault</AnalysisMode>-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ dotnet_diagnostic.CA1032.severity = error
# CA1506: class coupling
dotnet_diagnostic.CA1506.severity = none

# CA1515: Consider making public types internal
dotnet_diagnostic.CA1515.severity = none

# CA1507: Utiliser nameof pour exprimer les noms de symboles
dotnet_diagnostic.CA1507.severity = error

Expand Down
2 changes: 1 addition & 1 deletion src/libs/SoloX.CodeQuality.WebHost/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace SoloX.CodeQuality.WebHost
{
public sealed class Program
internal sealed class Program
{
public static void Main(string[] args)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,23 @@
<Import Project="../../libs/SoloX.CodeQuality.Test/build/SoloX.CodeQuality.Test.targets" />

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>

<IsPackable>true</IsPackable>

<GeneratePackageOnBuild>true</GeneratePackageOnBuild>

</PropertyGroup>

<ItemGroup>
<Content Include="$(OutDir)\SoloX.CodeQuality.WebHost.deps.json" Link="Resources\SoloX.CodeQuality.WebHost.deps.json" Pack="true" PackagePath="resources\" Visible="False" />
<InternalsVisibleTo Include="SoloX.CodeQuality.Playwright" />
</ItemGroup>

<ItemGroup>
<Content Include="$(OutputPath)\net8.0\SoloX.CodeQuality.WebHost.deps.json" Link="Resources\net8.0\SoloX.CodeQuality.WebHost.deps.json" Pack="true" PackagePath="resources\net8.0\" Visible="False" />
<Content Include="$(OutputPath)\net9.0\SoloX.CodeQuality.WebHost.deps.json" Link="Resources\net9.0\SoloX.CodeQuality.WebHost.deps.json" Pack="true" PackagePath="resources\net9.0\" Visible="False" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Target Name="DeployWebHostDepsJsonFile" BeforeTargets="Build">

<ItemGroup>
<ResourceFile Include="$(MSBuildThisFileDirectory)..\resources\SoloX.CodeQuality.WebHost.deps.json" />
<ResourceFile Include="$(MSBuildThisFileDirectory)..\resources\$(TargetFramework)\SoloX.CodeQuality.WebHost.deps.json" />
</ItemGroup>

<Copy SourceFiles="@(ResourceFile)" DestinationFolder="$(OutputPath)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" />
<PackageReference Include="SoloX.CodeQuality.Playwright" Version="2.2.2" />
<PackageReference Include="SoloX.CodeQuality.Playwright" Version="2.3.0-beta.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Import Project="../../libs/SoloX.CodeQuality.Test/build/SoloX.CodeQuality.Test.targets" />

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand All @@ -26,10 +26,16 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" />
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down
Loading

0 comments on commit a1f9e9a

Please sign in to comment.