none
Can't open designer for Universal App

    Question

  • Hi,

    I just created a new project with a blank universal app. Without modifying anything, I double clicked the "MainPage.xaml".

    Instead of viewing the designer, this is what I'm seeing:

    "An Unhandled Exception has occurred

    Click here to reload the designer

    Details:

    System.Runtime.InteropServices.COMException
    The app didn't start. (Exception from HRESULT: 0x8027025B)
       at Microsoft.VisualStudio.DesignTools.HostUtility.AppPackage.AppPackageNativeMethods.IApplicationActivationManager.ActivateApplication(String appUserModelId, String activationContext, ActivateOptions options, Int32& processId)
       at Microsoft.VisualStudio.DesignTools.HostUtility.AppPackage.DesignerWrtUtility.ActivateApplication(String appUserModelId, String activationContext, Object site, Boolean isRunningElevated)
       at Microsoft.VisualStudio.DesignTools.HostUtility.Platform.AppContainerProcessDomainFactory.ActivateApplicationInternal(String appUserModelId, String activationContext, Object site)
       at Microsoft.VisualStudio.DesignTools.HostUtility.Platform.AppContainerProcessDomainFactory.CreateDesignerProcess(String applicationPath, String clientPort, Uri hostUri, IDictionary environmentVariables, Int32& processId, Object& processData)
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.ProcessDomainFactory.ProcessIsolationDomain..ctor(ProcessDomainFactory factory, IIsolationBoundary boundary, AppDomainSetup appDomainInfo, IIsolationTarget isolationTarget, String baseDirectory)
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.ProcessDomainFactory.CreateIsolationDomain(IIsolationBoundary boundary)
       at Microsoft.VisualStudio.DesignTools.HostUtility.Platform.AppContainerProcessDomainFactory.CreateIsolationDomain(IIsolationBoundary boundary)
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.IsolationBoundary.Initialize()
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.IsolationBoundary.CreateInstance[T](Type type)
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolatedObjectFactory.Initialize()
       at Microsoft.VisualStudio.DesignTools.DesignerHost.Services.VSIsolationService.CreateObjectFactory(IIsolationTarget isolationTarget, IObjectCatalog catalog)
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolationService.CreateLease(IIsolationTarget isolationTarget)
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolationService.CreateLease(IIsolationTarget isolationTarget)
       at Microsoft.VisualStudio.DesignTools.DesignerContract.IsolatedDesignerService.CreateLease(IIsolationTarget isolationTarget, CancellationToken cancelToken, DesignerServiceEntry& entry, IServiceProvider serviceOverrides)
       at Microsoft.VisualStudio.DesignTools.DesignerContract.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken)
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolatedTaskScheduler.InvokeWithCulture[T](CultureInfo culture, Func`2 func, CancellationToken cancelToken)
       at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolatedTaskScheduler.<>c__DisplayClass10_0`1.<StartTask>b__0()
       at System.Threading.Tasks.Task`1.InnerInvoke()
       at System.Threading.Tasks.Task.Execute()

    I tried unchecking the "Run project code in XAML Designer (if supported)", but still no success when I try to reload the designer.

    Any ideas why this might happen?

    Thanks!

    Thursday, November 26, 2015 2:12 PM

Answers

  • Hi miguel_mc,

    >>Now the designer opens, but instead I get the code instead of the designer view...

    As far as I know it was an issue we found before, please change the target version in your project property to be "10240", and then check it again.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by miguel_mc Wednesday, January 6, 2016 12:01 PM
    Wednesday, January 6, 2016 2:07 AM
    Moderator

All replies

  • Hi miguel_mc,

    You can try to clean these ShadowCache two folders:

    For Blend: AppData\Local\Microsoft\VisualStudio\14.0\Blend\ShadowCache
    For Visual Studio 2015: AppData\Local\Microsoft\VisualStudio\14.0\Designer\ShadowCache

    Don't delete these two folders, just delete/clean the content of those folders and you will be back to working happily with your Visual Studio 2015 XAML designer again.

    Always you can try with updating your graphic card drivers...

    Best regards!
    (If this was helpful for you, propose it as an answer)
    • Edited by Almir Vuk Thursday, November 26, 2015 5:32 PM
    • Proposed as answer by Almir Vuk Thursday, November 26, 2015 6:19 PM
    Thursday, November 26, 2015 5:31 PM
  • Hi Almir,

    Thank you for your help.

    I cleaned the contents of the folders and I updated the graphic card drivers.

    I still get the same error with the same details.

    Any other ideas?

    Monday, November 30, 2015 10:40 AM
  • Hi miguel_mc,

    Which VS version did you really use? What is your Windows Environment?

    If you run "devenv.exe /resetuserdata, how about the result? It will ideally revert your settings back to defaults, in case there is some corruption in your profile.

    Reference:

    A connect report about the similiar issue which was related to the VS2013:

    https://connect.microsoft.com/VisualStudio/feedback/details/1076217/related-to-msdn-forum-following-up-windows-phone-8-1-xaml-designer-unhandled-exception

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, December 1, 2015 11:45 AM
    Moderator
  • Hi Jack,

    Thanks for your help. I reverted the settings and nothing.

    I also followed the link you shared but nothing solved the issue. This machine still has this problem.

    Thanks!

    Tuesday, January 5, 2016 9:27 AM
  • As an update: I've uninstalled and installed Visual Studio Community 2015.

    Now the designer opens, but instead I get the code instead of the designer view:

    <Page x:Class="App4.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:App4" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"> <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> </Grid> </Page>

    I've tried right-clicking the "MainPage.xaml" and opening with "XAML Designer". It doesn't work, it just shows the code.

    I've also checked the "Text Editor" and "XAML Designer" sections in Settings, under Tools. Nothing helped.

    Could this be related to the graphics? I found this article:

    http://stackoverflow.com/questions/23326966/visual-studio-2013-designer-view-not-showing-the-ui-elements

    What do you think?

    Thanks.

    Tuesday, January 5, 2016 3:18 PM
  • Hi miguel_mc,

    >>Now the designer opens, but instead I get the code instead of the designer view...

    As far as I know it was an issue we found before, please change the target version in your project property to be "10240", and then check it again.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by miguel_mc Wednesday, January 6, 2016 12:01 PM
    Wednesday, January 6, 2016 2:07 AM
    Moderator
  • This solved the problem! I finally can see the designer. Thanks a million!
    Wednesday, January 6, 2016 12:01 PM