XAML Designer is not loading

6

I am trying to develop a Universal application for Windows 10 but the XAML designer fails to load. I have tried reinstalling Visual Studio but nothing has seemed to work.

Error:

System.Runtime.InteropServices.COMException
The app didn't start. (Exception from HRESULT: 0x8027025B)

Stacktrace:

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.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.b__0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
c#
xaml
visual-studio-2015
windows-10
win-universal-app
asked on Stack Overflow Oct 16, 2015 by OhYea777 • edited Jan 11, 2016 by (unknown user)

3 Answers

0

Had a similar problem. Using VS 2015 Enterprise and Win8.1 x64. Have solved it this way:

  1. Start the Firewall service (was switched off)

  2. Changed UAC to recommended level (was switched off)

  3. Logged in as Microsoft user account (as I suppose, this would be the crucial)

  4. Started the Windows Store App (have read this is the origin of all problems)

  5. Started VS. After this designer began to work

  6. Reboot the system, restore all settings, incl. Firewall & UAC At the end of all, designer is working properly under any user, even if MS user account is disabled.

answered on Stack Overflow May 18, 2016 by Sergey Vasenkin • edited May 18, 2016 by Mogsdad
0

I started noticing this problem some three weeks ago and I visited the Visual Studio Community 2017 forum. I encountered the problem using the more recent versions, 15.7.5, 15.7.6, 15.8.0, 15.8.1. I finally found that the problem was related to the choice of Target Version/Minimum Version you have to make while creating UWP project. I always worked with a Blank UWP project and modifying it along the way.

If you are interested in complete details I have it in my post here: http://hodentekhelp.blogspot.com/2018/08/how-did-you-fix-unhandled-exception-app.html

answered on Stack Overflow Aug 22, 2018 by user2063329
-3

I just fixed this problem myself. Apparently this error is connected with some windows system files which are most likely corrupted. My app store didn't work either, but after I fixed visual studio, my store worked again as well.

In some cases the error might be less severe, and stem from a wrong configuration.

I looked around the web and found a series of recommendations, going from small fixes to more serious and throughout methods. I'll list them here.


1) Fix permissions in HKEY_CLASSES_ROOT

  1. Open the Command Prompt with admin rights.
  2. Right click on HKEY_CLASSES_ROOT.
  3. Click on "Permissions" and in popup click on "Add".
  4. In 2nd Popup click on "Advanced".
  5. In 3rd Popus click on "Find Now".
  6. In "Search Results" click on "All Application Packages" and then click "Ok".
  7. Now in 2nd Popup "Select Users or Groups" click again "Ok".
  8. In Permissions select under Allow "Read" and Click "Ok".
  9. Close the Registry Editor. No need to restart.

As adviced on the bottom of this page. This did not work for me.


2) Run this Powershell Command in Command Prompt

Open the Command Prompt with Admin rights.

Copy paste the line below into the prompt and run it.

PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage Microsoft.WindowsStore).InstallLocation + '\AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}" 

Tip found here. This did not work for me.


3) Clear the LocalCache

Go to the following place on your pc. Remember to replace user_name with your own user name.

C:\Users\user_name\AppData\Local\Packages\Microsoft.WindowsStore_8wekyb3d8bbwe\LocalCache

Delete the folders content.

Tip seen here. This did not work for me.


4) Try running a SFC scan

Open the Command Prompt with admin rights. Write the command below and let it complete.

sfc /scannow

As seen here. This did not work for me. It did however verify that I had some corrupted files. It wasn't able to fix/restore them though...


5) Run the DISM tool, then try SFC again

Open Command Prompt with admin rights. Run the command below.

DISM /Online /Cleanup-Image /RestoreHealth

If it completes successfully, run the sfc /scannow command again.

As seen here. This did not work for me.


6) Repair Windows 10

Warning! This process deletes all your programs and apps. It does however leave your files alone. E.g. my dropbox folder still had its files after running the repair.

Please backup anything you do not want to lose to an external harddrive, the cloud or to a repository.

  1. Click the start button.
  2. Click settings.
  3. Click update and security.
  4. Click recovery.
  5. Click reset this PC and follow the instructions.

As seen here. This finally did the trick for me. My designer now loads and my win app store also works again.


There is most likely more tips and tricks to fix this kind of problem, but I hope the above gives you a lead on how to fix your problem.

Good luck, and please reply if any of the above worked for you :)

answered on Stack Overflow Jan 11, 2016 by MartinJH

User contributions licensed under CC BY-SA 3.0