Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
e7d1a79
Adding .NET 10 support to unit and integration tests
WhitWaldo Oct 27, 2025
710220b
Adding .NET 10 to Directory.Build.props files throughout solution
WhitWaldo Oct 27, 2025
14546ef
Fixed reference version number
WhitWaldo Oct 27, 2025
57505d7
Updated Aspire hosting package number to latest
WhitWaldo Oct 27, 2025
b838463
Updated ASP.NET Core test packages to support .NET 10
WhitWaldo Oct 27, 2025
ab5f3a2
Modified deprecated WebHostBuilder to use HostBuilder instead
WhitWaldo Oct 27, 2025
b025f1a
Updated package TPMs
WhitWaldo Oct 27, 2025
0991123
Fixing flags to accommodate .NET9+
WhitWaldo Oct 27, 2025
f638a12
Adding .NET 10 target in pragma statements
WhitWaldo Oct 27, 2025
01cdb4a
Added support for .NET 10 in global.json
WhitWaldo Oct 27, 2025
c5b5802
Possible fix for reference assemblies mismatch for .NET 10
WhitWaldo Oct 27, 2025
8b8b3f4
Fixed another pragma statement
WhitWaldo Oct 27, 2025
32af627
Migrated all uses of WebHostBuilder to HostBuilder
WhitWaldo Oct 28, 2025
22f5003
Added pragma statement for .NET 10
WhitWaldo Oct 28, 2025
f686a76
Made all the changes I can until the new test package comes out
WhitWaldo Oct 28, 2025
1dbb406
Updated .NET 10 reference assemblies
WhitWaldo Nov 6, 2025
a22f781
Added .NET 10 install to build script
WhitWaldo Nov 6, 2025
af8c3b9
Installing .NET 10 across all test workflows
WhitWaldo Nov 6, 2025
e3514ee
Installing .NET 8, 9 and 10 during test workflows because of the glob…
WhitWaldo Nov 6, 2025
34695fa
Installing .NET 8, 9 and 10 during integration test workflows due to …
WhitWaldo Nov 6, 2025
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
18 changes: 13 additions & 5 deletions .github/workflows/itests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
dotnet-version: ['8.0', '9.0']
dotnet-version: ['8.0', '9.0', '10.0']
include:
- dotnet-version: '8.0'
display-name: '.NET 8.0'
Expand All @@ -22,14 +22,19 @@ jobs:
framework: 'net9'
prefix: 'net9'
install-version: '9.0.x'
- dotnet-version: '10.0'
display-name: '.NET 10.0'
framework: 'net10'
prefix: 'net10'
install-version: '10.0.x'
env:
NUPKG_OUTDIR: bin/Release/nugets
GOVER: 1.20.3
GOOS: linux
GOARCH: amd64
GOPROXY: https://proxy.golang.org
DAPR_CLI_VER: 1.15.2
DAPR_RUNTIME_VER: 1.16.0-rc.6
DAPR_CLI_VER: 1.16.0
DAPR_RUNTIME_VER: 1.16.1
DAPR_INSTALL_URL: https://raw.githubusercontent.com/dapr/cli/release-1.16/install/install.sh
DAPR_CLI_REF: ''
steps:
Expand Down Expand Up @@ -94,16 +99,19 @@ jobs:
dotnet-quality: 'ga' # Prefer a GA release, but use the RC if not available
- name: Setup .NET 8 (required)
uses: actions/setup-dotnet@v3
if: ${{ matrix.install-version != '8.0.x' }}
with:
dotnet-version: '8.0.x'
dotnet-quality: 'ga'
- name: Setup .NET 9 (required)
uses: actions/setup-dotnet@v3
if: ${{ matrix.install-version != '9.0.x' }}
with:
dotnet-version: '9.0.x'
dotnet-quality: 'ga'
- name: Setup .NET 10 (required)
uses: actions/setup-dotnet@v3
with:
dotnet-version: '10.0.x'
dotnet-quality: 'preview'
- name: Restore dependencies
run: dotnet restore
- name: Build
Expand Down
26 changes: 22 additions & 4 deletions .github/workflows/sdk_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,21 @@ jobs:
- uses: actions/checkout@v1
- name: Parse release version
run: python ./.github/scripts/get_release_version.py
- name: Setup .NET Core
- name: Setup .NET 8
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
dotnet-quality: 'ga'
- name: Setup .NET 9
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x
dotnet-quality: 'ga'
- name: Setup .NET 10
uses: actions/setup-dotnet@v3
with:
dotnet-version: 10.0.x
dotnet-quality: 'preview'
- name: Restore dependencies
run: dotnet restore
- name: Build
Expand All @@ -50,7 +60,7 @@ jobs:
strategy:
fail-fast: false
matrix:
dotnet-version: ['8.0', '9.0']
dotnet-version: ['8.0', '9.0', '10.0']
include:
- dotnet-version: '8.0'
display-name: '.NET 8.0'
Expand All @@ -62,6 +72,11 @@ jobs:
framework: 'net9'
prefix: 'net9'
install-version: '9.0.x'
- dotnet-version: '10.0'
display-name: '.NET 10.0'
framework: 'net10'
prefix: 'net10'
install-version: '10.0.x'
steps:
- uses: actions/checkout@v1
- name: Parse release version
Expand All @@ -73,16 +88,19 @@ jobs:
dotnet-quality: 'ga' # Prefer a GA release, but use the RC if not available
- name: Setup .NET 8 (required)
uses: actions/setup-dotnet@v3
if: ${{ matrix.install-version != '8.0.x' }}
with:
dotnet-version: '8.0.x'
dotnet-quality: 'ga'
- name: Setup .NET 9 (required)
uses: actions/setup-dotnet@v3
if: ${{ matrix.install-version != '9.0.x' }}
with:
dotnet-version: '9.0.x'
dotnet-quality: 'ga'
- name: Setup .NET 10 (required)
uses: actions/setup-dotnet@v3
with:
dotnet-version: '10.0.x'
dotnet-quality: 'preview'
- name: Build
# disable deterministic builds, just for test run. Deterministic builds break coverage for some reason
run: dotnet build --configuration release /p:GITHUB_ACTIONS=false
Expand Down
34 changes: 18 additions & 16 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
<PackageVersion Include="Grpc.Net.ClientFactory" Version="2.71.0" />
<PackageVersion Include="Grpc.Tools" Version="2.72.0" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.19" Condition="'$(TargetFramework)' == 'net8.0' Or '$(TargetFramework)' == 'net8'" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.8" Condition="'$(TargetFramework)' == 'net9.0' Or '$(TargetFramework)' == 'net9'" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.10" Condition="'$(TargetFramework)' == 'net9.0' Or '$(TargetFramework)' == 'net9'" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.0-rc.2.25502.107" Condition="'$(TargetFramework)' == 'net10.0' Or '$(TargetFramework)' == 'net10'" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="8.0.19" Condition="'$(TargetFramework)' == 'net8.0' Or '$(TargetFramework)' == 'net8'" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="9.0.8" Condition="'$(TargetFramework)' == 'net9.0' Or '$(TargetFramework)' == 'net9'" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="9.0.10" Condition="'$(TargetFramework)' == 'net9.0' Or '$(TargetFramework)' == 'net9'" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="10.0.0-rc.2.25502.107" Condition="'$(TargetFramework)' == 'net10.0' Or '$(TargetFramework)' == 'net10'" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="4.14.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="4.14.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.14.0" />
Expand All @@ -31,17 +33,17 @@
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing.XUnit" Version="1.1.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.14.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="4.14.0" />
<PackageVersion Include="Microsoft.Extensions.AI.Abstractions" Version="9.8.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="9.0.8" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.8" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.8" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.8" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="9.0.8" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.8" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="9.0.8" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="9.0.8" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="9.0.8" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageVersion Include="Microsoft.Extensions.AI.Abstractions" Version="9.10.1" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="10.0.0-rc.2.25502.107" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="10.0.0-rc.2.25502.107" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="10.0.0-rc.2.25502.107" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.0-rc.2.25502.107" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="10.0.0-rc.2.25502.107" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.0-rc.2.25502.107" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="10.0.0-rc.2.25502.107" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="10.0.0-rc.2.25502.107" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="10.0.0-rc.2.25502.107" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageVersion Include="MinVer" Version="6.0.0" />
<PackageVersion Include="Moq" Version="4.20.72" />
Expand All @@ -50,10 +52,10 @@
<PackageVersion Include="Serilog.Sinks.Console" Version="6.0.0" />
<PackageVersion Include="Serilog.Sinks.File" Version="7.0.0" />
<PackageVersion Include="Shouldly" Version="4.3.0" />
<PackageVersion Include="System.Net.ServerSentEvents" Version="9.0.8" />
<PackageVersion Include="System.Text.Json" Version="9.0.8" />
<PackageVersion Include="System.Net.ServerSentEvents" Version="9.0.10" />
<PackageVersion Include="System.Text.Json" Version="10.0.0-rc.2.25502.107" />
<PackageVersion Include="xunit" Version="2.9.3" />
<PackageVersion Include="xunit.extensibility.core" Version="2.9.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.4" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion examples/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="$(MSBuildThisFileDirectory)..\properties\dapr_managed_netcore.props" />

<PropertyGroup>
<TargetFrameworks>net8;net9</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<!-- Set Output Path for samples-->
<OutputPath>$(RepoRoot)bin\$(Configuration)\examples\$(MSBuildProjectName)\</OutputPath>

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

<ItemGroup>
<PackageReference Include="Dapr.AspNetCore" Version="1.15.4" />
<PackageReference Include="Dapr.AspNetCore" Version="1.16.0" />
</ItemGroup>

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

<Sdk Name="Aspire.AppHost.Sdk" Version="9.3.1"/>
<Sdk Name="Aspire.AppHost.Sdk" Version="9.5.2"/>

<PropertyGroup>
<OutputType>Exe</OutputType>
Expand All @@ -13,8 +13,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Aspire.Hosting.AppHost" Version="9.4.1" />
<PackageReference Include="CommunityToolkit.Aspire.Hosting.Dapr" Version="9.7.0" />
<PackageReference Include="Aspire.Hosting.AppHost" Version="9.5.2" />
<PackageReference Include="CommunityToolkit.Aspire.Hosting.Dapr" Version="9.8.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"_comment": "This policy allows the 9.0.100 SDK or patches in that family.",
"_comment": "This policy allows the 10.0.0 SDK or patches in that family.",
"sdk": {
"version": "9.0.100",
"version": "10.0.0",
"rollForward": "latestFeature"
}
}
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="$(MSBuildThisFileDirectory)..\properties\dapr_nuget.props" />

<PropertyGroup>
<TargetFrameworks>net8;net9</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<OutputPath>$(RepoRoot)bin\$(Configuration)\prod\$(MSBuildProjectName)\</OutputPath>

<DocumentationFile>$(OutputPath)$(MSBuildProjectName).xml</DocumentationFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,17 @@ public class TimerCallbackMethodPresentAnalyzerTests
private static readonly ReferenceAssemblies assemblies = ReferenceAssemblies.Net.Net80;
#elif NET9_0
private static readonly ReferenceAssemblies assemblies = ReferenceAssemblies.Net.Net90;
#elif NET10_0
private static readonly ReferenceAssemblies assemblies = new ReferenceAssemblies("net10.0", new PackageIdentity("Microsoft.NETCore.App.Ref", "10.0.0-rc.1.25451.107"), Path.Combine("ref", "net10.0"));
#endif


[Fact]
public async Task TestActor_TimerRegistration_NotPresent()
{
var context = new CSharpAnalyzerTest<TimerCallbackMethodPresentAnalyzer, DefaultVerifier>();
context.ReferenceAssemblies = assemblies.AddPackages([
new ("Dapr.Actors", "1.15.3")
new ("Dapr.Actors", "1.16.0")
]);

context.TestCode = """
Expand All @@ -55,7 +58,7 @@ public async Task TestActor_TimerRegistration_NameOfCallbackPresent()
{
var context = new CSharpAnalyzerTest<TimerCallbackMethodPresentAnalyzer, DefaultVerifier>();
context.ReferenceAssemblies = assemblies.AddPackages([
new ("Dapr.Actors", "1.15.3")
new ("Dapr.Actors", "1.16.0")
]);


Expand Down Expand Up @@ -86,7 +89,7 @@ public async Task TestActor_TimerRegistration_LiteralCallbackPresent()
{
var context = new CSharpAnalyzerTest<TimerCallbackMethodPresentAnalyzer, DefaultVerifier>();
context.ReferenceAssemblies = assemblies.AddPackages([
new ("Dapr.Actors", "1.15.3")
new ("Dapr.Actors", "1.16.0")
]);


Expand Down Expand Up @@ -117,7 +120,7 @@ public async Task TestActor_TimerRegistration_CallbackNotPresent()
{
var context = new CSharpAnalyzerTest<TimerCallbackMethodPresentAnalyzer, DefaultVerifier>();
context.ReferenceAssemblies = assemblies.AddPackages([
new ("Dapr.Actors", "1.15.3")
new ("Dapr.Actors", "1.16.0")
]);

context.TestCode = """
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public Test()
8;
#elif NET9_0
9;
#elif NET10_0
10;
#endif

//
Expand All @@ -48,7 +50,7 @@ public Test()

this.ReferenceAssemblies =
new ReferenceAssemblies(
$"net{frameworkVersion}.0",
$"net{(frameworkVersion)}.0",
new PackageIdentity(
"Microsoft.NETCore.App.Ref",
$"{frameworkVersion}.0.0"),
Expand Down
2 changes: 2 additions & 0 deletions test/Dapr.Analyzers.Common/TestUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ internal static class TestUtilities
var referenceAssemblies = ReferenceAssemblies.Net.Net80;
#elif NET9_0
var referenceAssemblies = ReferenceAssemblies.Net.Net90;
#elif NET10_0
var referenceAssemblies = new ReferenceAssemblies("net10.0", new PackageIdentity("Microsoft.NETCore.App.Ref", "10.0.0-rc.1.25451.107"), Path.Combine("ref", "net10.0"));
#endif

// Create a new project with necessary references
Expand Down
6 changes: 3 additions & 3 deletions test/Dapr.AspNetCore.Test/CloudEventsMiddlewareTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ public async Task InvokeAsync_ReadsBinaryData()
{
httpContext.Request.ContentType.ShouldBe(dataContentType);
var bytes = new byte[httpContext.Request.Body.Length];
#if NET9_0
#if NET9_0_OR_GREATER
httpContext.Request.Body.ReadExactly(bytes, 0, bytes.Length);
#else
httpContext.Request.Body.Read(bytes, 0, bytes.Length);
Expand Down Expand Up @@ -470,12 +470,12 @@ private static string ReadBody(Stream stream, Encoding encoding = null)
encoding ??= Encoding.UTF8;

var bytes = new byte[stream.Length];
#if NET9_0
#if NET9_0_OR_GREATER
stream.ReadExactly(bytes, 0, bytes.Length);
#else
stream.Read(bytes, 0, bytes.Length);
#endif
var str = encoding.GetString(bytes);
return str;
}
}
}
Loading
Loading