UrhoSharp Xamarin.Form - 无法加载dll'mono-urho'

时间:2016-12-09 08:23:48

标签: c# dll uwp xamarin.forms urhosharp

我已经为我的Xamarin.Forms项目实现了自定义控制,我在尝试为UWP平台启动UrhoSharp引擎时遇到了问题。

问题出现在Run()控件上调用UrhoSufrace方法:

// this _engine object is my custom object with some application options
Control.Run<SceneEngine.EngineApplication>(_engine.EngineApplicationOptions);

已经有similar question,但它无法解决我的问题。

我得到的例外:Unable to load DLL 'mono-urho': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

 at Urho.Sdl.SDL_SetMainReady()
 at Urho.UWP.UrhoSurface.Run(Type appType, ApplicationOptions options)
 at Urho.UWP.UrhoSurface.Run[TGame](ApplicationOptions options)
 at IM01App.UWP.Controls.Engine3dRenderer.<OnElementChanged>d__2.MoveNext()

我已经尝试过使用UrhoSharp的不同版本。

我还检查了mono-urho.dll文件是否存在,并且可以在bin\x86\的UWP项目目录中找到它。

1 个答案:

答案 0 :(得分:1)

所以问题是mono-urho.dll的路径有空格:

UWP\bin\x86\UWP - Visualization only\mono-urho.dll
UWP\bin\x86\UWP - Visualization only\Urho.dll
UWP\bin\x86\UWP - Visualization only\AppX\mono-urho.dll
UWP\bin\x86\UWP - Visualization only\AppX\Urho.dll

我的配置名称为:UWP - Visualization only。 将其更改为:Debug解决了此问题:

UWP\bin\x86\Debug\mono-urho.dll
UWP\bin\x86\Debug\Urho.dll
UWP\bin\x86\Debug\AppX\mono-urho.dll
UWP\bin\x86\Debug\AppX\Urho.dll