Skip to content

Commit

Permalink
Add .NET 9 tfm & remove unsupported .NET 7
Browse files Browse the repository at this point in the history
address breaking json changes
  • Loading branch information
devlead committed Sep 21, 2024
1 parent 853337d commit db62988
Show file tree
Hide file tree
Showing 20 changed files with 522 additions and 636 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@ jobs:
with:
fetch-depth: 0

- name: Install .NET SDK 7.0.x - 8.0.x
- name: Install .NET SDK 8.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
7.0.x
8.0.x
- name: Install .NET SDK
Expand Down
4 changes: 1 addition & 3 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"sdk": {
"version": "8.0.203",
"rollForward": "latestMinor",
"allowPrerelease": false
"version": "9.0.100-rc.1.24452.12"
}
}
12 changes: 12 additions & 0 deletions src/ARI.TestWeb/ARI.TestWeb.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@

<ItemGroup>
<PackageReference Include="Devlead.Statiq" Version="0.20.1" />
<PackageReference Include="Statiq.Web" Version="1.0.0-beta.60" />
<PackageReference Include="System.Security.Cryptography.Xml" Version="8.0.1" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.0.2" />
<PackageReference Include="System.Drawing.Common" Version="8.0.8" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
<PackageReference Include="Azure.Identity" Version="1.12.0" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.Formats.Asn1" Version="8.0.1" />
<PackageReference Include="System.DirectoryServices.Protocols" Version="8.0.0" />
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="2.3.24" />
<PackageReference Include="System.Text.Json" Version="8.0.4" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/ARI.Tests/ARI.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand Down
2 changes: 1 addition & 1 deletion src/ARI.Tests/Fixture/MocksFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public static class MocksFixture
)
);
#pragma warning disable CS8601 // Possible null reference assignment.
public static IDictionary<string, JsonValue> Properties { get; } = JsonSerializer.Deserialize<SortedDictionary<string, JsonValue>>(
public static IDictionary<string, JsonElement> Properties { get; } = JsonSerializer.Deserialize<SortedDictionary<string, JsonElement>>(
"""
{
"alwaysOn": false,
Expand Down
2 changes: 1 addition & 1 deletion src/ARI.Tests/TestCaseGenericAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using NUnit.Framework.Internal.Builders;
using NUnit.Framework.Internal;

namespace NUnit.Framework;
namespace NUnit.Framework.Extensions;

[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public class TestCaseGenericAttribute : TestCaseAttribute, ITestBuilder
Expand Down
6 changes: 3 additions & 3 deletions src/ARI.Tests/Unit/Services/ARM/TokenServiceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ namespace ARI.Tests.Unit.Services.ARM;
[TestFixture]
public class TokenServiceTests
{
[TestCase<ArmResult<AzureTenant>>(Constants.Request.Uri.Tenants)]
[TestCase<ArmResult<Subscription>>(Constants.Request.Uri.Subscriptions)]
[NUnit.Framework.Extensions.TestCase<ArmResult<AzureTenant>>(Constants.Request.Uri.Tenants)]
[NUnit.Framework.Extensions.TestCase<ArmResult<Subscription>>(Constants.Request.Uri.Subscriptions)]
public async Task ARMHttpClientGetAsync<T>(string url)
{
// Given
Expand All @@ -26,7 +26,7 @@ public async Task ARMHttpClientGetAsync<T>(string url)
await Verify(result);
}

[TestCase<GraphOrg>(Constants.Request.Uri.GraphOrg)]
[NUnit.Framework.Extensions.TestCase<GraphOrg>(Constants.Request.Uri.GraphOrg)]
public async Task GraphHttpClientGetAsync<T>(string url)
{
// Given
Expand Down
Loading

0 comments on commit db62988

Please sign in to comment.