xamarin / urho

Code to integrate with the Urho3D engine
Other
463 stars 122 forks source link

"Failed to resolve assembly" errors #361

Open deakjahn opened 5 years ago

deakjahn commented 5 years ago

1.9.67 gives Failed to resolve assembly: UrhoForms, Version=0.0.0.0 errors. 1.8.93 worked flawlessly.

EgorBo commented 5 years ago

@deakjahn could you please share more details - which version of XF, what platforms cause this issue. E.g. your XF android projects should be at least monodroid81 target, etc

deakjahn commented 5 years ago

XF: latest, 3.4.0.1008975 Nothing else changed, just Urho updated from 1.8.93 to 1.9.67.

There are actually two errors, the one noted above references the namespace in the XAML file (xmlns:urho="clr-namespace:Urho.Forms;assembly=Urho.Forms").

The second comes from the UWP project:

Cannot resolve Assembly or Windows Metadata file 'Type universe cannot resolve assembly: Urho.Forms, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.'

Warning NU1701 Package 'UrhoSharp.Forms 1.8.93' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.

EgorBo commented 5 years ago

@deakjahn can I see your csprojs? I suspect you have some old targetframeworks, e.g. as I said - Android must be >=monodroid81

deakjahn commented 5 years ago

Android 9.0, support libraries just changed to 28 very recently. Are we speaking about this version (because I couldn't find the actual name monodroid anywhere)? I suspect so, so in this case, it's long switched to 9.0.

EgorBo commented 5 years ago

@deakjahn those are API levels, what I mean is e.g. <TargetFrameworkVersion>v8.1</TargetFrameworkVersion> or monodroid81

deakjahn commented 5 years ago

It's been staying at

<TargetFrameworkVersion>v9.0</TargetFrameworkVersion>

since the discovery of the Americas. ;-))

deakjahn commented 5 years ago

Just to mention that nothing has changed. Brand new installation of Windows and Visual Studio 15.9.7, Xamarin Forms 3.5.0.129452, UrhoSharp.Forms 1.9.76, error message:

Failed to resolve assembly: 'Urho.Forms, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'

Projects: UWP, Android 28.0.0.1 (targeting 9.0)

As soon as I downgrade Urho, everything runs perfectly with the very same environment.

MartinOrtiz commented 5 years ago

I have Windows 10, VS 2019. I create new Xamarin forms project. (iOS, Android, UWP) I did nuGet of UrhoSharp-ns2-preview (version 2.0.6)

I copied sample code into the UWP project (the one with all the demo samples). It builds, but I get the same error. When I run it, and click on an example it crashes.

MartinOrtiz commented 5 years ago

here is download link to project https://app.box.com/s/odlj7mwjldo59bkmrwzi4ap2wc9xy8hn

MartinOrtiz commented 5 years ago

Here is exception....(I thought I got the "unresolved" exception at some point..) In Samples.cs On this line of code: protected Sample(ApplicationOptions options) : base(options) { }

System.Exception HResult=0x80131500 Message=Implementation assembly (iOS, Android or Desktop) is not referenced Source=UrhoSharp StackTrace: at Urho.UrhoPlatformInitializer.DefaultInit() at Urho.Context..ctor() at Urho.Application..ctor(ApplicationOptions options) at Urho.Samples.Sample..ctor(ApplicationOptions options) in C:\Users\martin\Downloads\UrhoApp2\UrhoApp2\UrhoApp2\UrhoApp2\Core\Sample.cs:line 48 at Urho.Samples.AnimatingScene..ctor(ApplicationOptions options) in C:\Users\martin\Downloads\UrhoApp2\UrhoApp2\UrhoApp2\UrhoApp2\Core\05_AnimatingScene\AnimatingScene.cs:line 30

MartinOrtiz commented 5 years ago

If you get errors during build, doing a rebuild seems to clear it up.

MartinOrtiz commented 5 years ago

Error happens when I select a demo in the list on the left (any of them)

uj2
mdbill commented 4 years ago

(xmlns:urho="clr-namespace:Urho.Forms;assembly=Urho.Forms").

I had success by changing Urho to UrhoSharp... xmlns:urho="clr-namespace:Urho.Forms;assembly=UrhoSharp.Forms"