简体   繁体   English

Visual Studio 2015 XAML设计器因System.Exception而失败

[英]Visual Studio 2015 XAML designer fails with System.Exception

I'm running Visual Studio 2015 Community on Windows 10 Pro official release. 我在Windows 10 Pro正式版上运行Visual Studio 2015社区。 Visual Studio installed without any problems or errors, but the XAML designer is crashing with the following error: 安装Visual Studio时没有任何问题或错误,但XAML设计器崩溃时出现以下错误:

在此输入图像描述

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. 我正在开发一个Windows Phone 8.1应用程序,但问题与我的应用程序无关,因为我试图创建一个空白的Windows 10 UWP应用程序和一个空白的Windows 8.1 Universal应用程序,两者在尝试打开时都出现相同的错误默认MainPage.xaml的XAML设计器。

I also tried debugging Visual Studio with another instance of it, but it didn't throw any exception. 我也尝试用另一个实例调试Visual Studio,但它没有抛出任何异常。

This seems to be a bug in the XAML designer, but if anyone knows a working workaround, please share it with me. 这似乎是XAML设计师的一个错误,但如果有人知道一个有效的解决方法,请与我分享。

Thanks in advance! 提前致谢!

EDIT: 编辑:

The problem was solved by the Visual Studio 2015 Update 1 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). 对于许多其他人,删除系统 - >高级系统设置 - >环境变量中的“平台”环境变量已解决了该问题(主要在HP PC或笔记本电脑上)。

You might want to give it a shot. 你可能想试一试。 For more info, see XAML designer crash in VS 2015 on Windows 10 有关详细信息,请参阅Windows 10上VS 2015中的XAML设计器崩溃

Right click the xaml. 右键单击xaml。 Choose open with XML (Text) editor. 选择用XML(文本)编辑器打开。 (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. 它解决了这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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