0
votes

I tried the older versions of Android SDK but every time when I try to open Main.axml I get this error:

System.ComponentModel.Composition.ImportCardinalityMismatchException: No exports were found that match the constraint: ContractName VisualStudioWorkspace RequiredTypeIdentity Microsoft.CodeAnalysis.Workspace at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition) at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportsCore(Type type, Type metadataViewType, String contractName, ImportCardinality cardinality) at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportedValueCore[T](String contractName, ImportCardinality cardinality) at Xamarin.VisualStudio.Android.MonoAndroidDesignerInterface.GetCodeModelBridge() in C:\data\lanes\3513\00fa5cc4\source\xamarinvs\src\Core\VisualStudio.Android\Designer\MonoAndroidDesignerInterface.cs:line 154 at Xamarin.AndroidDesigner.DesignerProject.get_CodeModelBridge() at Xamarin.AndroidDesigner.DesignerProject.d__175.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Xamarin.AndroidDesigner.DesignerProject.d__139.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Xamarin.AndroidDesigner.AndroidRenderSession.d__105.MoveNext()

1
Try clearing %LOCALAPPDATA%\Microsoft\VisualStudio\14.0\ComponentModelCache. What is the version info from Visual Studio > Help > About Microsoft Visual Studio > Copy Info [button]?ashley
Thanks for the help, problem solved by reinstalling Visual Studio and Xamarin.Dawid Pietrykowski

1 Answers

0
votes

First update all the Xamarin Forms ( not Xamarin.Android ) nugets. Then delete bin/obj directories from PCL and Android Setup Droid MIN sdk to 4.4 KitKat Make sure project name and version are set in droid. Build only PCL via right-mouse build. Build only Droid via right-mouse build.

Hope this helps.