Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
4 changes: 3 additions & 1 deletion .github/workflows/pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
matrix:
configuration: [Debug, Release]
framework: [net8.0, net6.0, netstandard2.0]
framework: [net9.0,net8.0,netstandard2.0]
outputs:
version: ${{ steps.minver-calculate.outputs.version }}
steps:
Expand Down Expand Up @@ -189,6 +189,8 @@ jobs:

- name: Install .NET
uses: codebeltnet/install-dotnet@v1
with:
includePreview: true

- name: Restore Dependencies
uses: codebeltnet/dotnet-restore@v2
Expand Down
9 changes: 8 additions & 1 deletion .nuget/Codebelt.Extensions.Xunit.App/PackageReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
Version 8.4.0
Version 9.0.0
Availability: .NET 9 and .NET 8

# ALM
- CHANGED Dependencies to latest and greatest with respect to TFMs
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip

Codebase Verification

Update outdated package references and remove legacy framework support.

The dependency updates are mostly correct for .NET 8 and 9, but there are some issues that need attention:

  1. Update the following xUnit-related packages to their latest stable versions:

    • Xunit.Priority (currently 1.1.6)
    • xunit.extensibility.core (currently 2.9.0)
    • xunit.assert (currently 2.9.0)
    • xunit.abstractions (currently 2.0.3)
  2. Remove or update the project using very old Microsoft.Extensions.* packages (version 2.1.1). This appears to be targeting an outdated framework (netstandard2.0) which is not compatible with .NET 8 or 9.

  3. Ensure all projects are targeting only .NET 8 and/or .NET 9, removing any references to older frameworks.

Please make these updates to ensure full compatibility with .NET 8 and 9, and to take advantage of the latest features and bug fixes in the xUnit packages.

Analysis chain

Verify the dependency updates.

Updating the dependencies to align with the new TFMs is a necessary step when transitioning to a new .NET version. Please ensure that all the dependencies have been updated to the latest versions compatible with .NET 9 and .NET 8.

Run the following script to verify the dependency updates:

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that all the dependencies have been updated to the latest versions compatible with .NET 9 and .NET 8.

# Test: Search for outdated dependencies in the project files. Expect: No results.
rg --type csproj $'<PackageReference Include=".+" Version="[0-8]\.' 

Length of output: 99


Script:

#!/bin/bash
# Description: Find .csproj files and search for potentially outdated package references

# Find .csproj files and search for package references with versions < 9
fd -e csproj -x rg -i '<PackageReference Include=".+" Version="[0-8]\.' {}

# Additionally, let's check the contents of the .csproj files to see the target frameworks
fd -e csproj -x cat {}

Length of output: 8704

- REMOVED Support for TFM .NET 6 (LTS)

Version 8.4.0
Availability: .NET 8 and .NET 6

# ALM
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
Version 8.4.0
Version 9.0.0
Availability: .NET 9 and .NET 8

# ALM
- CHANGED Dependencies to latest and greatest with respect to TFMs
- REMOVED Support for TFM .NET 6 (LTS)

Version 8.4.0
Availability: .NET 8 and .NET 6

# ALM
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
Version 8.4.0
Version 9.0.0
Availability: .NET 9, .NET 8 and .NET Standard 2.0

# ALM
- CHANGED Dependencies to latest and greatest with respect to TFMs
- REMOVED Support for TFM .NET 6 (LTS)

Version 8.4.0
Availability: .NET 8, .NET 6 and .NET Standard 2.0

# ALM
Expand Down
9 changes: 8 additions & 1 deletion .nuget/Codebelt.Extensions.Xunit/PackageReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
Version 8.4.0
Version 9.0.0
Availability: .NET 9, .NET 8 and .NET Standard 2.0

# ALM
- CHANGED Dependencies to latest and greatest with respect to TFMs
- REMOVED Support for TFM .NET 6 (LTS)

Version 8.4.0
Availability: .NET 8, .NET 6 and .NET Standard 2.0

# ALM
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ For more details, please refer to `PackageReleaseNotes.txt` on a per assembly ba
> [!NOTE]
> Changelog entries prior to version 8.4.0 was migrated from previous versions of Cuemon.Extensions.Xunit, Cuemon.Extensions.Xunit.Hosting, and Cuemon.Extensions.Xunit.Hosting.AspNetCore.

## [9.0.0] - TBD

This major release is first and foremost focused on ironing out any wrinkles that have been introduced with .NET 9 preview releases so the final release is production ready together with the official launch from Microsoft.

## [8.4.0] - 2024-09-15

### Added
Expand Down
8 changes: 4 additions & 4 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</PropertyGroup>

<PropertyGroup Condition="'$(IsTestProject)' == 'false'">
<TargetFrameworks>net8.0;net6.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net9.0;net8.0;netstandard2.0</TargetFrameworks>
<Copyright>Copyright © Geekle 2024. All rights reserved.</Copyright>
<Authors>gimlichael</Authors>
<Company>Geekle</Company>
Expand All @@ -38,7 +38,7 @@
</PropertyGroup>

<ItemGroup Condition="'$(NuGetPackageRoot)' != ''">
<SourceRoot Include="$(NuGetPackageRoot)" RepositoryUrl="https://github.com/codebeltnet/xuni" />
<SourceRoot Include="$(NuGetPackageRoot)" RepositoryUrl="https://github.com/codebeltnet/xunit" />
</ItemGroup>

<ItemGroup Condition="'$(IsTestProject)' == 'false'">
Expand All @@ -49,11 +49,11 @@
</ItemGroup>

<PropertyGroup Condition="'$(IsTestProject)' == 'true' AND '$(IsLinux)' == 'true'">
<TargetFrameworks>net8.0;net6.0</TargetFrameworks>
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup Condition="'$(IsTestProject)' == 'true' AND '$(IsWindows)' == 'true'">
<TargetFrameworks>net8.0;net6.0;net48</TargetFrameworks>
<TargetFrameworks>net9.0;net8.0;net48</TargetFrameworks>
</PropertyGroup>

<PropertyGroup Condition="'$(IsTestProject)' == 'true'">
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Provides a focused API for unit-testing specific types of .NET projects.

Provides a convenient set of default API additions for unit-testing various types of .NET projects.

### Contributing to Extensions for xUnit API by Codebelt
### Contributing to `Extensions for xUnit API by Codebelt`
Contributions are welcome!
Feel free to submit issues, feature requests, or pull requests to help improve this library.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net6.0</TargetFrameworks>
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>
<ProjectGuid>250bdf91-e7c7-4cb4-a39d-e1a5374c5602</ProjectGuid>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.IO;
using System.Threading.Tasks;
using Cuemon;
using Cuemon.Collections.Generic;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Hosting.StaticWebAssets;
Expand Down Expand Up @@ -40,7 +41,7 @@ public AspNetCoreHostFixture()
public override void ConfigureHost(Test hostTest)
{
Validator.ThrowIfNull(hostTest);
Validator.ThrowIfNotContainsType(hostTest, nameof(hostTest), $"{nameof(hostTest)} is not assignable from AspNetCoreHostTest<T>.", typeof(AspNetCoreHostTest<>));
Validator.ThrowIfNotContainsType(hostTest, Arguments.ToArrayOf(typeof(AspNetCoreHostTest<>)), $"{nameof(hostTest)} is not assignable from AspNetCoreHostTest<T>.");

var hb = new HostBuilder()
.ConfigureWebHost(webBuilder =>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net6.0</TargetFrameworks>
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>
<ProjectGuid>200bdf91-e7c7-4cb4-a39d-e1a5374c5602</ProjectGuid>
<SonarQubeTestProject>false</SonarQubeTestProject>
</PropertyGroup>
Expand All @@ -15,17 +15,17 @@
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('net8'))">
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="8.0.8" />
<ItemGroup Condition="$(TargetFramework.StartsWith('net9'))">
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="9.0.0-rc.1.24452.1" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('net6'))">
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="6.0.33" />
<ItemGroup Condition="$(TargetFramework.StartsWith('net8'))">
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="8.0.8" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Cuemon.Extensions.DependencyInjection" Version="8.3.2" />
<PackageReference Include="Cuemon.IO" Version="8.3.2" />
<PackageReference Include="Cuemon.Extensions.DependencyInjection" Version="9.0.0-preview.5" />
<PackageReference Include="Cuemon.IO" Version="9.0.0-preview.5" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@
<PackageTags>host-test class-fixture host-fixture microsoft dependency injection host configuration hosting-environment service-provider configure-services</PackageTags>
</PropertyGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('net9'))">
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.0-rc.1.24431.7" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0-rc.1.24431.7" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.0-rc.1.24431.7" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="9.0.0-rc.1.24431.7" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0-rc.1.24431.7" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('net8'))">
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
Expand All @@ -18,14 +26,6 @@
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('net6'))">
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('netstandard2'))">
<PackageReference Include="Microsoft.Extensions.Hosting" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.1.1" />
Expand Down
3 changes: 2 additions & 1 deletion src/Codebelt.Extensions.Xunit.Hosting/HostFixture.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.IO;
using Cuemon;
using Cuemon.Collections.Generic;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
Expand Down Expand Up @@ -35,7 +36,7 @@ public HostFixture()
public virtual void ConfigureHost(Test hostTest)
{
Validator.ThrowIfNull(hostTest);
Validator.ThrowIfNotContainsType(hostTest, nameof(hostTest), $"{nameof(hostTest)} is not assignable from HostTest<T>.", typeof(HostTest<>));
Validator.ThrowIfNotContainsType(hostTest, Arguments.ToArrayOf(typeof(HostTest<>)), $"{nameof(hostTest)} is not assignable from HostTest<T>.");

var hb = new HostBuilder()
.UseContentRoot(Directory.GetCurrentDirectory())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Cuemon.Core" Version="8.3.2" />
<PackageReference Include="Cuemon.Core" Version="9.0.0-preview.5" />
<PackageReference Include="xunit.assert" Version="2.9.0" />
<PackageReference Include="xunit.abstractions" Version="2.0.3" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net6.0</TargetFrameworks>
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>
<RootNamespace>Codebelt.Extensions.Xunit.Hosting.AspNetCore</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Cuemon.AspNetCore" Version="8.3.2" />
<PackageReference Include="Cuemon.Extensions.IO" Version="8.3.2" />
<PackageReference Include="Cuemon.AspNetCore" Version="9.0.0-preview.5" />
<PackageReference Include="Cuemon.Extensions.IO" Version="9.0.0-preview.5" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion testenvironments.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{
"name": "Docker-Ubuntu",
"type": "docker",
"dockerImage": "gimlichael/ubuntu-testrunner:net6.0.424-net8.0.303"
"dockerImage": "gimlichael/ubuntu-testrunner:net6.0.425-net8.0.401-9.0.100-rc.1.24452.12"
}
]
}