Skip to content

Commit

Permalink
Add support for .NET 9 preview 6.
Browse files Browse the repository at this point in the history
Removed support for .NET 7.0 as it's reached end of life (EOL).
  • Loading branch information
peters committed Jul 10, 2024
1 parent 337ea17 commit af1ecfa
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 26 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/dotnetcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ env:
MSVS_TOOLSET_VERSION: 16
SNAPX_DOTNET_FRAMEWORK_VERSION: net8.0
DOTNET_NET60_VERSION: 6.0.424
DOTNET_NET70_VERSION: 7.0.410
DOTNET_NET80_VERSION: 8.0.303
DOTNET_NET90_VERSION: 9.0.100-preview.6
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: 1
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
with:
dotnet-version: |
${{ env.DOTNET_NET60_VERSION }}
${{ env.DOTNET_NET70_VERSION }}
${{ env.DOTNET_NET90_VERSION }}
${{ env.DOTNET_NET80_VERSION }}
- name: Build native
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
with:
dotnet-version: |
${{ env.DOTNET_NET60_VERSION }}
${{ env.DOTNET_NET70_VERSION }}
${{ env.DOTNET_NET90_VERSION }}
${{ env.DOTNET_NET80_VERSION }}
- name: Build native
Expand Down Expand Up @@ -226,7 +226,7 @@ jobs:
with:
dotnet-version: |
${{ env.DOTNET_NET60_VERSION }}
${{ env.DOTNET_NET70_VERSION }}
${{ env.DOTNET_NET90_VERSION }}
${{ env.DOTNET_NET80_VERSION }}
- name: Add dotnet tools to environment path
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ Checkout our sample application, [snapx demoapp](https://github.com/fintermobili
- GitVersion `dotnet tool update gitversion.tool -g`
- Powershell v7 `dotnet tool update powershell -g`
- .NET SDK v6.0
- .NET SDK v7.0
- .NET SDK v8.0
- .NET SDK v9.0

**Windows**:

- Docker Desktop >= v4.0.1
- GitVersion `dotnet tool update gitversion.tool -g`
- Powershell v7 `dotnet tool update powershell -g`
- .NET SDK v6.0
- .NET SDK v7.0
- .NET SDK v8.0
- .NET SDK v9.0

- Visual Studio 2022 Community Edition with C++ workload installed

Expand All @@ -68,8 +68,8 @@ Run `init.ps1` and all dependencies will be built in `Debug` and `Release` mode.
## .NET frameworks supported

- .NET 6.0 LTS
- .NET 7.0
- .NET 8.0
- .NET 8.0 LTS
- .NET 9.0

## Platforms supported

Expand Down
2 changes: 1 addition & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ param(
[Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)]
[string] $DockerImageName = "snapx",
[Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)]
[string] $DockerVersion = "35.0",
[string] $DockerVersion = "36.0",
[Parameter(Position = 4, ValueFromPipelineByPropertyName = $true)]
[switch] $DockerLocal,
[Parameter(Position = 5, ValueFromPipelineByPropertyName = $true)]
Expand Down
13 changes: 7 additions & 6 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ ENV DEBIAN_FRONTEND=noninteractive
ENV SNAPX_DOCKER_WORKING_DIR /build/snapx

ARG DOTNET_60_SDK_VERSION=6.0.424
ARG DOTNET_70_SDK_VERSION=7.0.410
ARG DOTNET_80_SDK_VERSION=8.0.303
ARG DOTNET_90_SDK_VERSION=9.0.100-preview.6.24328.19
ARG DOTNET_RID=linux-x64


Expand All @@ -23,15 +23,16 @@ RUN \
apt-get update && \
rm packages-microsoft-prod.deb


RUN \
wget https://dotnetcli.blob.core.windows.net/dotnet/Sdk/${DOTNET_90_SDK_VERSION}/dotnet-sdk-${DOTNET_90_SDK_VERSION}-${DOTNET_RID}.tar.gz && \
mkdir -p /root/dotnet && tar zxf dotnet-sdk-${DOTNET_90_SDK_VERSION}-${DOTNET_RID}.tar.gz -C /root/dotnet && \
rm dotnet-sdk-${DOTNET_90_SDK_VERSION}-${DOTNET_RID}.tar.gz

RUN \
wget https://dotnetcli.blob.core.windows.net/dotnet/Sdk/${DOTNET_80_SDK_VERSION}/dotnet-sdk-${DOTNET_80_SDK_VERSION}-${DOTNET_RID}.tar.gz && \
mkdir -p /root/dotnet && tar zxf dotnet-sdk-${DOTNET_80_SDK_VERSION}-${DOTNET_RID}.tar.gz -C /root/dotnet && \
rm dotnet-sdk-${DOTNET_80_SDK_VERSION}-${DOTNET_RID}.tar.gz

RUN \
wget https://dotnetcli.blob.core.windows.net/dotnet/Sdk/${DOTNET_70_SDK_VERSION}/dotnet-sdk-${DOTNET_70_SDK_VERSION}-${DOTNET_RID}.tar.gz && \
mkdir -p /root/dotnet && tar zxf dotnet-sdk-${DOTNET_70_SDK_VERSION}-${DOTNET_RID}.tar.gz -C /root/dotnet && \
rm dotnet-sdk-${DOTNET_70_SDK_VERSION}-${DOTNET_RID}.tar.gz

RUN \
wget https://dotnetcli.blob.core.windows.net/dotnet/Sdk/${DOTNET_60_SDK_VERSION}/dotnet-sdk-${DOTNET_60_SDK_VERSION}-${DOTNET_RID}.tar.gz && \
Expand Down
10 changes: 5 additions & 5 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@
<PackageVersion Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
<PackageVersion Include="Castle.Core" Version="5.1.1" />
<PackageVersion Include="CommandLineParser" Version="2.9.1" />
<PackageVersion Include="Jetbrains.Annotations" Version="2023.3.0" />
<PackageVersion Include="Jetbrains.Annotations" Version="2024.2.0" />
<PackageVersion Include="LibLog" Version="5.0.8" />
<PackageVersion Include="LightInject" Version="6.6.4" />
<PackageVersion Include="MessagePack" Version="2.5.140" />
<PackageVersion Include="MessagePack" Version="2.5.171" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageVersion Include="Mono.Cecil" Version="0.11.5" />
<PackageVersion Include="Moq" Version="4.20.70" />
<PackageVersion Include="NLog" Version="5.3.2" />
<PackageVersion Include="NuGet.Packaging.Core" Version="6.9.1" />
<PackageVersion Include="NuGet.Protocol" Version="6.10.0" />
<PackageVersion Include="NuGet.Protocol" Version="6.10.1" />
<PackageVersion Include="SharpCompress" Version="0.37.2" />
<PackageVersion Include="System.CodeDom" Version="8.0.0" />
<PackageVersion Include="System.Security.Permissions" Version="8.0.0" />
<PackageVersion Include="xunit" Version="2.8.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.0" />
<PackageVersion Include="XunitXml.TestLogger" Version="3.1.20" />
<PackageVersion Include="YamlDotNet" Version="15.1.4" />
<PackageVersion Include="YamlDotNet" Version="15.3.0" />
</ItemGroup>
</Project>
</Project>
2 changes: 1 addition & 1 deletion src/Snap.Shared.Tests/Snap.Shared.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<PropertyGroup>
<IsPackable>false</IsPackable>
<IsTestProject>false</IsTestProject>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net6.0;net8.0;net9.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Snap.Tests/Snap.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<PropertyGroup>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net6.0;net8.0;net9.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Snap/Snap.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<IAmSnapCore>true</IAmSnapCore>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net6.0;net8.0;net9.0</TargetFrameworks>
<IsPackable>true</IsPackable>
<IsTestProject>false</IsTestProject>
</PropertyGroup>
Expand Down
7 changes: 4 additions & 3 deletions src/Snapx/Core/DistributedMutex.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
using System;
using System.Net.Http;
using System.Text;
using System.Net.Http.Headers;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using JetBrains.Annotations;
using Snap.Core;
using Snap.Logging;
using snapx.Api;
using Lock = snapx.Api.Lock;

namespace snapx.Core;

Expand All @@ -33,7 +34,7 @@ public async Task<string> AcquireAsync(string name, TimeSpan lockDuration)

using var httpResponse = await _httpClient.SendAsync(new HttpRequestMessage(HttpMethod.Post, "https://snapx.dev/lock")
{
Content = new StringContent(json, Encoding.UTF8, "application/json")
Content = new StringContent(json, new MediaTypeHeaderValue("application/json", "utf-8"))
}, default);

httpResponse.EnsureSuccessStatusCode();
Expand All @@ -52,7 +53,7 @@ public async Task ReleaseLockAsync(string name, string challenge, TimeSpan? brea

using var httpResponse = await _httpClient.SendAsync(new HttpRequestMessage(HttpMethod.Delete, "https://snapx.dev/unlock")
{
Content = new StringContent(json, Encoding.UTF8, "application/json")
Content = new StringContent(json, new MediaTypeHeaderValue("application/json", "utf-8"))
}, default);

httpResponse.EnsureSuccessStatusCode();
Expand Down

0 comments on commit af1ecfa

Please sign in to comment.