From d9c45e0678c179c0f72bbb1a665765774fbf38f1 Mon Sep 17 00:00:00 2001 From: Norm Johanson Date: Sat, 10 Jan 2026 14:50:05 -0800 Subject: [PATCH 1/3] Fix issue https://github.com/aws/integrations-on-dotnet-aspire-for-aws/issues/138 and build Amazon.Lambda.RuntimeSupport always as executable Also update Amazon.Lambda.AspNetCoreServer.Hosting and Amazon.Lambda.TestTool to reference the latest version of Amazon.Lambda.RuntimeSupport --- .../9ea31abe-8afa-4b3f-9145-addeec1e94ab.json | 25 +++++++++++++++++++ .../Images/net10/amd64/Dockerfile | 4 +-- .../Images/net10/arm64/Dockerfile | 4 +-- .../Images/net8/amd64/Dockerfile | 4 +-- .../Images/net8/arm64/Dockerfile | 4 +-- .../Images/net9/amd64/Dockerfile | 4 +-- .../Images/net9/arm64/Dockerfile | 4 +-- ...zon.Lambda.AspNetCoreServer.Hosting.csproj | 2 +- .../Amazon.Lambda.RuntimeSupport.csproj | 16 +++++++++--- .../Amazon.Lambda.RuntimeSupport/Program.cs | 2 -- .../Amazon.Lambda.TestTool.csproj | 4 +-- buildtools/build.proj | 1 - 12 files changed, 53 insertions(+), 21 deletions(-) create mode 100644 .autover/changes/9ea31abe-8afa-4b3f-9145-addeec1e94ab.json diff --git a/.autover/changes/9ea31abe-8afa-4b3f-9145-addeec1e94ab.json b/.autover/changes/9ea31abe-8afa-4b3f-9145-addeec1e94ab.json new file mode 100644 index 000000000..4c1bb071d --- /dev/null +++ b/.autover/changes/9ea31abe-8afa-4b3f-9145-addeec1e94ab.json @@ -0,0 +1,25 @@ +{ + "Projects": [ + { + "Name": "Amazon.Lambda.RuntimeSupport", + "Type": "Patch", + "ChangelogMessages": [ + "Fixed missing entry point exception when used via Amazon.Lambda.TestTool for a class library based Lambda function that is also an executable with a dependency on Amazon.Lambda.RuntimeSupport." + ] + }, + { + "Name": "Amazon.Lambda.TestTool", + "Type": "Patch", + "ChangelogMessages": [ + "Update to include version 1.14.2 of Amazon.Lambda.RuntimeSupport" + ] + }, + { + "Name": "Amazon.Lambda.AspNetCoreServer.Hosting", + "Type": "Patch", + "ChangelogMessages": [ + "Update to include version 1.14.2 of Amazon.Lambda.RuntimeSupport" + ] + } + ] +} \ No newline at end of file diff --git a/LambdaRuntimeDockerfiles/Images/net10/amd64/Dockerfile b/LambdaRuntimeDockerfiles/Images/net10/amd64/Dockerfile index b179095dc..f2ec1c7f5 100644 --- a/LambdaRuntimeDockerfiles/Images/net10/amd64/Dockerfile +++ b/LambdaRuntimeDockerfiles/Images/net10/amd64/Dockerfile @@ -35,11 +35,11 @@ COPY ["Libraries/src/Amazon.Lambda.Core", "Repo/Libraries/src/Amazon.Lambda.Core COPY ["buildtools/", "Repo/buildtools/"] RUN dotnet restore "Repo/Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj" /p:TargetFrameworks=net10.0 WORKDIR "Repo/Libraries/src/Amazon.Lambda.RuntimeSupport" -RUN dotnet build "Amazon.Lambda.RuntimeSupport.csproj" /p:ExecutableOutputType=true /p:GenerateDocumentationFile=false /p:TargetFrameworks=net10.0 --runtime linux-x64 -c Release -o /app/build +RUN dotnet build "Amazon.Lambda.RuntimeSupport.csproj" /p:GenerateDocumentationFile=false /p:TargetFrameworks=net10.0 --runtime linux-x64 -c Release -o /app/build FROM builder AS publish -RUN dotnet publish "Amazon.Lambda.RuntimeSupport.csproj" /p:ExecutableOutputType=true /p:GenerateDocumentationFile=false /p:TargetFrameworks=net10.0 -f net10.0 --runtime linux-x64 --self-contained false -p:PublishReadyToRun=true -c Release -o /app/publish +RUN dotnet publish "Amazon.Lambda.RuntimeSupport.csproj" /p:GenerateDocumentationFile=false /p:TargetFrameworks=net10.0 -f net10.0 --runtime linux-x64 --self-contained false -p:PublishReadyToRun=true -c Release -o /app/publish RUN apt-get update && apt-get install -y dos2unix RUN dos2unix /app/publish/bootstrap.sh && \ mv /app/publish/bootstrap.sh /app/publish/bootstrap && \ diff --git a/LambdaRuntimeDockerfiles/Images/net10/arm64/Dockerfile b/LambdaRuntimeDockerfiles/Images/net10/arm64/Dockerfile index 8c53e677b..a0f3127ca 100644 --- a/LambdaRuntimeDockerfiles/Images/net10/arm64/Dockerfile +++ b/LambdaRuntimeDockerfiles/Images/net10/arm64/Dockerfile @@ -35,11 +35,11 @@ COPY ["Libraries/src/Amazon.Lambda.Core", "Repo/Libraries/src/Amazon.Lambda.Core COPY ["buildtools/", "Repo/buildtools/"] RUN dotnet restore "Repo/Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj" /p:TargetFrameworks=net10.0 WORKDIR "Repo/Libraries/src/Amazon.Lambda.RuntimeSupport" -RUN dotnet build "Amazon.Lambda.RuntimeSupport.csproj" /p:ExecutableOutputType=true /p:GenerateDocumentationFile=false /p:TargetFrameworks=net10.0 --runtime linux-arm64 -c Release -o /app/build +RUN dotnet build "Amazon.Lambda.RuntimeSupport.csproj" /p:GenerateDocumentationFile=false /p:TargetFrameworks=net10.0 --runtime linux-arm64 -c Release -o /app/build FROM builder AS publish -RUN dotnet publish "Amazon.Lambda.RuntimeSupport.csproj" /p:ExecutableOutputType=true /p:GenerateDocumentationFile=false /p:TargetFrameworks=net10.0 -f net10.0 --runtime linux-arm64 --self-contained false -p:PublishReadyToRun=true -c Release -o /app/publish +RUN dotnet publish "Amazon.Lambda.RuntimeSupport.csproj" /p:GenerateDocumentationFile=false /p:TargetFrameworks=net10.0 -f net10.0 --runtime linux-arm64 --self-contained false -p:PublishReadyToRun=true -c Release -o /app/publish RUN apt-get update && apt-get install -y dos2unix RUN dos2unix /app/publish/bootstrap.sh && \ mv /app/publish/bootstrap.sh /app/publish/bootstrap && \ diff --git a/LambdaRuntimeDockerfiles/Images/net8/amd64/Dockerfile b/LambdaRuntimeDockerfiles/Images/net8/amd64/Dockerfile index aab88f675..98a7c4509 100644 --- a/LambdaRuntimeDockerfiles/Images/net8/amd64/Dockerfile +++ b/LambdaRuntimeDockerfiles/Images/net8/amd64/Dockerfile @@ -36,11 +36,11 @@ COPY ["Libraries/src/SnapshotRestore.Registry", "Repo/Libraries/src/SnapshotRest COPY ["buildtools/", "Repo/buildtools/"] RUN dotnet restore "Repo/Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj" /p:TargetFrameworks=net8.0 WORKDIR "Repo/Libraries/src/Amazon.Lambda.RuntimeSupport" -RUN dotnet build "Amazon.Lambda.RuntimeSupport.csproj" /p:ExecutableOutputType=true /p:GenerateDocumentationFile=false /p:TargetFrameworks=net8.0 --runtime linux-x64 -c Release -o /app/build +RUN dotnet build "Amazon.Lambda.RuntimeSupport.csproj" /p:GenerateDocumentationFile=false /p:TargetFrameworks=net8.0 --runtime linux-x64 -c Release -o /app/build FROM builder AS publish -RUN dotnet publish "Amazon.Lambda.RuntimeSupport.csproj" /p:ExecutableOutputType=true /p:GenerateDocumentationFile=false /p:TargetFrameworks=net8.0 -f net8.0 --runtime linux-x64 --self-contained false -p:PublishReadyToRun=true -c Release -o /app/publish +RUN dotnet publish "Amazon.Lambda.RuntimeSupport.csproj" /p:GenerateDocumentationFile=false /p:TargetFrameworks=net8.0 -f net8.0 --runtime linux-x64 --self-contained false -p:PublishReadyToRun=true -c Release -o /app/publish RUN apt-get update && apt-get install -y dos2unix RUN dos2unix /app/publish/bootstrap.net8.sh && \ mv /app/publish/bootstrap.net8.sh /app/publish/bootstrap && \ diff --git a/LambdaRuntimeDockerfiles/Images/net8/arm64/Dockerfile b/LambdaRuntimeDockerfiles/Images/net8/arm64/Dockerfile index 4ae7448f3..c2b55e111 100644 --- a/LambdaRuntimeDockerfiles/Images/net8/arm64/Dockerfile +++ b/LambdaRuntimeDockerfiles/Images/net8/arm64/Dockerfile @@ -36,11 +36,11 @@ COPY ["Libraries/src/SnapshotRestore.Registry", "Repo/Libraries/src/SnapshotRest COPY ["buildtools/", "Repo/buildtools/"] RUN dotnet restore "Repo/Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj" /p:TargetFrameworks=net8.0 WORKDIR "Repo/Libraries/src/Amazon.Lambda.RuntimeSupport" -RUN dotnet build "Amazon.Lambda.RuntimeSupport.csproj" /p:ExecutableOutputType=true /p:GenerateDocumentationFile=false /p:TargetFrameworks=net8.0 --runtime linux-arm64 -c Release -o /app/build +RUN dotnet build "Amazon.Lambda.RuntimeSupport.csproj" /p:GenerateDocumentationFile=false /p:TargetFrameworks=net8.0 --runtime linux-arm64 -c Release -o /app/build FROM builder AS publish -RUN dotnet publish "Amazon.Lambda.RuntimeSupport.csproj" /p:ExecutableOutputType=true /p:GenerateDocumentationFile=false /p:TargetFrameworks=net8.0 -f net8.0 --runtime linux-arm64 --self-contained false -p:PublishReadyToRun=true -c Release -o /app/publish +RUN dotnet publish "Amazon.Lambda.RuntimeSupport.csproj" /p:GenerateDocumentationFile=false /p:TargetFrameworks=net8.0 -f net8.0 --runtime linux-arm64 --self-contained false -p:PublishReadyToRun=true -c Release -o /app/publish RUN apt-get update && apt-get install -y dos2unix RUN dos2unix /app/publish/bootstrap.net8.sh && \ mv /app/publish/bootstrap.net8.sh /app/publish/bootstrap && \ diff --git a/LambdaRuntimeDockerfiles/Images/net9/amd64/Dockerfile b/LambdaRuntimeDockerfiles/Images/net9/amd64/Dockerfile index ec4eb7c15..09605eed9 100644 --- a/LambdaRuntimeDockerfiles/Images/net9/amd64/Dockerfile +++ b/LambdaRuntimeDockerfiles/Images/net9/amd64/Dockerfile @@ -35,11 +35,11 @@ COPY ["Libraries/src/Amazon.Lambda.Core", "Repo/Libraries/src/Amazon.Lambda.Core COPY ["buildtools/", "Repo/buildtools/"] RUN dotnet restore "Repo/Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj" /p:TargetFrameworks=net9.0 WORKDIR "Repo/Libraries/src/Amazon.Lambda.RuntimeSupport" -RUN dotnet build "Amazon.Lambda.RuntimeSupport.csproj" /p:ExecutableOutputType=true /p:GenerateDocumentationFile=false /p:TargetFrameworks=net9.0 --runtime linux-x64 -c Release -o /app/build +RUN dotnet build "Amazon.Lambda.RuntimeSupport.csproj" /p:GenerateDocumentationFile=false /p:TargetFrameworks=net9.0 --runtime linux-x64 -c Release -o /app/build FROM builder AS publish -RUN dotnet publish "Amazon.Lambda.RuntimeSupport.csproj" /p:ExecutableOutputType=true /p:GenerateDocumentationFile=false /p:TargetFrameworks=net9.0 -f net9.0 --runtime linux-x64 --self-contained false -p:PublishReadyToRun=true -c Release -o /app/publish +RUN dotnet publish "Amazon.Lambda.RuntimeSupport.csproj" /p:GenerateDocumentationFile=false /p:TargetFrameworks=net9.0 -f net9.0 --runtime linux-x64 --self-contained false -p:PublishReadyToRun=true -c Release -o /app/publish RUN apt-get update && apt-get install -y dos2unix RUN dos2unix /app/publish/bootstrap.net8.sh && \ mv /app/publish/bootstrap.net8.sh /app/publish/bootstrap && \ diff --git a/LambdaRuntimeDockerfiles/Images/net9/arm64/Dockerfile b/LambdaRuntimeDockerfiles/Images/net9/arm64/Dockerfile index b8d63cf44..d12762874 100644 --- a/LambdaRuntimeDockerfiles/Images/net9/arm64/Dockerfile +++ b/LambdaRuntimeDockerfiles/Images/net9/arm64/Dockerfile @@ -35,11 +35,11 @@ COPY ["Libraries/src/Amazon.Lambda.Core", "Repo/Libraries/src/Amazon.Lambda.Core COPY ["buildtools/", "Repo/buildtools/"] RUN dotnet restore "Repo/Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj" /p:TargetFrameworks=net9.0 WORKDIR "Repo/Libraries/src/Amazon.Lambda.RuntimeSupport" -RUN dotnet build "Amazon.Lambda.RuntimeSupport.csproj" /p:ExecutableOutputType=true /p:GenerateDocumentationFile=false /p:TargetFrameworks=net9.0 --runtime linux-arm64 -c Release -o /app/build +RUN dotnet build "Amazon.Lambda.RuntimeSupport.csproj" /p:GenerateDocumentationFile=false /p:TargetFrameworks=net9.0 --runtime linux-arm64 -c Release -o /app/build FROM builder AS publish -RUN dotnet publish "Amazon.Lambda.RuntimeSupport.csproj" /p:ExecutableOutputType=true /p:GenerateDocumentationFile=false /p:TargetFrameworks=net9.0 -f net9.0 --runtime linux-arm64 --self-contained false -p:PublishReadyToRun=true -c Release -o /app/publish +RUN dotnet publish "Amazon.Lambda.RuntimeSupport.csproj" /p:GenerateDocumentationFile=false /p:TargetFrameworks=net9.0 -f net9.0 --runtime linux-arm64 --self-contained false -p:PublishReadyToRun=true -c Release -o /app/publish RUN apt-get update && apt-get install -y dos2unix RUN dos2unix /app/publish/bootstrap.net8.sh && \ mv /app/publish/bootstrap.net8.sh /app/publish/bootstrap && \ diff --git a/Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/Amazon.Lambda.AspNetCoreServer.Hosting.csproj b/Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/Amazon.Lambda.AspNetCoreServer.Hosting.csproj index 852a70a62..fa62a05de 100644 --- a/Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/Amazon.Lambda.AspNetCoreServer.Hosting.csproj +++ b/Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/Amazon.Lambda.AspNetCoreServer.Hosting.csproj @@ -7,7 +7,7 @@ net6.0;net8.0 enable enable - 1.9.0 + 1.9.1111 README.md Amazon.Lambda.AspNetCoreServer.Hosting Amazon.Lambda.AspNetCoreServer.Hosting diff --git a/Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj b/Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj index b921afb9b..c922259c5 100644 --- a/Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj +++ b/Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj @@ -4,7 +4,7 @@ netstandard2.0;net6.0;net8.0;net9.0;net10.0 - 1.14.1 + 1.14.1112 Provides a bootstrap and Lambda Runtime API Client to help you to develop custom .NET Core Lambda Runtimes. Amazon.Lambda.RuntimeSupport Amazon.Lambda.RuntimeSupport @@ -22,11 +22,21 @@ ready to make a major version release of our libraries. --> false + + + Exe - + Exe - $(DefineConstants);ExecutableOutputType diff --git a/Libraries/src/Amazon.Lambda.RuntimeSupport/Program.cs b/Libraries/src/Amazon.Lambda.RuntimeSupport/Program.cs index d51dc0ea7..2a0605e3b 100644 --- a/Libraries/src/Amazon.Lambda.RuntimeSupport/Program.cs +++ b/Libraries/src/Amazon.Lambda.RuntimeSupport/Program.cs @@ -28,7 +28,6 @@ class Program // .NET 10 considers adding RequiresUnreferencedCode on the entry point a warning. Our situation is different then the normal use case in that the only time // the Main exists in the Lambda class library mode which will never be used for Native AOT. #pragma warning disable IL2123 -#if ExecutableOutputType #if NET8_0_OR_GREATER [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode( "The Main entry point is used in the managed runtime which loads Lambda functions as a class library. " + @@ -50,7 +49,6 @@ private static async Task Main(string[] args) RuntimeSupportInitializer runtimeSupportInitializer = new RuntimeSupportInitializer(handler, lambdaBootstrapOptions); await runtimeSupportInitializer.RunLambdaBootstrap(); } -#endif #pragma warning restore IL2123 #if NET8_0_OR_GREATER diff --git a/Tools/LambdaTestTool-v2/src/Amazon.Lambda.TestTool/Amazon.Lambda.TestTool.csproj b/Tools/LambdaTestTool-v2/src/Amazon.Lambda.TestTool/Amazon.Lambda.TestTool.csproj index d8e87b598..058e3dcd0 100644 --- a/Tools/LambdaTestTool-v2/src/Amazon.Lambda.TestTool/Amazon.Lambda.TestTool.csproj +++ b/Tools/LambdaTestTool-v2/src/Amazon.Lambda.TestTool/Amazon.Lambda.TestTool.csproj @@ -15,7 +15,7 @@ true Amazon.Lambda.TestTool dotnet-lambda-test-tool - 0.11.1 + 0.11.2222 NU5100 Major README.md @@ -47,7 +47,7 @@ - + diff --git a/buildtools/build.proj b/buildtools/build.proj index 3e3ad43a7..4b9777ce5 100644 --- a/buildtools/build.proj +++ b/buildtools/build.proj @@ -170,7 +170,6 @@ - From c2c8be879063dd96b2181b3a44c76f99f1407e53 Mon Sep 17 00:00:00 2001 From: Norm Johanson Date: Sat, 10 Jan 2026 14:59:41 -0800 Subject: [PATCH 2/3] Revert project versions back to the current released version number --- .../Amazon.Lambda.AspNetCoreServer.Hosting.csproj | 2 +- .../Amazon.Lambda.RuntimeSupport.csproj | 2 +- .../src/Amazon.Lambda.TestTool/Amazon.Lambda.TestTool.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/Amazon.Lambda.AspNetCoreServer.Hosting.csproj b/Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/Amazon.Lambda.AspNetCoreServer.Hosting.csproj index fa62a05de..852a70a62 100644 --- a/Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/Amazon.Lambda.AspNetCoreServer.Hosting.csproj +++ b/Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/Amazon.Lambda.AspNetCoreServer.Hosting.csproj @@ -7,7 +7,7 @@ net6.0;net8.0 enable enable - 1.9.1111 + 1.9.0 README.md Amazon.Lambda.AspNetCoreServer.Hosting Amazon.Lambda.AspNetCoreServer.Hosting diff --git a/Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj b/Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj index c922259c5..936c745c5 100644 --- a/Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj +++ b/Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj @@ -4,7 +4,7 @@ netstandard2.0;net6.0;net8.0;net9.0;net10.0 - 1.14.1112 + 1.14.1 Provides a bootstrap and Lambda Runtime API Client to help you to develop custom .NET Core Lambda Runtimes. Amazon.Lambda.RuntimeSupport Amazon.Lambda.RuntimeSupport diff --git a/Tools/LambdaTestTool-v2/src/Amazon.Lambda.TestTool/Amazon.Lambda.TestTool.csproj b/Tools/LambdaTestTool-v2/src/Amazon.Lambda.TestTool/Amazon.Lambda.TestTool.csproj index 058e3dcd0..c51689d26 100644 --- a/Tools/LambdaTestTool-v2/src/Amazon.Lambda.TestTool/Amazon.Lambda.TestTool.csproj +++ b/Tools/LambdaTestTool-v2/src/Amazon.Lambda.TestTool/Amazon.Lambda.TestTool.csproj @@ -15,7 +15,7 @@ true Amazon.Lambda.TestTool dotnet-lambda-test-tool - 0.11.2222 + 0.11.0 NU5100 Major README.md From 566c36c2a5e8b268c08c600fa0f4e1a58fa5fb64 Mon Sep 17 00:00:00 2001 From: Norm Johanson Date: Mon, 12 Jan 2026 09:26:01 -0800 Subject: [PATCH 3/3] Remove redundant OutputType --- .../Amazon.Lambda.RuntimeSupport.csproj | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj b/Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj index 936c745c5..a98aaf074 100644 --- a/Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj +++ b/Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj @@ -35,10 +35,6 @@ Exe - - Exe - - true true