Unable to add reference to third party dll in a UWP project

寵の児 提交于 2019-12-13 03:47:43

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!