Hello,
I'm trying to publish my project which uses .net standard 1.6.1 which should work in .net core 1.0 environment.
During publish i got error:
Error: Project is referencing NETStandard.Library version 1.6.1. Max version supported by netcoreapp1.0 is 1.6.0.
Error: NETStandard.Library 1.6.1 is used for target framework netcoreapp1.1.
.NET Standard 1.6.1 is part of the .NET Core 1.1 release. It is basically the implementation of .NET Standard for .NET Core 1.1.
@normj So why am I able to compile and run .net core 1.0 project in visual studio with .net standard 1.6.1 libraries? https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/189
Probably i just don't get sthn.
When you project pulls in the .NET Standard 1.6.1 NuGet meta package it pulls in a lot of .NET Core 1.1 system dlls into your dotnet publish folder. Then when it is running in Lambda the .NET Core assembly loader will load those system dlls that got included with your Lambda package instead of the system dlls that were compiled for the Lambda environment which will cause a mismatch.
ok. thanks for clarification!
I was able to get past this error by manually changing references to NETStandard.Library from 1.6.1 to 1.6.0 in project.lock.json just prior to publishing to AWS through Visual Studio 2015. The publishing completed - zipping up the dlls and uploading to them to an S3 bucket. Caveat: I have had trouble getting the AWS Lambda function provisioned by the stack to take - I get a "function not found" error. No idea if it is related to this error or my workaround.
Follow-up on prv post:
My " function not found" error was not related to the changes in project.lock.json. So changing references to NETStandard.Library from 1.6.1 to 1.6.0 in project.lock.json is a viable workaround.
@caseytronic Well it seems like smelly workaround/hack. Amazon still does not support NetStandard 1.6.1 so it's risky to deploy it.
Also, it looks like Microsoft about 15 days ago added LTS* to 1.1 on this page: https://www.microsoft.com/net/core/support so maybe AWS will support this in Lambda
In my case, I found the 1.6.1 dependency was though Newtonsoft.Json to 10.0.3. I downgraded NewtonSoft.Json to 10.0.1. and this changed the dependency to NetStandard 1.6. FWIW: I sometimes feel like we are building on a house of cards. I guess this is the new normal in 21st century devops. Good thing there are a great many hands to fix things when something goes wrong. Such is open source on a global scale.
@normj See above for updated support matrix from Microsoft. Do you have a timeline to allow netcoreapp1.1 in AWS Lambda?
I'm writing more lambda functions lately but almost all general purpose / non-Lambda specific packages are not compiled with 1.6.0. Having netcoreapp1.1 support will greatly speed up my adoption/migration to AWS Lambda.
Most helpful comment
In my case, I found the 1.6.1 dependency was though Newtonsoft.Json to 10.0.3. I downgraded NewtonSoft.Json to 10.0.1. and this changed the dependency to NetStandard 1.6. FWIW: I sometimes feel like we are building on a house of cards. I guess this is the new normal in 21st century devops. Good thing there are a great many hands to fix things when something goes wrong. Such is open source on a global scale.