简体   繁体   中英

Visual Studio 2015 XAML designer fails with System.Exception

I'm running Visual Studio 2015 Community on Windows 10 Pro official release. Visual Studio installed without any problems or errors, but the XAML designer is crashing with the following error:

在此输入图像描述

System.Exception
Install failed. Please contact your software vendor.

Deployment Register operation with target volume C: on Package 74da95b4-525a-49a9-99a1-472cc815a148_1.0.0.0_x86_NorthAmerica_8wekyb3d8bbwe from:  (AppXManifest.xml)  failed with error 0x8E5E0408. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.
   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'm developing a Windows Phone 8.1 app, but the problem has nothing to do with my app, because I tried to create a blank Windows 10 UWP app and a blank Windows 8.1 Universal app, both with the same error when trying to open the XAML designer for the default MainPage.xaml.

I also tried debugging Visual Studio with another instance of it, but it didn't throw any exception.

This seems to be a bug in the XAML designer, but if anyone knows a working workaround, please share it with me.

Thanks in advance!

EDIT:

The problem was solved by the Visual Studio 2015 Update 1

You need turn on the Developer Mode on Settings --> Update and Security --> For Developers menu.

Sorry by my English.

For many others, deleting the "Platform" environment variable in System->Advanced System Settings->Environment Variables has solved the problem (mainly on HP PC's or laptops).

You might want to give it a shot. For more info, see XAML designer crash in VS 2015 on Windows 10

Right click the xaml. Choose open with XML (Text) editor. (set as default). The automatic editor selector not always works.

I disabled the Developer Mode (Setting-> Update & Security -> For developers -> Don't use developer features) and reboot computer. It solved the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM