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
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push_docker_addon_manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 . \
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/push_docker_manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 . \
Expand Down Expand Up @@ -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 . \
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/push_docker_prerelease.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#### Publish tags to docker hub
name: 📦 Deploy pre-release to Docker with tag
on:
Expand Down Expand Up @@ -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

Expand All @@ -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 . \
Expand Down Expand Up @@ -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 . \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push_nuget_prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tags_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 . \
Expand Down Expand Up @@ -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 . \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tags_nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/test_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }} . \
Expand Down
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<LangVersion>13.0</LangVersion>
<LangVersion>14.0</LangVersion>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -11,7 +11,7 @@

<!--Some sensible defaults for all projects, can be overriden in the projects themselves-->
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.AddOn
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand All @@ -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"
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "9.0.0",
"version": "10.0.0",
"rollForward": "latestMinor"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.14.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="System.Reactive" Version="6.1.0" />
<PackageReference Include="System.IO.Pipelines" Version="9.0.10" />
<PackageReference Include="Roslynator.Analyzers" Version="4.14.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand Down
1 change: 0 additions & 1 deletion src/AppModel/NetDaemon.AppModel/NetDaemon.AppModel.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.10" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="System.Reactive" Version="6.1.0" />
<PackageReference Include="System.IO.Pipelines" Version="9.0.10" />
<PackageReference Include="Roslynator.Analyzers" Version="4.14.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="9.0.10" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.10" />
<PackageReference Include="System.Reactive" Version="6.1.0" />
<PackageReference Include="System.IO.Pipelines" Version="9.0.10" />
<PackageReference Include="Roslynator.Analyzers" Version="4.14.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,11 @@ public async Task TestWrongHostShouldThrowCorrectException()
Ssl = false,
Token = "token does not matter"
};
await Assert.ThrowsAsync<WebSocketException>(async () =>
// In .NET 10, this may throw TaskCanceledException instead of WebSocketException
var exception = await Assert.ThrowsAnyAsync<Exception>(async () =>
await GetConnectedClientContext(settings).ConfigureAwait(false));
Assert.True(exception is WebSocketException or TaskCanceledException,
$"Expected WebSocketException or TaskCanceledException, but got {exception.GetType().Name}");
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.10" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.10" />
<PackageReference Include="Microsoft.Extensions.TimeProvider.Testing" Version="9.10.0" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="9.0.10" />
<PackageReference Include="System.Reactive" Version="6.1.0" />
Expand Down
1 change: 0 additions & 1 deletion src/Client/NetDaemon.HassClient/NetDaemon.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.10" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="System.Reactive" Version="6.1.0" />
<PackageReference Include="System.IO.Pipelines" Version="9.0.10" />
<PackageReference Include="Roslynator.Analyzers" Version="4.14.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<NetDaemonVersion>25.6.0</NetDaemonVersion>
Expand Down
4 changes: 2 additions & 2 deletions src/debug/MyNDApp/MyNDApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<LangVersion>13.0</LangVersion>
<TargetFramework>net10.0</TargetFramework>
<LangVersion>14.0</LangVersion>
<Nullable>enable</Nullable>
<RootNamespace>Debug</RootNamespace>
<IsPackable>false</IsPackable>
Expand Down