问题
I have a Xamarin.Forms project (.NET Standard 2.0 library + Microsoft.NETCore.UniversalWindowsPlatform 6.0.7) and I would like to reference a .NET Framework 4.6.1 library.
I added a reference to my Framework library in the .NET Standard 2.0 library, but this result in the error
Cannot resolve Assembly or Windows Metadata file 'Type universe cannot resolve assembly: FrameworkLib, Version=1.0.10735.0, Culture=neutral, PublicKeyToken=null.
I tried to add the reference to my FrameworkLib in the UWP project, but it fails with the message:
Unable to add a reference to project 'FrameworkLib'
Is it possible to add a reference to add a reference to a .Net Framework 4.6.1 library in a Xamarin.Forms app? Do I need a special NuGet package?
According to https://docs.microsoft.com/en-us/dotnet/standard/net-standard it seems like it should be compatible? I can reference my UWP project in my FrameworkLib, but not the other way around...
I can reproduce this with empty projects. (VS 2017)
来源:https://stackoverflow.com/questions/48893655/is-it-possible-to-reference-net-framework-library-in-a-xamarin-forms-app