Skip to content

fix: pin Amazon.Lambda.Tools to 5.13.2 for dotnet6 runtime - #897

Closed
ckawl wants to merge 5 commits into
aws:developfrom
ckawl:fix/pin-amazon-lambda-tools-for-eol-dotnet
Closed

fix: pin Amazon.Lambda.Tools to 5.13.2 for dotnet6 runtime#897
ckawl wants to merge 5 commits into
aws:developfrom
ckawl:fix/pin-amazon-lambda-tools-for-eol-dotnet

Conversation

@ckawl

@ckawl ckawl commented Jul 27, 2026

Copy link
Copy Markdown

Amazon.Lambda.Tools 7.0.0 dropped support for .NET 6 (net6.0), breaking sam build --use-container for dotnet6. Pin to 5.13.2 (last compatible version) when the runtime is dotnet6.

Issue #, if available:

Description of changes

Pin Amazon.Lambda.Tools to version 5.13.2 for dotnet6 runtime in GlobalToolInstallAction. Version 7.0.0 of
Amazon.Lambda.Tools dropped support for .NET 6.0 (net6.0), causing sam build --use-container to fail with NU1202 when
building dotnet6 Lambda functions. The fix passes the runtime to GlobalToolInstallAction and appends --version
5.13.2 to the dotnet tool install/update command only when the runtime is dotnet6. All other runtimes are unaffected.

Description of how you validated changes

  • Added unit tests covering: dotnet6 install pins version, dotnet6 update pins version, dotnet8 install does not pin
    version
  • All 25 existing unit tests pass
  • Verified sam build --use-container for dotnet6 fails without this fix (reproduces NU1202) and passes with it

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Amazon.Lambda.Tools 7.0.0 dropped support for .NET 6 (net6.0), breaking
sam build --use-container for dotnet6. Pin to 5.14.0 (last compatible
version) when the runtime is dotnet6.
@ckawl
ckawl requested a review from a team as a code owner July 27, 2026 22:55
@github-actions github-actions Bot added pr/external stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. area/workflow/dotnet_clipackage labels Jul 27, 2026

@aws-sam-tooling-bot aws-sam-tooling-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Results

Reviewed: 37cd1d1..dcb01f5
Files: 3
Comments: 1

Comment thread aws_lambda_builders/workflows/dotnet_clipackage/actions.py Outdated
ckawl added 2 commits July 27, 2026 16:06
…time builds

Replace __tools_installed boolean with __installed_version string so a
dotnet6 build can re-pin Amazon.Lambda.Tools to 5.14.0 even if another
runtime already installed the latest version in the same process.

@aws-sam-tooling-bot aws-sam-tooling-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Results

Reviewed: 37cd1d1..be5c3bf
Files: 3
Comments: 1

Comment thread aws_lambda_builders/workflows/dotnet_clipackage/actions.py Outdated
@ckawl
ckawl marked this pull request as draft July 27, 2026 23:36
@ckawl ckawl changed the title fix: pin Amazon.Lambda.Tools to 5.14.0 for dotnet6 runtime fix: pin Amazon.Lambda.Tools to 5.13.2 for dotnet6 runtime Jul 27, 2026
@ckawl ckawl closed this Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/workflow/dotnet_clipackage pr/external stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant