I have my main project in Framework 4.7.2 , and this project references a netStandard Library project which is a netstandard 2.0.
I need "DbProviderFactories" in the .Net Standard project.
like:
System.Data.Common.DbProviderFactory fact = System.Data.Common.DbProviderFactories.GetFactory(providername);
I can Change the netStandard Project version to 2.1, which contains DbProviderFactories, but netstandard 2.1 does not consume with framework 4.7.2
Is there any Other way I can do this.
You just need to add this tag to your app.config, it will enable to work with legacy version of the .net framework.
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
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