Bug 44148 - No exports were found that match the constraint
Summary: No exports were found that match the constraint
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Designer ()
Version: 7.0 (C8)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jérémie Laval
URL:
Depends on:
Blocks:
 
Reported: 2016-09-09 16:52 UTC by Hrvoje
Modified: 2016-09-09 18:59 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Hrvoje 2016-09-09 16:52:35 UTC
After installing latest beta Android 7.0.0.15, designer won't open any layout.

Here is the error log:

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:\Users\builder\data\lanes\3513\c54ec37a\source\xamarinvs\src\Core\VisualStudio.Android\Designer\MonoAndroidDesignerInterface.cs:line 154
   at Xamarin.AndroidDesigner.DesignerProject.get_CodeModelBridge()
   at Xamarin.AndroidDesigner.DesignerProject.<UpdateDesignerResourceIds>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.<EnsureLoaded>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.<InitSession>d__105.MoveNext()
Comment 1 Hrvoje 2016-09-09 18:59:33 UTC
Just found the cause of that problem.

Obviously something was left in cache, so this is a workaround for VS 2015.

Clear the content of the folder:

C:\{username}\hrvojematic\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache

Closing the issue.