无法在 UWP 项目中添加对第三方 dll 的引用 [英] Unable to add reference to third party dll in a UWP project
问题描述
由于 UWP
应用程序是 .NET Core
应用程序,因此无法获取对在 .NET 4.0 中创建的第三方 dll
的引用在 VS2017
中添加到我的 UWP 项目中.我收到如下所示的错误.
不能将 .NET Framework DLL 添加到 UWP 应用.
你能做的最好/最接近的事情是向你的 UWP 进程添加一个桌面扩展,这是一个单独的进程,可以在桌面上运行完整的 .NET Framework 并因此加载这个 DLL.
这里是 UWP 桌面扩展的教程:https://stefanwick.com/2018/04/06/uwp-with-desktop-extension-part-1/
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:
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/
这篇关于无法在 UWP 项目中添加对第三方 dll 的引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!