Closed rpatton4 closed 1 year ago
I have confirmed on a M1 Mac that has both .NET 6 Arm64 and x64 as well as a M1 Mac that has just .NET 6 Arm64 installed that the upgrade command is working from 5.4.1 to 5.4.4.
If you uninstall 5.4.1 and then reinstall does that work? I'm wondering if something got in
dotnet tool uninstall -g Amazon.Lambda.Tools
dotnet tool install -g Amazon.Lambda.Tools
Thanks for the reply! Unfortunately no, it didn't work:
└─ $ ▶ dotnet tool uninstall -g Amazon.Lambda.Tools Tool 'amazon.lambda.tools' (version '5.4.1') was successfully uninstalled.
then
└─ $ ▶ dotnet tool install -g Amazon.Lambda.Tools It was not possible to find any compatible framework version The framework 'Microsoft.NETCore.App', version '3.1.0' (arm64) was not found.
You can resolve the problem by installing the specified framework and/or SDK.
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
normj's comment got me testing a few things, and this appears to be an issue with the 'dotnet' tool, not the aws extensions. So I closed this.
In case somebody else has the issue I would be curious what you find is the issue with the dotnet
tool.
I resolved this by doing a full wipe on my system and reinstalling MacOS. Prior to this I uninstalled .NET using scripts from Microsoft from their ARM instructions as well as their git repo with a script to uninstall. I could find no hint of .net remaining after, but with a "fresh" install of .NET 6 the dotnet tool still kept a dependency on 3.1. The full wipe and reinstall solved this. I think the issue is likely to be that I had at one point had .NET core 3.1 installed and the uninstalls left something behind.
Describe the bug
The extensions will not update on Apple M1 without .net 3.1 core, yet according to Microsoft we cannot have that version on our system if we want to use Visual Studio and .Net 6. AWS SAM does an update on the tools at the start of every build, so this is preventing SAM from initiating a build.
Expected Behavior
I'd expect
dotnet tool update -g Amazon.Lambda.Tools
to complete successfully on a machine which only has .Net 6 installed.Current Behavior
See the command and output below:
`└─ $ ▶ dotnet tool update -g Amazon.Lambda.Tools It was not possible to find any compatible framework version The framework 'Microsoft.NETCore.App', version '3.1.0' (arm64) was not found.
You can resolve the problem by installing the specified framework and/or SDK.`
Reproduction Steps
On a machine with Apple M1, follow the steps at the link below to ensure that only .Net 6 is installed, then run an update on the lambda tools. Note that according to Microsoft's instructions, you must uninstall .Net 3.1 core in order to run the GA 6 on M1.
https://docs.microsoft.com/en-us/visualstudio/mac/uninstall-net-2022?view=vsmac-2022
Possible Solution
No response
Additional Information/Context
No response
Targeted .NET platform
.Net 6 on Apple M1
CLI extension version
amazon.lambda.tools 5.4.1
Environment details (OS name and version, etc.)
Apple v12.4 Monterey