Levon February 2016

Xamarin - Could not load assembly 'PCLStorage.Abstractions

After adding the FlurlHttp Nuget package to my PCL project my app will no longer deploy to my emulator due to an assembly loading error

Error Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'PCLStorage.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=286fe515a2c35b64'. Perhaps it doesn't exist in the Mono for Android profile? File name: 'PCLStorage.Abstractions.dll' at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters) at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(ICollection1 assemblies, AssemblyDefinition assembly, Boolean topLevel) at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(ICollection1 assemblies, AssemblyDefinition assembly, Boolean topLevel) at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(ICollection`1 assemblies, AssemblyDefinition assembly, Boolean topLevel) at Xamarin.Android.Tasks.ResolveAssemblies.Execute() InfoSupport.AV.MobileClient.Droid C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets 1347

The build system is also reporting conflicts :

There was a conflict between "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes". (TaskId:77) 2> "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" was chosen because it was primary and "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes" was not. (TaskId:77)

There was a conflict between "PCLStorage.Abstractions, Version=0.9.6.0, Culture=neutral, PublicKeyToken=286fe515a2c35b64" and "PCLStorage.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=286fe515a2c35b64".

Answers


Levon February 2016

Adding the nuget package PclStorage v1.0.2 to the PCL project resolves both warnings and the deployment error.

I'm not sure why this dependency is there.

Post Status

Asked in February 2016
Viewed 3,583 times
Voted 10
Answered 1 times

Search




Leave an answer