Could not load assembly 'Xamarin.Android.Support.Fragment, Version=1.0.0.0

Hi,

I have updated my Xamarin forms version to 2.5.0.91635.

Portable projects build, but the Droid project fails to build with the following error message...

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

Here are my VS and SDK versions:

Microsoft Visual Studio Enterprise 2017 Version 15.4.5
Xamarin 4.7.10.38 (34c1b6c)
Xamarin.Android SDK 8.0.2.1 (HEAD/c2a33d8ea)
Xamarin.iOS and Xamarin.Mac SDK 11.3.0.47 (51128b8)

Is there something extra I need to do to get this to build with the latest version?

Please help...

Best Answer

Answers

  • bytebuilderbytebuilder USMember ✭✭

    thanks @WilliamWatterson . This worked for me!

    FYI, there's another solution posted here: in case other people prefer that one:

    https://forums.xamarin.com/discussion/comment/310163

  • anish_palanish_pal INMember ✭✭

    After updating the latest Xamarin.Forms from nuget this works fine too.

  • ArunPrasad.007ArunPrasad.007 USMember ✭✭

    @WilliamWatterson said:
    Found my issue. I didnt have the target framework version for the droid project set properly. I had selected framework 6 - so I increased this to "latest" and updated the XamarinForms nuget package again. and it builds ok now.

    Yes, This will work perfectly.

Sign In or Register to comment.