locked
winRT xaml designer stopped working

    Question

  • hey there,

    I have a global problem with my windows store app's XAML designer in visual studio.

    The designer simply stopped working and throws all sorts of exceptions...

    System.ArgumentNullException
    Value cannot be null.
    Parameter name: key
       at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
       at Microsoft.Expression.DesignModel.Metadata.PlatformMetadataBase.NewReplacedExternalType(PlatformMetadataBase platformMetadata, IPlatformTypes sourcePlatformTypes, IAssembly assembly, Type keyType, Type replaceType, ITypeId baseType, ITypeId neutralType, IXmlNamespace xmlNamespace, String clrNamespace, AttributeCollection attributes, ProxyPropertyDescription[] properties)
       at Microsoft.Expression.DesignModel.Metadata.PlatformMetadataBase.NewReplacedExternalType(PlatformMetadataBase platformMetadata, IPlatformTypes sourcePlatformTypes, IAssembly assembly, Type keyType, Type replaceType, ITypeId baseType, ITypeId neutralType, IXmlNamespace xmlNamespace, String clrNamespace, ProxyPropertyDescription[] properties)
       at Microsoft.Expression.WindowsXamlPlatform.WindowsUIXamlPlatformMetadata.OnInitialize()
       at Microsoft.Expression.WindowsXamlPlatform.WindowsUIXamlPlatform.Initialize()
       at Microsoft.Expression.Platform.PlatformCreatorBase.CreatePlatform(IPlatformReferenceAssemblyResolver referenceAssemblyResolver)
       at Microsoft.Expression.DesignSurface.Project.ProjectContextBase.Initialize()
       at Microsoft.Expression.DesignSurface.Project.XamlProjectContext.Initialize()
       at Microsoft.Expression.DesignSurface.Project.ProjectContextManager.GetProjectContext(IHostProject project, IPlatform platform, Boolean create)
       at Microsoft.Expression.DesignSurface.Project.ProjectContextManager.GetSourceItemContext(IHostSourceItem sourceItem)
       at Microsoft.Expression.DesignSurface.DesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass10.<>c__DisplayClass12.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner>b__f(CancellationToken cancelToken)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.CallWithCancellation[TResult](IRemoteCancellationToken remoteToken, Func`2 func)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass10.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner>b__e()
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass16`1.<MarshalIn>b__15()
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()
    
    System.ArgumentNullException
    Value cannot be null.
    Parameter name: key
    
    Server stack trace: 
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalIn(Action action, Int32 targetApartmentId)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn(IRemoteObject targetObject, Action action)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn[TResult](IRemoteObject targetObject, Func`1 func)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor, IRemoteCancellationToken remoteToken)
       at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
       at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
    
    Exception rethrown at [0]: 
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor, IRemoteCancellationToken cancelToken)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass8.<CreateDesignerImpl>b__6(IRemoteDesignerService d)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass4`2.<MarshalOut>b__3()
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()
    
    System.ArgumentNullException
    Value cannot be null.
    Parameter name: key
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOutSynchronous(Action action, Int32 targetApartmentId, WaitHandle aborted, WaitHandle timeoutSignal)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOut(Action action, Int32 targetApartmentId, WaitHandle aborted, CallSynchronizationMode syncMode, WaitHandle timeoutSignal)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TValue](RemoteHandle`1 targetObject, Action action, CallSynchronizationMode syncMode)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TResult,TValue](RemoteHandle`1 targetObject, Func`2 func, CallSynchronizationMode syncMode)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.CreateDesignerImpl(IHostSourceItem item, IHostTextEditor editor, RemoteCancellationToken remoteCancelToken)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass12.<Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner>b__11(RemoteCancellationToken remoteToken)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.CallWithCancellation[TResult](CancellationToken cancelToken, Func`2 func)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken)
       at Microsoft.Expression.DesignHost.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken)
    

    I have exactly no clue where this is coming from.

    Up until a few hours ago, it threw an exception saying it can not reach a path in the bin/release folder of the solution.

    I want to add that compiling and running the app is fine, I guess this is a problem strictly with visual studio's designer.


    Sunday, September 1, 2013 9:36 AM

Answers

  • I'm not sure, but re-install win8 seems to be a more safer way. Or let's see what Connect guys will tell you.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, September 5, 2013 8:31 AM
    Moderator

All replies

  • After a little digging it appears the designer throws that error every single time a page "template" other than blank page is used in a project, or if the XAML toolkit for winRT nuget package is installed.

    For instance, a project ONLY with blank page templates will be fine.

    On the other hand, if i add a groups item template page or a split page or a grid page that automatically adds stuff to my project, the designer goes nutts.

    Removing the custom pages and uninstalling that specific nuget package does not fix the issue. This is really annoying. I don't want to restart my project every single day....

    EDIT: adding any reference breaks the designer.

    Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteException
    Value cannot be null.
    Parameter name: path
       at Microsoft.Expression.Utility.IO.DocumentReference..ctor(String path, Func`3 streamProvider)
       at Microsoft.Expression.Utility.IO.DocumentReference.Create(String path)
       at Microsoft.Expression.Utility.WindowsRuntimeContext.InitializeTypeNameMap()
       at Microsoft.Expression.Utility.WindowsRuntimeContext.GetTypes(Assembly runtimeAssembly, Action`1 onError)
       at Microsoft.Expression.DesignModel.Metadata.AssemblyExtensions.GetTypes(IAssembly assembly, Action`1 onError)
       at Microsoft.Expression.DesignModel.Metadata.TypeResolver.<GetTypes>d__1.MoveNext()
       at Microsoft.Expression.DesignModel.Metadata.ProjectXmlnsDefinitionMap.GetAvailableTypes(IAssembly assembly, Action`1 onError)
       at Microsoft.Expression.DesignSurface.Project.SampleDataAwareNamespaceTypeResolver.GetAvailableTypes(IAssembly assembly, Action`1 onError)
       at Microsoft.Expression.Markup.Semantics.Metadata.AssemblyNode.BuildNamespaces(SymbolTable`1 newNamespaces)
       at Microsoft.Expression.Markup.Semantics.Metadata.AssemblyNode.OnMetadataChanged()
       at Microsoft.Expression.Markup.Semantics.Metadata.ReflectionProjectNode.OnMetadataChanged(Object sender, TypesChangedEventArgs args)
       at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
       at Microsoft.Expression.DesignModel.Metadata.TypeResolver.OnTypesChanged(TypesChangedEventArgs e)
       at Microsoft.Expression.DesignModel.Metadata.TypeResolver.OnAssemblyCollectionChanged(NotifyCollectionChangedEventArgs e)
       at Microsoft.Expression.DesignSurface.Project.ProjectContextBase.XamlProjectMetadata.OnAssemblyCollectionChanged(NotifyCollectionChangedEventArgs e)
       at Microsoft.Expression.DesignSurface.Project.ProjectContextBase.XamlProjectAssemblyCollection.FireChangedEvent(NotifyCollectionChangedEventArgs eventArguments)
       at Microsoft.Expression.DesignSurface.Project.ProjectContextBase.XamlProjectAssemblyCollection.AssemblyCollection_EnumerationChanged(Object sender, EnumerationChangedEventArgs`1 e)
       at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
       at Microsoft.Expression.Utility.Collections.NotifyingCollectionBase`1.EventInvoker(EnumerationChangedEventArgs`1 eventArguments)
       at Microsoft.Expression.Utility.Events.SuspendingEventManager`1.ForwardEvents()
       at Microsoft.Expression.Utility.Events.Suspender.SuspendDisposer.Dispose(Boolean disposing)
       at Microsoft.Expression.Utility.Events.Suspender.SuspendDisposer.Dispose()
       at Microsoft.Expression.DesignSurface.Assemblies.AssemblyCollection.AssemblyService_AssembliesUpdated(Object sender, EventArgs`1 e)
       at Microsoft.Expression.DesignSurface.Assemblies.AssemblyService.OnAssembliesUpdated(IEnumerable`1 assemblyInformation)
       at Microsoft.Expression.DesignSurface.Assemblies.AssemblyService.WindowsRuntimeContext_IterationContextChanged(Object sender, WindowsRuntimeContextChangedEventArgs e)
       at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
       at Microsoft.Expression.Utility.WindowsRuntimeContext.SetIterationContext(String[] paths)
       at Microsoft.Expression.Utility.WindowsRuntimeContext.SynchronizeDesignerContext()
       at Microsoft.Expression.Utility.WindowsRuntimeContext.ProcessShadowCopyResults(IEnumerable`1 results)
       at Microsoft.Expression.DesignSurface.Assemblies.AssemblyService.FlushShadowCopyUpdateQueue()
       at Microsoft.Expression.DesignSurface.Assemblies.ProjectAssemblyResolver.Project_ReferencesChanged(Object sender, HostItemChangesEventArgs`1 e)
       at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalEvent`3.<>c__DisplayClass19.<Invoke>b__18()
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.Invoke(Boolean waitingInExternalCall)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.InvokeCall(Call call)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.DirectInvoke(Action action, Int32 sourceApartmentId, Int32 targetApartmentId, Int32 originId, WaitHandle aborted)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.DirectInvokeInbound(Action action, Int32 targetApartmentId)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalIn(Action action, Int32 targetApartmentId)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn(IRemoteObject targetObject, Action action)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalEvent`3.Invoke(Object sender, TEvent args)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalHostProject.<>c__DisplayClass9b.<Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteHostProjectCallback.OnReferencesChanged>b__9a()
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.Invoke(Boolean waitingInExternalCall)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.InvokeCall(Call call)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.ProcessQueue(CallQueue queue)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.ProcessInboundQueue(Int32 identity)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.ProcessMessage(Int32 msg, IntPtr wParam, Boolean elevatedQuery, Boolean& handled)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.OnWindowMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.MessageOnlyHwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.Run()
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at Microsoft.Expression.DesignHost.Isolation.IsolationProcess.RunApplication()
       at Microsoft.Expression.DesignHost.Isolation.IsolationProcess.DesignProcessViewProvider.<>c__DisplayClass7.<applicationView_Activated>b__6()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()


    • Edited by mcosmin Sunday, September 1, 2013 7:35 PM
    Sunday, September 1, 2013 6:26 PM
  • Hi mcosmin,

    I am moving your thread into the Tools for Windows Store apps Forum for dedicated support. Thanks for your understanding.

    Best Regards,


    Jack Zhai[MSFT]
    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Tuesday, September 3, 2013 7:47 AM
  • Hi mcosmin,

    I think the problem is the privilege of your system.

    From your description, you mentioned something about "can not reach a path in the bin/release folder" and "the designer throws that error every single time a page 'template' other than blank page is used in a project".

    so I don't think re-install the nuget package will help with your problem. Maybe you could try the project on another machine to see if the same issue happens or not.

    And take a look at this thread: http://social.msdn.microsoft.com/Forums/windowsapps/en-US/db3a1e57-fd2a-43cb-9754-0f982d8f29e4/vs-2012-xaml-editor-crashes-with-argumentnullexception-just-after-win8-update

    The solution is to modify the premission of the folder.

    Best Regards,

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Tuesday, September 3, 2013 8:25 AM
    Moderator
  • after running that command, it throws

    C:\>icacls "C:\Program Files (x86)" /grant *S-1-15-2-1:(CI)(F)

    Microsoft.Internal.Assumes+InternalErrorException
    Internal error occurred. Additional information: ''.
    
    Server stack trace: 
       at System.ComponentModel.Composition.Hosting.ImportEngine.InPrerequisiteLoop()
       at System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportsStateMachine(PartManager partManager, ComposablePart part)
       at System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImports(PartManager partManager, ComposablePart part, Boolean shouldTrackImports)
       at System.ComponentModel.Composition.Hosting.ImportEngine.SatisfyImports(ComposablePart part)
       at System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine engine, ComposablePart part, ExportDefinition definition)
       at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportedValue(CatalogPart part, ExportDefinition export, Boolean isSharedPart)
       at System.ComponentModel.Composition.Hosting.CatalogExportProvider.CatalogExport.GetExportedValueCore()
       at System.ComponentModel.Composition.Primitives.Export.get_Value()
       at System.ComponentModel.Composition.ExportServices.GetCastedExportedValue[T](Export export)
       at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportedValuesCore[T](String contractName)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.Marshaler.EnsureMarshalers()
       at Microsoft.Expression.DesignHost.Isolation.Remoting.Marshaler.GetMarshaler(Type fromType, Type toType)
       at Microsoft.Expression.DesignHost.Isolation.Remoting.MarshaledValue`1.Unmarshal(Marshaler marshaler)
       at Microsoft.Expression.DesignHost.Isolation.IsolatedExportProvider.RemoteExportProvider.ComposeMarshaledValue[T](MarshaledValue`1 marshaledValue)
       at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
       at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
    
    Exception rethrown at [0]: 
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.Expression.DesignHost.Isolation.IsolatedExportProvider.RemoteExportProvider.ComposeMarshaledValue[T](MarshaledValue`1 marshaledValue)
       at Microsoft.Expression.DesignHost.Isolation.IsolatedExportProvider.ComposeExportedValue[T](T value)
       at Microsoft.Expression.DesignHost.IsolatedDesignerService.CreateLease(IIsolationTarget isolationTarget, CancellationToken cancelToken, DesignerServiceEntry& entry)
       at Microsoft.Expression.DesignHost.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken)
       at Microsoft.Expression.DesignHost.Isolation.IsolatedTaskScheduler.InvokeWithCulture[T](CultureInfo culture, Func`2 func, CancellationToken cancelToken)
       at Microsoft.Expression.DesignHost.Isolation.IsolatedTaskScheduler.<>c__DisplayClassa`1.<StartTask>b__6()
       at System.Threading.Tasks.Task`1.InnerInvoke()
       at System.Threading.Tasks.Task.Execute()
    


    • Edited by mcosmin Tuesday, September 3, 2013 8:48 AM
    Tuesday, September 3, 2013 8:44 AM
  • Hi mcosmin,

    Ok, good, so the exception changes, not something like ArgumentNullException.

    Could you try to install/Re-install the latest update to see if this still happens?

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Tuesday, September 3, 2013 9:00 AM
    Moderator
  • I reinstalled visual studio from scratch yesterday. The exception was present there before i installed the update 3 (i think that was the last one).

    How does one remove individual updates for visual studio?

    Tuesday, September 3, 2013 9:29 AM
  • Hi mcosmin,

    Yes, update 3 is the latest one for VS2012. You can press Win+i to open the "control panel", then "Programs and Features"-> "View installed updates".

    Good luck,

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Tuesday, September 3, 2013 9:37 AM
    Moderator
  • I uninstalled update 3 and this is what i get.

    System.ComponentModel.Composition.ImportCardinalityMismatchException
    No exports were found that match the constraint: 
    	ContractName	Microsoft.Expression.DesignHost.IDesignerService
    	RequiredTypeIdentity	Microsoft.Expression.DesignHost.IDesignerService
    
    Server stack trace: 
       at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition)
       at Microsoft.Expression.DesignHost.Isolation.IsolatedExportProvider.RemoteExportProvider.GetRemoteExports(String contractName, String requiredTypeIdentity, KeyValuePair`2[] requiredMetadata, ImportCardinality cardinality, Boolean isRecomposable, Boolean isPrerequisite, CreationPolicy requiredCreationPolicy)
       at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
       at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
    
    Exception rethrown at [0]: 
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.Expression.DesignHost.Isolation.IsolatedExportProvider.RemoteExportProvider.GetRemoteExports(String contractName, String requiredTypeIdentity, KeyValuePair`2[] requiredMetadata, ImportCardinality cardinality, Boolean isRecomposable, Boolean isPrerequisite, CreationPolicy requiredCreationPolicy)
       at Microsoft.Expression.DesignHost.Isolation.IsolatedExportProvider.<GetExportsCore>d__4.MoveNext()
       at Microsoft.Internal.Collections.CollectionServices.GetCardinality[T](IEnumerable`1 source)
       at System.ComponentModel.Composition.ExportServices.CheckCardinality[T](ImportDefinition definition, IEnumerable`1 enumerable)
       at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports)
       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 Microsoft.Expression.DesignHost.IsolatedDesignerService.CreateLease(IIsolationTarget isolationTarget, CancellationToken cancelToken, DesignerServiceEntry& entry)
       at Microsoft.Expression.DesignHost.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken)
       at Microsoft.Expression.DesignHost.Isolation.IsolatedTaskScheduler.InvokeWithCulture[T](CultureInfo culture, Func`2 func, CancellationToken cancelToken)
       at Microsoft.Expression.DesignHost.Isolation.IsolatedTaskScheduler.<>c__DisplayClassa`1.<StartTask>b__6()
       at System.Threading.Tasks.Task`1.InnerInvoke()
       at System.Threading.Tasks.Task.Execute()

    I will proceed to repair visual studio as instructed by the update removal tool.

    The exception is still contained in the designer: the behavior hasn't changed.
    • Edited by mcosmin Tuesday, September 3, 2013 10:16 AM
    Tuesday, September 3, 2013 10:16 AM
  • Hi mcosmin,

    Sorry to hear that, but it seems to be a new exception. Could you try to install the update 3 and delete this folder, then restart the machine. And do not foregt to clean the solution and rebuild it.

    %AppData%\..\Local\Microsoft\VisualStudio\11.0\ComponentModelCache

    Hope this time can work,

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.



    Tuesday, September 3, 2013 11:04 AM
    Moderator
  • Nope. Didn't work

    The project works fine on different machine. So this is a visual studio problem.

    System.ComponentModel.Composition.ImportCardinalityMismatchException
    No exports were found that match the constraint: 
    	ContractName	Microsoft.Expression.DesignHost.IDesignerService
    	RequiredTypeIdentity	Microsoft.Expression.DesignHost.IDesignerService
    
    Server stack trace: 
       at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition)
       at Microsoft.Expression.DesignHost.Isolation.IsolatedExportProvider.RemoteExportProvider.GetRemoteExports(String contractName, String requiredTypeIdentity, KeyValuePair`2[] requiredMetadata, ImportCardinality cardinality, Boolean isRecomposable, Boolean isPrerequisite, CreationPolicy requiredCreationPolicy)
       at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
       at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
    
    Exception rethrown at [0]: 
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.Expression.DesignHost.Isolation.IsolatedExportProvider.RemoteExportProvider.GetRemoteExports(String contractName, String requiredTypeIdentity, KeyValuePair`2[] requiredMetadata, ImportCardinality cardinality, Boolean isRecomposable, Boolean isPrerequisite, CreationPolicy requiredCreationPolicy)
       at Microsoft.Expression.DesignHost.Isolation.IsolatedExportProvider.<GetExportsCore>d__4.MoveNext()
       at Microsoft.Internal.Collections.CollectionServices.GetCardinality[T](IEnumerable`1 source)
       at System.ComponentModel.Composition.ExportServices.CheckCardinality[T](ImportDefinition definition, IEnumerable`1 enumerable)
       at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports)
       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 Microsoft.Expression.DesignHost.IsolatedDesignerService.CreateLease(IIsolationTarget isolationTarget, CancellationToken cancelToken, DesignerServiceEntry& entry)
       at Microsoft.Expression.DesignHost.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken)
       at Microsoft.Expression.DesignHost.Isolation.IsolatedTaskScheduler.InvokeWithCulture[T](CultureInfo culture, Func`2 func, CancellationToken cancelToken)
       at Microsoft.Expression.DesignHost.Isolation.IsolatedTaskScheduler.<>c__DisplayClassa`1.<StartTask>b__6()
       at System.Threading.Tasks.Task`1.InnerInvoke()
       at System.Threading.Tasks.Task.Execute()
    
    

    Tuesday, September 3, 2013 11:29 AM
  • I tried reinstalling visual studio again. Same problem as last post.
    Tuesday, September 3, 2013 1:49 PM
  • Hi mcosmin,

    I found a similar bug report on Connect: http://connect.microsoft.com/VisualStudio/feedback/details/789647/no-exports-were-found-that-match-the-constraint

    The solution is what I told you, to remove the target folder, and maybe you could try to uninstall kb2805221.

    If the problem still not solved, I suggest you could rasie one report at Connect to see if they can help you.

    Best Regards,

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, September 4, 2013 12:42 AM
    Moderator
  • Hi mcosmin,

    How was your issue, is it fixed? If not, try to fix your OS.

    And I'd like to summarize the general steps for handling the exception we meet while working with Windows store app, and it may help other community members.

    ======

    if we meet

    System.ArgumentNullException
    Value cannot be null.

    Should be fixed with (http://social.msdn.microsoft.com/Forums/windowsapps/en-US/db3a1e57-fd2a-43cb-9754-0f982d8f29e4/vs-2012-xaml-editor-crashes-with-argumentnullexception-just-after-win8-update):

    C:\>icacls "C:\Program Files (x86)" /grant *S-1-15-2-1:(CI)(F)

    ======

    if we meet

    Microsoft.Internal.Assumes+InternalErrorException
    Internal error occurred. Additional information: ''.

    Should be fixed by install the update 3 for Visual Studio 2012 (http://www.microsoft.com/en-us/download/details.aspx?id=39305).

    ======

    if we meet

    System.ComponentModel.Composition.ImportCardinalityMismatchException
    No exports were found that match the constraint: 

    Should be fixed by clean the cache folder (http://connect.microsoft.com/VisualStudio/feedback/details/789647/no-exports-were-found-that-match-the-constraint)

    %AppData%\..\Local\Microsoft\VisualStudio\11.0\ComponentModelCache

    ======

    LAST BUT NOT LEAST, try to install VS and fix OS, or raise a bug report at Connect .

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, September 5, 2013 4:16 AM
    Moderator
  • Problem not fixed, tried the connect tricks too.

    What do you mean by "fix OS"?

    Thursday, September 5, 2013 7:55 AM
  • Hi mcosmin,

    I talked with some other engineers for your issue, and it's a really strange behaviour, the suggestion might be reinstall the system, that's I called "fix OS".

    I'm willing to help but I don't have other possible measures for you, I'm sorry for that.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, September 5, 2013 8:06 AM
    Moderator
  • SO i have to do clean wipe or I can just repair windows?
    Thursday, September 5, 2013 8:27 AM
  • I'm not sure, but re-install win8 seems to be a more safer way. Or let's see what Connect guys will tell you.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, September 5, 2013 8:31 AM
    Moderator
  • If you are still blocked, please don't hesitate to get in touch with me directly at unnir at Microsoft dot com, and I would be happy to investigate and help you workaround this issue.

    Thanks,
    Unni

    ---
    Unni Ravindranathan
    Program Manager, Visual Studio


    Unni Ravindranathan, Program Manager, Visual Studio and Blend This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, October 17, 2013 11:31 PM
  • I reinstalled windows (upgraded to 8.1) 2 weeks ago and the issue appears to have disappeared (at first sight).

    However, this time with visual studio 2013RC, when doing changes to the XAML designer, sometimes, the designer crashes with the same error, however, the issue is resolved upon restart of visual studio.


    • Edited by mcosmin Friday, October 18, 2013 8:51 AM
    Friday, October 18, 2013 8:49 AM