I made a simple ‘gamepad’ for a game I’m making, and it uses NetworkCommsDotNet to send the button presses to the host. But the problem here is that it either fails to deploy the app or shows a MissingMethodException (Sometimes it shows some sort of error)
I tried commenting the class which uses NetworkComms out and it worked, so I’ll make a guess here and assume that the problem is related to using an external DLL. Is there any way to fix it?
Sorry for the long post.
P.S.
This is what the exception window looks like.
Unhandled Exception:
System.MissingMethodException: Method
‘AppDomain.add_ReflectionOnlyAssemblyResolve’ not found.
[Break] [Continue]
EDIT1: So here’s the code for Game1.cs, which contains CircuitBoard.cs.
It’s basically a class that combines all of the other classes, such as TouchControls.cs, PacketManager.cs and MessageHandler.cs
(PacketManager uses MessageHandler to send packets, and they are both present in CircuitBoard. As long as they exist in the app, it fails to deploy.)
Although I’m not sure what a web protocol is, (I’m not that much of a web developer) I don’t think that I’m using one. Unless NetworkComms counts as a web protocol –and I doubt it, as I’m merely using it to send packets over LAN–
That is odd… and it does not give you any suggestions of a NUGET? usually if it suggests a using statement for you it also gives you an automatic using fix that uses NUGET to correct the using issue… I get this the majority of the time…
Nothing for you like that?
I pointed out Reflection as this is a .NET thing, I assume you just need to add the using for Reflection in the .NET library and this may fix the issue… what commands are you commenting out? if you can post that code, we may be able to isolate what you need to do to fix it.
Isn’t NUGET basically the packet manager? (That reminds me, I’ve got to try to update monogame and xamarin)
Anyway, nope. Those exceptions and errors only show up during runtime — while debugging. It could be that I’m missing a reference, but the chance of that being the case is very low.
I can’t use my laptop now as I’m going to sleep soon but I’ll post the code ASAP!
Oh and, this only happens when I use the NetworkComms DLL in an Android monogame project, whereas it works fine in a Windows project.
Last time I tried changing the build from debug to release, the same problem occurred.
This problem seems to be strictly related to Android so we might need an Android dev here too.
Ah Right you are using MonoGame NetworkComms, it slipped past me there… yeah I suppose I would be of no help but I may learn something here… good luck.
Thanks!
And, MonoGame NetworkComms? NetworkComms is basically a library that assists you with sending TCP/UDP packets.
I could wait for someone else (as I mentioned earlier, I’m going to sleep anyway), but you could possibly know something about it too.
Anyway, I’ll be posting the code fairly soon, and I don’t think that anyone would be able to help me with the problem without the code.
I’m not sure what proguard is either. I’ve looked pretty much everywhere in my project and I don’t see anything with that name.
I’m using Visual Studio. Maybe it’s a Xamarin thing?
It’s in the Project Properties, but forget about it, it’s available only under Release and you said you debugged the program.
So, you use the DLL that’s compiled for android on the android project and the DLL that’s compiled for windows on the windows project, right?
You didn’t accidentally reference the same dll from both projects?