diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index e4d531556..1c498db9a 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -3,7 +3,7 @@ # Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. #------------------------------------------------------------------------------------------------------------- -FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim-amd64 +FROM mcr.microsoft.com/dotnet/sdk:10 RUN apt-get update && apt-get install -y ssh # This Dockerfile adds a non-root 'vscode' user with sudo access. However, for Linux, diff --git a/.github/workflows/ci_build.yml b/.github/workflows/ci_build.yml index 2d4908454..5ce600d83 100644 --- a/.github/workflows/ci_build.yml +++ b/.github/workflows/ci_build.yml @@ -18,10 +18,10 @@ jobs: - name: 📤 Checkout the repository uses: actions/checkout@main - - name: 🥅 Install .Net 9 + - name: 🥅 Install .Net 10 uses: actions/setup-dotnet@v5 with: - dotnet-version: '9.0.x' + dotnet-version: '10.0.x' - name: 🔍 Enable problem matchers run: echo "::add-matcher::.github/matchers/dotnet.json" diff --git a/.github/workflows/push_docker_addon_manual.yml b/.github/workflows/push_docker_addon_manual.yml index dc1350f74..8a4de97ba 100644 --- a/.github/workflows/push_docker_addon_manual.yml +++ b/.github/workflows/push_docker_addon_manual.yml @@ -48,7 +48,7 @@ jobs: - name: 🛠️ Run Buildx run: | docker buildx build \ - --platform linux/arm,linux/arm64,linux/amd64 \ + --platform linux/arm64,linux/amd64 \ --output "type=image,push=true" \ --no-cache \ --file ./Dockerfile.AddOn . \ diff --git a/.github/workflows/push_docker_manual.yml b/.github/workflows/push_docker_manual.yml index d136c60f0..d0dd4e0bc 100644 --- a/.github/workflows/push_docker_manual.yml +++ b/.github/workflows/push_docker_manual.yml @@ -16,7 +16,7 @@ jobs: steps: - name: 📤 Checkout the repository uses: actions/checkout@main - + - name: 📆 Set version number run: | echo setting source version: feature-${{ github.event.inputs.tag }} @@ -49,7 +49,7 @@ jobs: - name: 🛠️ Run Buildx run: | docker buildx build \ - --platform linux/arm,linux/arm64,linux/amd64 \ + --platform linux/arm64,linux/amd64 \ --output "type=image,push=true" \ --no-cache \ --file ./Dockerfile . \ @@ -93,11 +93,11 @@ jobs: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - + - name: 🛠️ Run Buildx run: | docker buildx build \ - --platform linux/arm,linux/arm64,linux/amd64 \ + --platform linux/arm64,linux/amd64 \ --output "type=image,push=true" \ --no-cache \ --file ./Dockerfile.AddOn . \ diff --git a/.github/workflows/push_docker_prerelease.yml b/.github/workflows/push_docker_prerelease.yml index 632bad525..9e4a68588 100644 --- a/.github/workflows/push_docker_prerelease.yml +++ b/.github/workflows/push_docker_prerelease.yml @@ -1,4 +1,3 @@ - #### Publish tags to docker hub name: 📦 Deploy pre-release to Docker with tag on: @@ -27,7 +26,7 @@ jobs: echo setting source version: ${{ github.event.inputs.pre }} sed -i '/ private const string Version = /c\ private const string Version = "${{ github.event.inputs.pre }}";' ${{github.workspace}}/src/Runtime/NetDaemon.Runtime/Internal/NetDaemonRuntime.cs sed -i '/ io.hass.version=/c\ io.hass.version="${{ github.event.inputs.pre }}"' ${{github.workspace}}/Dockerfile.AddOn - + - name: 📎 Set up QEMU uses: docker/setup-qemu-action@v3 @@ -54,7 +53,7 @@ jobs: - name: 🛠️ Run Buildx run: | docker buildx build \ - --platform linux/arm,linux/arm64,linux/amd64 \ + --platform linux/arm64,linux/amd64 \ --output "type=image,push=true" \ --no-cache \ --file ./Dockerfile . \ @@ -97,11 +96,11 @@ jobs: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - + - name: 🛠️ Run Buildx run: | docker buildx build \ - --platform linux/arm,linux/arm64,linux/amd64 \ + --platform linux/arm64,linux/amd64 \ --output "type=image,push=true" \ --no-cache \ --file ./Dockerfile.AddOn . \ diff --git a/.github/workflows/push_nuget_prerelease.yml b/.github/workflows/push_nuget_prerelease.yml index d49469a28..cdecf612b 100644 --- a/.github/workflows/push_nuget_prerelease.yml +++ b/.github/workflows/push_nuget_prerelease.yml @@ -43,10 +43,10 @@ jobs: # Get the build number echo "build=$(git rev-list $(git rev-list --tags --no-walk --max-count=1)..HEAD --count)" >> $GITHUB_OUTPUT - - name: 🥅 Install .Net 9 + - name: 🥅 Install .Net 10 uses: actions/setup-dotnet@v5 with: - dotnet-version: '9.0.x' + dotnet-version: '10.0.x' # dotnet-quality: 'preview' - name: 🔖 Set version number diff --git a/.github/workflows/tags_docker.yml b/.github/workflows/tags_docker.yml index ed53cf4ae..98d02770a 100644 --- a/.github/workflows/tags_docker.yml +++ b/.github/workflows/tags_docker.yml @@ -54,7 +54,7 @@ jobs: - name: 🛠️ Run Buildx run: | docker buildx build \ - --platform linux/arm,linux/arm64,linux/amd64 \ + --platform linux/arm64,linux/amd64 \ --output "type=image,push=true" \ --no-cache \ --file ./Dockerfile.AddOn . \ @@ -109,11 +109,11 @@ jobs: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - + - name: 🛠️ Run Buildx run: | docker buildx build \ - --platform linux/arm,linux/arm64,linux/amd64 \ + --platform linux/arm64,linux/amd64 \ --output "type=image,push=true" \ --no-cache \ --file ./Dockerfile . \ diff --git a/.github/workflows/tags_nuget.yml b/.github/workflows/tags_nuget.yml index 74ee6d170..4795b7036 100644 --- a/.github/workflows/tags_nuget.yml +++ b/.github/workflows/tags_nuget.yml @@ -23,10 +23,10 @@ jobs: echo Current version: $latest echo "version=$latest" >> $GITHUB_OUTPUT - - name: 🥅 Install .Net 9 + - name: 🥅 Install .Net 10 uses: actions/setup-dotnet@v5 with: - dotnet-version: "9.0.x" # SDK Version + dotnet-version: "10.0.x" # SDK Version - name: 🔖 Set version number run: | diff --git a/.github/workflows/test_docker.yml b/.github/workflows/test_docker.yml index 2e3b25f81..e18caa5de 100644 --- a/.github/workflows/test_docker.yml +++ b/.github/workflows/test_docker.yml @@ -21,18 +21,19 @@ jobs: - name: 📎 Set up QEMU uses: docker/setup-qemu-action@v3 - + with: + platforms: all - name: 🔧 Set up Docker Buildx id: buildx uses: docker/setup-buildx-action@v3 - + - name: 🧰 Available platforms run: echo ${{ steps.buildx.outputs.platforms }} - name: 🛠️ Run Buildx run: | docker buildx build \ - --platform linux/arm,linux/arm64,linux/amd64 \ + --platform linux/arm64,linux/amd64 \ --output "type=image,push=false" \ --no-cache \ --file ./${{ matrix.dockerfile }} . \ diff --git a/Directory.Build.props b/Directory.Build.props index da671706b..96cddc32b 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,6 @@ - 13.0 + 14.0 @@ -11,7 +11,7 @@ - net9.0 + net10.0 false enable enable diff --git a/Dockerfile b/Dockerfile index bdd454814..5f5d02db4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Pre-build .NET NetDaemon core project -FROM mcr.microsoft.com/dotnet/sdk:9.0-bookworm-slim-amd64 as netbuilder +FROM mcr.microsoft.com/dotnet/sdk:10.0 AS netbuilder ARG TARGETPLATFORM ARG BUILDPLATFORM @@ -13,7 +13,7 @@ COPY . /usr RUN dotnet publish /usr/src/Host/NetDaemon.Host.Default/NetDaemon.Host.Default.csproj -o "/daemon" # Final stage, create the runtime container -FROM ghcr.io/net-daemon/netdaemon_base:9 +FROM ghcr.io/net-daemon/netdaemon_base:10 # # Install S6 and the Admin site # COPY ./Docker/rootfs/etc/services.d/NetDaemonAdmin /etc/services.d/NetDaemonAdmin diff --git a/Dockerfile.AddOn b/Dockerfile.AddOn index fb700f9f5..76f82e8ea 100644 --- a/Dockerfile.AddOn +++ b/Dockerfile.AddOn @@ -1,6 +1,6 @@ # No admin support yet, we need to build the websocket API # Pre-build .NET NetDaemon core project -FROM mcr.microsoft.com/dotnet/sdk:9.0-bookworm-slim-amd64 as netbuilder +FROM mcr.microsoft.com/dotnet/sdk:10.0 AS netbuilder ARG TARGETPLATFORM ARG BUILDPLATFORM @@ -14,7 +14,7 @@ COPY . /usr RUN dotnet publish /usr/src/Host/NetDaemon.Host.Default/NetDaemon.Host.Default.csproj -o "/daemon" # Final stage, create the runtime container -FROM ghcr.io/net-daemon/netdaemon_addonbase:9 +FROM ghcr.io/net-daemon/netdaemon_addonbase:10 # # Install S6 and the Admin site COPY --chmod=755 ./Docker/rootfs/etc/services.d/netdaemon_addon /etc/s6-overlay/s6-rc.d/netdaemon_addon @@ -24,4 +24,4 @@ COPY --chmod=755 ./Docker/rootfs/etc/s6-overlay/s6-rc.d/usr/netdaemon_addon etc/ COPY --from=netbuilder /daemon /daemon LABEL \ - io.hass.version="VERSION" + io.hass.version="VERSION" diff --git a/global.json b/global.json index e23e02115..a68b32ef1 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "9.0.0", + "version": "10.0.0", "rollForward": "latestMinor" } } diff --git a/src/AppModel/NetDaemon.AppModel.SourceDeployedApps/NetDaemon.AppModel.SourceDeployedApps.csproj b/src/AppModel/NetDaemon.AppModel.SourceDeployedApps/NetDaemon.AppModel.SourceDeployedApps.csproj index 55c6465d0..27d2ecba2 100644 --- a/src/AppModel/NetDaemon.AppModel.SourceDeployedApps/NetDaemon.AppModel.SourceDeployedApps.csproj +++ b/src/AppModel/NetDaemon.AppModel.SourceDeployedApps/NetDaemon.AppModel.SourceDeployedApps.csproj @@ -39,7 +39,6 @@ - runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/AppModel/NetDaemon.AppModel/NetDaemon.AppModel.csproj b/src/AppModel/NetDaemon.AppModel/NetDaemon.AppModel.csproj index dce9adad2..8c9ca4b52 100644 --- a/src/AppModel/NetDaemon.AppModel/NetDaemon.AppModel.csproj +++ b/src/AppModel/NetDaemon.AppModel/NetDaemon.AppModel.csproj @@ -37,7 +37,6 @@ - runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Client/NetDaemon.HassClient.Debug/NetDaemon.HassClient.Debug.csproj b/src/Client/NetDaemon.HassClient.Debug/NetDaemon.HassClient.Debug.csproj index e2d0d0e14..617e06d65 100644 --- a/src/Client/NetDaemon.HassClient.Debug/NetDaemon.HassClient.Debug.csproj +++ b/src/Client/NetDaemon.HassClient.Debug/NetDaemon.HassClient.Debug.csproj @@ -30,7 +30,6 @@ - runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/Client/NetDaemon.HassClient.Tests/Integration/WebsocketIntegrationTests.cs b/src/Client/NetDaemon.HassClient.Tests/Integration/WebsocketIntegrationTests.cs index 2681c8d8d..2b25bc3c7 100644 --- a/src/Client/NetDaemon.HassClient.Tests/Integration/WebsocketIntegrationTests.cs +++ b/src/Client/NetDaemon.HassClient.Tests/Integration/WebsocketIntegrationTests.cs @@ -111,8 +111,11 @@ public async Task TestWrongHostShouldThrowCorrectException() Ssl = false, Token = "token does not matter" }; - await Assert.ThrowsAsync(async () => + // In .NET 10, this may throw TaskCanceledException instead of WebSocketException + var exception = await Assert.ThrowsAnyAsync(async () => await GetConnectedClientContext(settings).ConfigureAwait(false)); + Assert.True(exception is WebSocketException or TaskCanceledException, + $"Expected WebSocketException or TaskCanceledException, but got {exception.GetType().Name}"); } [Fact] diff --git a/src/Client/NetDaemon.HassClient.Tests/NetDaemon.HassClient.Tests.csproj b/src/Client/NetDaemon.HassClient.Tests/NetDaemon.HassClient.Tests.csproj index b93e34b2e..74ab3fcfd 100644 --- a/src/Client/NetDaemon.HassClient.Tests/NetDaemon.HassClient.Tests.csproj +++ b/src/Client/NetDaemon.HassClient.Tests/NetDaemon.HassClient.Tests.csproj @@ -6,8 +6,6 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - diff --git a/src/Client/NetDaemon.HassClient/NetDaemon.Client.csproj b/src/Client/NetDaemon.HassClient/NetDaemon.Client.csproj index 2abc60df1..e6addfca3 100644 --- a/src/Client/NetDaemon.HassClient/NetDaemon.Client.csproj +++ b/src/Client/NetDaemon.HassClient/NetDaemon.Client.csproj @@ -44,7 +44,6 @@ - runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/HassModel/NetDaemon.HassModel.Tests/CodeGenerator/TestFiles/RawVersions/RawVersions.csproj b/src/HassModel/NetDaemon.HassModel.Tests/CodeGenerator/TestFiles/RawVersions/RawVersions.csproj index e3241df7b..dc14c1bc7 100644 --- a/src/HassModel/NetDaemon.HassModel.Tests/CodeGenerator/TestFiles/RawVersions/RawVersions.csproj +++ b/src/HassModel/NetDaemon.HassModel.Tests/CodeGenerator/TestFiles/RawVersions/RawVersions.csproj @@ -1,7 +1,7 @@  - net9.0 + net10.0 enable enable diff --git a/src/HassModel/NetDaemon.HassModel.Tests/CodeGenerator/TestFiles/SubstitutedVersions/SubstitutedVersions.csproj b/src/HassModel/NetDaemon.HassModel.Tests/CodeGenerator/TestFiles/SubstitutedVersions/SubstitutedVersions.csproj index a47712519..d338fd59d 100644 --- a/src/HassModel/NetDaemon.HassModel.Tests/CodeGenerator/TestFiles/SubstitutedVersions/SubstitutedVersions.csproj +++ b/src/HassModel/NetDaemon.HassModel.Tests/CodeGenerator/TestFiles/SubstitutedVersions/SubstitutedVersions.csproj @@ -1,7 +1,7 @@  - net9.0 + net10.0 enable enable 25.6.0 diff --git a/src/debug/MyNDApp/MyNDApp.csproj b/src/debug/MyNDApp/MyNDApp.csproj index e4abd8d24..ba3ef3b1c 100644 --- a/src/debug/MyNDApp/MyNDApp.csproj +++ b/src/debug/MyNDApp/MyNDApp.csproj @@ -2,8 +2,8 @@ Exe - net9.0 - 13.0 + net10.0 + 14.0 enable Debug false