Thursday, April 14, 2016

Xamarin error - Could not load assembly 'Xamarin.Android.Support.v4'

After upgrading my Visual Studio to the latest version, I couldn’t compile my Xamarin project anymore. Instead I got the following error:

Severity    Code    Description    Project    File    Line    Suppression State
Error        Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'Xamarin.Android.Support.v4.dll'
   at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
   at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(ICollection`1 assemblies, AssemblyDefinition assembly, Boolean topLevel)
   at Xamarin.Android.Tasks.ResolveAssemblies.Execute()    App1.Droid    C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets    1316
   

image

Luckily it was fixed easily by updating the Xamarin.Android.Support.v4 NuGet package to the latest version.

image

2 comments:

Web and Mobile APP Development Company said...

DevRabbit IT Solutions Inc. is a Xamarin Mobile Application Development company with a team of Xamarin developers can build affordable customized Xamarin ios apps (cross platform development) as a part of DevRabbit's Xamarin Consulting and here sіmply wishing as your article іs amazing.

Software Company Dublin CA said...

Informative article on Xamarin Error. Hire Xamarin Developer of Devrabbit, an Authorized Xamarin partner.