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.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj b/Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj index b921afb9b..a98aaf074 100644 --- a/Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj +++ b/Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj @@ -22,11 +22,17 @@ ready to make a major version release of our libraries. --> false - - + 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..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.1 + 0.11.0 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 @@ -