Reputation: 3118
I am using C# to create lambda functions and I want to update my lambda functions to use .NET Standard 2.0. When I try to publish using the AWS toolkit in visual studio 2017 I am unable to set the Framework to netcoreapp2.0. I tried setting the framework in aws-lambda-tools-defaults.json, but it didn't change it when I tried to publish (by right clicking on the project).
I get the following error (Since I am referencing .NET Standard 2.0 libraries): Assets file 'xxxxxxxx' doesn't have a target for '.NETCoreApp,Version=v1.0'. Ensure you have included 'netcoreapp1.0' in the TargetFrameworks for your project. https://forums.aws.amazon.com/
I updated the TargetFramework in the .csproj file to netcoreapp2.0 as well
How can I update the Framework to netcoreapp to v2.0 when publishing in Visual Studio 2017?
Upvotes: 0
Views: 995
Reputation: 1773
Too late but now, You can now develop your AWS Lambda function code in C# using the .NET Core 2.0.
Upvotes: 1
Reputation: 1
AWS Lambda only supports .NET Core 1.0. Your target framework must be set there in order to publish it as a Lambda. This means you will have to downgrade all your NuGet Packages to 1.0.x. It might be worth rebuilding the app and copying the code over from scratch.
Upvotes: 0