From 2e25b451c9d3ad0a1904a18c2c373080c97acdea Mon Sep 17 00:00:00 2001 From: Alessio Dal Santo Date: Mon, 16 Feb 2026 15:56:02 +0100 Subject: [PATCH] [Fix] Risolto errore NETSDK1067 nella build Docker Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Sostituito /p:UseAppHost=false con /p:SelfContained=false in entrambi i Dockerfile - .NET 9.0 richiede AppHost per applicazioni self-contained - SelfContained=false รจ appropriato per container Docker con runtime separato - Fix applicato sia a Dockerfile (Linux) che Dockerfile.windows --- Dockerfile | 2 +- Dockerfile.windows | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d33e4a0..2518097 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,7 @@ RUN dotnet build "Data_Coupler.csproj" -c Release -o /app/build # Stage 2: Publish FROM build AS publish RUN dotnet publish "Data_Coupler.csproj" -c Release -o /app/publish \ - /p:UseAppHost=false \ + /p:SelfContained=false \ /p:PublishTrimmed=false \ /p:PublishSingleFile=false diff --git a/Dockerfile.windows b/Dockerfile.windows index e33b87e..26d2791 100644 --- a/Dockerfile.windows +++ b/Dockerfile.windows @@ -27,7 +27,7 @@ RUN dotnet build "Data_Coupler.csproj" -c Release -o /o --no-restore # Stage 2: Publish FROM build AS publish -RUN dotnet publish "Data_Coupler.csproj" -c Release -o /p --no-restore /p:UseAppHost=false +RUN dotnet publish "Data_Coupler.csproj" -c Release -o /p --no-restore /p:SelfContained=false # Stage 3: Runtime FROM mcr.microsoft.com/dotnet/aspnet:9.0-nanoserver-ltsc2022 AS final