I have installed dotnet tool.
install --global Amazon.Lambda.Tools --version 3.0.1 and trying to use in the .net core project 2.1. I am getting this error on setting the project file.
<ItemGroup>
<DotNetCliToolReference Include="Amazon.Lambda.Tools" Version="3.0.1" />
</ItemGroup>
but I am getting this error.
Package Amazon.Lambda.Tools 3.0.1 is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Package Amazon.Lambda.Tools 3.0.1 supports: netcoreapp2.1 (.NETCoreApp,Version=v2.1)
Help??
The the info on the usage here: https://github.com/aws/aws-extensions-for-dotnet-cli
Basically you will need to remove this from the project file:
<-- This line needs to be removed -->
<DotNetCliToolReference Include="Amazon.Lambda.Tools" Version="X.X.X" />
and the tools will need to be installed the following way moving forward:
dotnet tool install -g Amazon.Lambda.Tools
In late 2019, the tool got moved as a global one, instead of being installed locally within the project, it is installed at a machine level. Go to package manager console in VS, give the command as below:-
dotnet tool install -g Amazon.Lambda.Tools
If its an older project being migrated to newer version, in the project file, the DotNetCliToolReference
line needs to be removed.
Now the project file has an entry which marks the project as a Lambda function as follows, if not present then this needs to be added manually in the main property group.
<AWSProjectType>Lambda</AWSProjectType>
Ref: https://github.com/aws/aws-extensions-for-dotnet-cli
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With