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
.NetStandard2.0 version #889
Comments
Duplicate of #867. netstandard 1.1 is 100% compatible with netstandard 2.0. The reverse is not true - you can't use netstandard 2.0 items in netstandard 1.1 projects. We need to maintain as wide a compatibility as possible, so we will continue targeting netstandard 1.1. If that isn't working in your netstandard 2.0 project, it's likely a tooling problem. I'd recommend asking the folks in the Azure Functions repo or on StackOverflow. Note a quick Google search of "azure functions autofac" returns several things that may help you.
I'd recommend doing some searching to see if you can get unblocked before filing an issue with Azure Functions or asking on StackOverflow. It looks like the examples and answers you're looking for could be out there already. |
@tillig While this is true, there is a drawback not having .NETStandard 2.0 target: it will drag a lot of references to a (i.e. Xamarin) project. Supporting .NETStandard 2.0 means just adding a target to TargetFrameworks node (netstandard2.0) and fixing a empty array allocation. The code will be still the same but it won't drag a ton of references. I can provide a PR if you wish so. |
The empty array return value could actually be The general recommendation is "to target the lowest version of .NET Standard possible". @MihaMarkic Can you expand on the issue you are seeing with the Xamarin project? @sescandell Did you manage to find out what the cause of your Azure Functions V2 issue was? If there are good reasons for adding an additional target then it is something we can consider. If the issue lies elsewhere then the problem will only be solved until another library targeting a lower version of .NET Standard is added to such projects triggering the same issue. |
@alexmg Check references. |
Hi, I opened an issue on MSDN Forum. This specific issue seems to be tied to Azure Function V2 in particular. As I said in my first post, everything is working fine on Azure Function V1. I'm not asking "how to make Autofac work with Azure Function". Something that worked with AFv1 doesn't work anymore with AFv2. But, contrary to my first feelings and as @tillig precised, this is not an issue from Autofac neither because of a missing targeted framework. Azure Function v2 is working fine with Autofac v4.0.0. Thanks for your help! |
By the way, I made a few tiny modifications to sources for targeting :NET Standard 2.0. Seems working just fine in a project of mine. |
Just to end the debate. Latest VS NuGet pacakage manager will hide the mentioned references and thus won't pollute anymore. |
Hi there,
Any change to get a release including .netstandard2.0 target ?
If I well understand latests commits and issues, things are made so .netstandard2.0 is now targeted.
I made a simple test project and for now, we cannot use Azure Function V2 with Autofac, I supposed because of .netstandard2 targeting issue (at runtime, process doesn't succeed to load the Autofac Assembly).
Thanks for your feedback,
The text was updated successfully, but these errors were encountered: