Could not load assembly 'Windows.Foundation.UniversalApiContract.winmd'

sylvrecsylvrec USMember
edited January 6 in Xamarin.Android

Hi,

I have a error when i build my solution in Xamarin.Android.
My project is a solution Xamarin.Forms PCL.

Build error list
Severity Code Description Project File Line Suppression State
Error The "ResolveLibraryProjectImports" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load assembly 'Windows.Foundation.UniversalApiContract.winmd, Version=, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'Windows.Foundation.UniversalApiContract.winmd.dll'
at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(String fullName, ReaderParameters parameters)
at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(String fullName)
at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.GetAssembly(String fileName)
at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Extract(ICollection1 jars, ICollection1 resolvedResourceDirectories, ICollection1 resolvedAssetDirectories, ICollection1 resolvedEnvironments)
at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() DxCareAppsPhysician.Droid

When i seen this error i linked this Windows.Foundation.UniversalApiContract.winmd but i have same error.

I don't know which library need this reference.

Here my csproj Xamarin.Android with all references -> http://pastebin.com/R1FDzyUm

Thank for your help.

Posts

  • MichaelEngelmannMichaelEngelmann FRMember ✭✭
    edited February 19

    Any update on this? I've the same issue with the Android project in a Xamarin.Forms using solution.

    Other Xamarin solutions with Android projects are just building fine. This happens on my 2 development stations, so the origin is probably located somewhere in the project files ...

  • MichaelEngelmannMichaelEngelmann FRMember ✭✭

    I found my problem:
    I was using the FileAttributes from the Windows.Storage namespace which is located in the Windows.Foundation.UniversalApiContract assembly ...

Sign In or Register to comment.