MT2001 could not link assemblies – Xamarin IOs

Had this build error – preventing all IOS development. Searched around for fixes all over the place but of course the solution was simple as usual 🙂    I had accidentally added a direct Mono.dll dependency in my base project and was referencing the Android namespace (using Android.***) in a couple of (XML and c#) files. This caused the MT2001 horror 🙂  Again, learned a lot about the build procedure during the debugging process but the solution was just toooo simple as usual. Hope this helps someone.

Facebook OWIN login not working – returning null from AuthenticationManager.AuthenticateAsync

Using OWIN 4.0.1 on my sites – the google authentication worked fine but I couldn’t find out why the Facebook process always returned null – redirecting only to the same URL – adding the typical #_=_ to the /Account url.    Finally thought of my Cloudeflare proxy and that it might be impacting Facebook’s response.  Turning off the cache solved the issue – but maaaaan how much I have learned in the past 10+ hours spent on this 😉  #liveandlearn

Xamarin.Forms: Error parsing XML: not well-formed (invalid token) when compiling Android

Suddenly my Android Xamarin.Forms project stopped compiling because of a couple of corrupt XML files. The error message is: “Error parsing XML: not well-formed (invalid token)”

Turns out that at that the source resource files in the

C:\Users\Geir\AppData\Local\Xamarin\Xamarin.Android.Support.v7.AppCompat\23.3.0.0\embedded\res\

folder had been corrupted, probably by my antivirus program, there was a path to Avira among the unreadable (I have no clue what kind of encoding or content was in the file – it was not XML)

This file is on compile time copied into the  \obj\Debug\resourcecache\[some-identifier]\res\ folder where it is of course unparsable as XML.

Hope this helps someone, took me a while to figure out from where the xml file was copied (of course file search should have come to my mind an hour earlier than it did 🙂 )

Capture

Visual Studio 2017 – .net 4.5.2 – The compiler failed with error code 255.

This gave me the reason to start blogging again – just with the hope that a single developer might get some extra moments doing fun coding instead of analysing this horrible error …. it took me some useless IIS and permission experimenting before stumbling upon this solutijon.

http://stackoverflow.com/questions/32282880/publish-website-without-roslyn

“When you create a new web project, two nuget packages automatically added to your project. If you remove them, your problem should be solved. Package names are: “Microsoft.CodeDom.Providers.DotNetCompilerPlatform” and “Microsoft.Net.Compilers”.

JQuery ajax ($.ajax()) returning to error function despite success (200 ok) response

Turns out that returning void from (asp.net mvc) server function, but jquery ajax call data type was set to json – so when receiving no data back – the ajax function returns to the error function.

So the example below would always alert “error” as the server controller action return was void

$.ajax({type: “POST”,url: “/MyController/MyAction/”,data: [postData], success: function (data) { alert(“success”); }, error: function () { alert(“error”); } });

Java Play framework: Driver not found: [com.mysql.jdbc.Driver]

Dealing with the Java Play framework for the first time – I followed the instructions here:

http://www.playframework.com/documentation/2.0/ScalaDatabase  (and in a number of other Stackoverflow posts and various blogs)  

All failed to mention (or I somehow failed to read) that one has to “reload” the solution in the console after adding the database reference for the application to load the jdbc driver into the application.  Probably too obvious for regular users – but too a couple of hours for a newbe like me to figure out 🙂

PhoneGap asp.net forms authentication not working on ios

Bundling my PhoneGap app for IOS – I had a strange authentication problem. Using forms authentication on my asp.net mvc backend, the login form always came back with the Request.IsAuthenticated = false – that is, only on the IPhone (not even on iPad), the login request did not return the authentication headers neede to log into the application …

My biggest luck tonight was to find this post !!!

http://groups.google.com/group/phonegap/browse_thread/thread/4e18f47d2d860e1e

Adding timeout and cookieless properties into the forms element solved the issue … the post explains why

Thank you “austin.fathe…@gmail.com” !!!

Creating signing key and signing .apk for Google Play

A note2self on how to sign Android apps for Google Play ….  wiki on how to use OpenSsl to generate keys

http://android-dls.com/wiki/index.php?title=Generating_Keys

The whole procedure of creating keys and signing – with links to OpenSsl download

http://www.londatiga.net/it/how-to-sign-apk-zip-files/

If you get a configuration error in the 2nd step when creating keys … try adding an environment variable called “OPENSSL_CONF” with value to the openssl.cnf (e.g. “C:\Apps\Signing\openssl.cnf”)