Krzysztof Bracha Krzysztof Bracha - 1 month ago 15
C# Question

Microsoft Blend 2013 "Could not find Windows Runtime type 'Windows.ApplicationModel.Package'" error

When I open any Windows 8.1 project in Blend for Visual Studio 2013 (including blank new projects created in the application itself) I get the following designer problem for XAML files:

An unhandled exception has occured
Click here to reload the designer
Details:

System.TypeLoadException

Could not find Windows Runtime type 'Windows.ApplicationModel.Package'.

at Microsoft.Expression.HostUtility.Platform.AppContainerProcessDomainFactory.CreateDesignerProcess(String applicationPath, String clientPort, Uri hostUri, IDictionary environmentVariables, Int32& processId, Object& processData)
at Microsoft.Expression.DesignHost.Isolation.Primitives.ProcessDomainFactory.ProcessIsolationDomain..ctor(ProcessDomainFactory factory, IIsolationBoundary boundary, AppDomainSetup appDomainInfo, FrameworkName targetFramework, String identifier, String baseDirectory)
at Microsoft.Expression.DesignHost.Isolation.Primitives.ProcessDomainFactory.CreateIsolationDomain(IIsolationBoundary boundary)
at Microsoft.Expression.HostUtility.Platform.AppContainerProcessDomainFactory.CreateIsolationDomain(IIsolationBoundary boundary)
at Microsoft.Expression.DesignHost.Isolation.Primitives.IsolationBoundary.Initialize()
at Microsoft.Expression.DesignHost.Isolation.Primitives.IsolationBoundary.CreateInstance[T](Type type)
at Microsoft.Expression.DesignHost.Isolation.IsolatedObjectFactory.Initialize()
at Microsoft.Expression.DesignHost.Isolation.IsolationService.AttachEvents(IsolatedObjectFactory objectFactory)
at Microsoft.Expression.DesignHost.Isolation.IsolationService.CreateLease(IIsolationTarget isolationTarget)
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()"


The windows 8.1 projects used to load without problems, I have not used the designer for a couple of weeks and now I get this error. I'm running Windows 10. WPF projects load OK.

Has anyone had a similar problem or have an idea how to fix it? Thank you in advance for your help.

Answer

I have not found the cause of the error but uninstalling and installing the application again fixed the problem. Note that I had to uninstall the program, when I first attempted to repair Visual Studio it did not resolve the problem.