-
Notifications
You must be signed in to change notification settings - Fork 459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AWS Lambda uses netstandard 1.3 can we downgrade Windsor from netstandard 1.6? #299
Comments
So the problem is that AWS lambda supports only .NET Core 1.0. |
As I mentioned in #145: "We had to go with .NET Standard 1.6 to use Microsoft.Extensions.DependencyModel until we move to .NET Standard 2.0 in the future", other than that there are probably a heap of other missing APIs. According to the docs .NET Core 1.0 supports .NET Standard 1.6. So it sounds like the problem is not .NET Standard 1.6 but which version of System.* packages. Looking at the build output it is definitely testing against .NET Core 1.0:
However, I see
This is the part I'm still unclear about, how does this actually happen, I meant what in the package definition causes .NET Core 1.1 to be required, and how do we know which packages we can actually use? |
Here be a skeleton. Could perhaps flag this as a
MsBuild does not like this, it says
+1 We should investigate more. |
I'm looking forward for an issue in the aws/aws-lambda-dotnet repo about this issue. basically there is a property in the project file used to specify the version of the NETStandard.Library package to be intrinsically included. Maybe @normj can help us on the issue? Anyway, Lambda supports .NET Core 1.0 which is an implementation of .NET Standard 1.6, that means any library written for any version of .NET Standard up to 1.6 (included) will work on Lambda. EDIT: I found this issue that mentions the implicitly added packages: dotnet/sdk#764 |
I'm completely guessing here based on reading a few GitHub issues around the place, but it seems like it was a .NET Core 1.x tooling mistake for libraries to implicitly have NETStandard.Library added as a dependency, and .NET Core 2.x tooling will no longer add it for executables.
(Domysee/Pather.CSharp#3 (comment)) Or we could use |
@Fir3pho3nixx I still believe it is the right decision to use |
I might just dust off my hello world aws function, manually compile windsor from master and kick it up there to see what errors we get. Also should we raise an issue with the AWS lambda team to upgrade? (Surprised this has not been done already). |
@Fir3pho3nixx great to hear, I guess that means we don't have anything blocking a release. @Kralizek would love to hear from you before we make the release. |
@jonorossi it looks like the test done by @Fir3pho3nixx is a good evidence that v4 will run on Lambda without any issue. I'll try to work on another test during the afternoon (right now it's 11:40 here in Sweden) Anyway, thanks a lot for the attention to this specific use case :) |
Late to the issue but here is what I have learned from developing the AWS Lambda libraries. To force the project to use .NET Standard Library 1.6.0 the .NET Core 1.0 implementation add the following to the csproj. By default VS uses 1.6.1.
|
Thanks @normj, however it appears (@Fir3pho3nixx test above) we don't need to force NETStandard.Library 1.6.0 and 1.6.1 works, unless you know something we don't. |
FYI I'm going to cut the release tomorrow. |
Locking to 1.6.0 would be ideal but seeing as there is a dependency to System.Runtime.Serialization.Formatters which only has versions dependent on NETStandard.Libary 1.6.1 I'm not sure that is feasible. What happens when your project depends on 1.6.1 and is being used on a netcoreapp1.0 the publish folder will end up containing a lot of the system libraries like System.Net.HttpClient.dll and System.Threading.dll. So in @Fir3pho3nixx case his simple function which should only contains his project dll and Windsor ends up being about 8 megs worth of stuff. Also I'm sure there will be cases this will fail when you get to more advanced cases because the .NET Core loader will end up loading the packaged up system dlls instead of the versions we compiled for the Lambda environment. |
@normj thanks for more info, I still don't understand the underlying change Microsoft made that causes the incompatibility, however I also came across this issue (aws/aws-lambda-dotnet#129) which provides some info on referencing the
That is what I've concluded too, and with
This really is just something AWS will have to solve if they want their customers using .NET Core on Lambda, or I guess they wait until .NET Core 2.0 is out as it'll be an LTS release. |
The package Amazon.Lambda.Core uses
netstandard1.3
from NuGet and it also has runtime dependencies on:Can we downgrade the current implementation to netstandard 1.3 and System.X 4.1?
The text was updated successfully, but these errors were encountered: