Xamarin.Forms - 添加外部 dll

Xamarin.Forms - Add external dll

我正在尝试在我的 Xamarin.Forms.UWP 应用程序中加载一个 dll (ACRCloud - libacrcloud_extr_tool.dll)。当我尝试访问它时,出现错误:

Unable to load DLL 'C:\Users\Martin\Desktop\libacrcloud_extr_tool.dll': Access denied (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

有没有办法在 Xamarin.Forms 项目(从 UWP 开始)中访问此 .dll?

At times, you may download a file from the Internet or receive one by email. Windows classifies certain files as unsafe downloads and attachments by identifying the files type and the security settings for each file...

看来您必须先 unlock OS 级别的 dll,然后才能在您的项目中使用它。
可以找到更多信息 here

P.S.: 它应该不会影响您的应用程序的分发过程,因为应用程序包将被视为来自受信任的来源。