M2Mqtt android/xamarin for some reason not working anymore - c#

I built an xamarin cross platform mobile application last summer. We were waiting for the hardware to be ready for us to deploy the app.
Now everything is ready I kept a copy of the application on my one drive.
I copied the application from my one drive onto my development machine last week I have been working with it in debug mode.
Yesterday I tried to compile in release mode and all of a sudden my
using uPLibrary.Networking.M2Mqtt;
using uPLibrary.Networking.M2Mqtt.Messages;
grayed out and show error could not be found. Now I can't get anything to work the way it did even in debug mode all my mqtt commands are showing an error.
I tried reinstalling the nuget packages but I get error tying to compile to ......... not available in package see author
I just don't understand what happend and why
Please let me know if you have any ideas, from what I've read it may be because I moved the project from a different folder. Please help

You need M2Mqtt for .Net MQTT with uPLibrary. M2Mqtt will provide M2Mqtt.dll to support uPLibrary. You need to add M2Mqtt.dll reference in your project.
Please check M2Mqtt for .Net : MQTT client for Internet of Things & M2M communication.

What I did originally was find m2mqtt.mono.dll which worked fine for a while until I found some bugs that were fixed in more resent commits.
I have now gotten my hands on M2Mqtt.Net.dll which I just added to my Xamarin project and it seems to be working good.
I went to paho.mqtt.m2mqtt master. Downloaded git opened sln in Visual Studio 2017, built solution and got M2Mqtt.Net.dll from M2Mqtt/obj/debug folder and added reference to it in my project.
I'll keep you advised if I have any problems

Related

Xamarin iOS: cannot use Firebase Core in project (MT0009 error while loading assemblies)

After installing Xamarin.Firebase.iOS.Core, I get this error message when trying to build and deploy to iOS simulator:
Error while loading assemblies: /Users/{mac username}/Library/Caches/Xamarin/mtbs/builds/{app name}/{build id}/bin/iPhoneSimulator/Debug/Firebase.Core.dll
It seems that the assembly
Firebase.Core.dll
is the only thing that is causing issues. This is the only error/ warning message I get back from the compiler. In my references node, all packages seem to be intact and in place.
This problem arose while trying to integrate Firebase into my app and so after creating a separate project and simply downloading the Xamarin.Firebase.iOS.Core package through NuGet (without adding any code), I get the error above. I have looked at a plethora of similar issues but none of which have fixed my problem. I am now wondering if it is an issue with the package itself but it seems that I am the only one lucky enough to encounter this error. If anyone has any clue as to what might be happening please help! I am new to Xamarin and know little about c-sharp build processes, but evidently need to start learning more about said processes, so any information is useful!
Note: I am using Xamarin Forms but this seems like a platform-specific error since it is coming from the remote iMac.
Not sure what happened, but by some miracle or by accidental causes the problem went away. It could be that I uninstalled Firebase for the indefinite number of times that I did, then installed a much older version of the iOS.Auth Package (which installed the appropriate iOS.Core package). Seeing that building went through perfectly, I kept increasing the version of the package until I got the most recent and is surprisingly (and frustratingly) working as nothing happened. To anyone else who runs into this problem, may I suggest purging your packages and temporary Mac files? But I'm still not sure what I did correctly.

can only debug not deploy xamarin app with System.Data.SqlClient class used

I'm working on an android app in Xamarin. It will debug in VS2013 community absolutely fine, deploying it to my phone on a usb tether. However I try and deploy a full .pk file set for a website download (I know the user would have to agree to installing 'untrusted apps') after I go through a standard deployment via VS2013, I try a 'dry' installation via download from a site, this doesn't work. It starts fine, and runs up until an sql-command is executed (namely logging in). Not sure how to resolve this one. Any help would be great.
So after some research the answer is simply to turn on 'west' as an option in project properties.
If this fails however this is a bug, and due to be fixed in 4.3 ? (apparently)
more information: http://forums.xamarin.com/discussion/25/problem-inserting-data-in-sql-server-in-release-mode

Toubleshooting Unity, Xcode and Server Connection from Device

I am using Unity to build an Xcode project which is then used to build to a device for testing. The other devs can build just fine and we use Source Tree to interact with our Git.
So... for some reason, even though both Unity and Xcode throw no compile errors and successfully build the app (precisely: the Xcode project, then the App) when I launch the App it throws a generic connection error (cannot connect to server, check your internet connection).
We are trying to eliminate the culprit (if there is indeed just one) - but strangely, using the same Unity player settings and Xcode settings (as far as we can tell) - all the other devs can build just fine and do not receive this connection error. The device themselves work fine, and connect through an App built from someone else's machine, but if I build it from my Mac, it does not work.
Possibly relevant info: Unity and Xcode are both pretty fresh installs as I haven't used them before starting at this company. Not sure if Xcode or Unity (or both) are overwriting certain project specifics pulled from our Git?
Edit: this was a versioning issue, and my minor version increase was enough to cause it. Lesson learned: always make sure you are running the exact same version of any shared IDE / Engine.
I almost forgot about this question... I solved this by uninstalling the latest version of Unity and then installing the version the other developers were using.
I am not sure what version of Unity I was using at the time of writing - good learning: always post the version of the programs in question. But I do remember it was only a minor update in front of the others. Some small bug fix which ended up causing this connection error.
To anyone else experiencing this problem - if you are having trouble troubleshooting builds and only getting errors from your local machine: make 100% sure you are using the exact same versions of XCode and Unity.

Using SuperWebSocket to create a WebSocket Server

I was looking for a way to implement a WebSocket server and came across SuperWebSocket which seems to have the most features. I downloaded the source code, looked at the samples (and the Echo server tutorial), but still have no clue how to do it.
I found this guide and it seemed to point me in the right direction, but I get errors with the references. I add the references to all the dlls, and I manage to import them 'using Superwebsocket.Common', but when I try to build I get an error telling me that they cannot be found.
The issues you describe sound similar to my problems trying to get the SuperWebSocketWeb demo up and running. I had a similar problems with the project references, which at design time in visual studio seemed fine but failed during a build.
To solve this I made sure that the demo project and SuperSocket assemblies were all built targeting the same .net framework version (4.5 in my case).

AndroidManifest.xml does not merge activity info upon Build

Pretty new to Mono for Android (C#), and I'm seeming to have trouble during one of their tutorials where it mentions that info on Activities is merged into AndroidManifest.xml upon compilation.
The FirstActivity class is set to Compile upon Build, yet no AndroidManifest file is created. One can be created via the Project menu but it doesn't include any information on Activities and does not update when these are changed.
Had a look around on the internet but I only managed to find issues relating to Visual Studio.
Any help would be appreciated! :) Thanks.
edit: I'm using the evaluation version right now, if that's any problem.
edit: Getting more problems it seems. Had trouble accessing the AVD through Mono and decided to reinstall the Android SDK to the latest version. Attempts to run the program on the emulator cause the 'Devices' list to disappear shortly after emulator startup (or, at the very best, it fails to acknowledge that an emulator is active). running 'adb devices' spits out the correct emulator "emulator-5554" or something, but Mono's just repeatedly failing to notice.
It's correctly pointed to Android SDK and Java as far as I know.
The AndroidManifest.xml that is generated is created in:
obj\Debug\android\AndroidManifest.xml
The one in your project is not touched.

Categories