问题
Since a UWP
app is a .NET Core
app, a reference to a third party dll created in .NET 4.0
is not getting added in my UWP project in VS2017
. I'm getting the error shown below. A similar question has been answered here. But since that question is about 6 years old, and since then a lot has changed in the .NET Core world, I thought may be there are some better solutions to my problem than just rather complicated workarounds. Are there any simpler solutions to make a third party dll reference added to a UWP project?
Error:
回答1:
You can't add a .NET Framework DLL to a UWP app.
The best/closest thing you can to is add a desktop extension to your UWP process, which is a separate process that can run the full .NET Framework on desktop and therefore load this DLL.
Here is a tutorial on desktop extension for UWP: https://stefanwick.com/2018/04/06/uwp-with-desktop-extension-part-1/
来源:https://stackoverflow.com/questions/55175814/unable-to-add-reference-to-third-party-dll-in-a-uwp-project