UrhoSharp.Forms on UWP - unable to load dll 'mono-urho'

五迷三道 提交于 2019-12-12 20:35:14

问题


I'm trying to use Xamarin.Forms to embed a Urho-application with some generic UI, defined in a portable project.

It's working on Android, so that's nice!

The Xamarin UrhoSharp Feature samples work for UWP, but the UI isn't cross-platform there, so I'd like to avoid that if possible.

On UWP x86/32-bit, which seems to be the only supported config (?), I get this exception:

"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, String[] customAssetsPaks, ApplicationOptions opt)
   at Urho.Forms.UwpSurfaceRenderer.UrhoLauncher(Type type, ApplicationOptions opts)
   at Urho.Forms.UrhoSurface.<Show>d__4`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at XamarinTest.SessionPage.<OnAppearing>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
   at System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore()

The mono-urho.dll is found in /bin/x86/debug (copied from packages...)

My references for the UWP project:

  • Microsoft.NETCore.UniversalWindowsPlatform 5.2.2
  • Oxage.Xam.VideoPlayer 1.2.0
  • Universal Windows
  • UrhoSharp.Forms 1.1.125
  • Xamarin.Forms 2.3.2.127
  • XamarinTest (my portable lib)

I looked at the DLL with the dependency walker, but I suspect it that's not really useful for UWP. It found the DirectX DLL but not the UWP-runtime, probably due to paths not being the same.

Any ideas?


回答1:


I encountered similar issue with an unchanged build of the urhosharp UWP feature samples project (https://github.com/xamarin/urho-samples/tree/master/FeatureSamples/UWP).

Would only load if run on local machine/simulator, running against phone emulator resulted in same exception you cite.

Mine was resolved by missing sub dependency; project SDK reference: Visual C++ 2015 Runtime for Universal Windows Platform Apps

Add Reference -> Universal Windows ->Extensions -> "Visual C++ 2015 Runtime for Universal Windows Platform Apps"

HTH




回答2:


I had a pending Windows 10 update on my laptop that never got installed as it was off and disconnected during night hours.

The installation failed (to 1607) and then windows rolled back the update.

Then Urho started to work in UWP again!

¯\_(ツ)_/¯



来源:https://stackoverflow.com/questions/39894134/urhosharp-forms-on-uwp-unable-to-load-dll-mono-urho

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