本文介绍了不会为“通用 Windows"加载 XAML 设计器窗口应用程序 - 即使在新项目中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎记得以前遇到过这个问题,但我终生无法回忆起我是如何解决它的,而且谷歌搜索的深度似乎没有帮助.问题来了:

I seem to recall running into this before but can't for the life of me recall how I got around it and no depth of Googleing seems to help. Here's the problem:

当我打开带有Universal Windows"项目的 VS2015(社区版)时,无论是新的还是旧的,即使没有改变任何东西,我在设计器窗口中得到一个异常.XAML 代码显示正常,但设计器窗口给了我

When I open VS2015 (Community version) with a "Universal Windows" project, new or old, even without changing a single thing, I get an Exception in the designer window. The XAML code shows up fine, but the designer window gives me

"error 0X80070005: 在处理请求时,系统未能由于以下错误,注册 windows.capability 扩展:访问被拒绝."

接下来是我将在下面包含的文字墙.

This is followed by a wall of text I'll include below.

我想知道这是否可能是因为我最近更新到了 Windows 10(我强制这样做是因为由于某种原因它仍然不会在没有通用解决方法的情况下更新)并且我将功能添加到我的 VS 安装中需要使用通用应用程序.如果我打开一个通用 Windows 8.1 项目,设计器加载得很好,但不适用于通用 Windows 项目.

I wonder if this could be due to my having recently updated to Windows 10 (which I forced because for some reason it still wouldn't update without a common work-around) and my adding the features to my VS installation required to use Universal apps. If I open up a Universal Windows 8.1 project the designer loads just fine but not for a Universal Windows project.

值得注意的是,我是一个学习 C# 的业余爱好者,所以这可能很简单,但对我来说似乎是 IDE 中的一个错误...

Worth noting, I'm an amateur learning C#, so this could be simple but seems like a bug in the IDE to me...

这是文字墙,以防它对任何人都有意义.

Here's the wall of text in case it makes sense to anyone.

无法注册 System.Exception 包.

错误 0x80070005:在处理请求时,系统未能由于以下错误,注册 windows.capability 扩展:访问被拒绝..在Microsoft.VisualStudio.DesignTools.HostUtility.Platform.AppContainerProcessDomainFactory.CreateDesignerProcess(字符串applicationPath, String clientPort, Uri hostUri, IDictionary环境变量,Int32&进程ID、对象&过程数据)在Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.ProcessDomainFactory.ProcessIsolationDomain..ctor(ProcessDomainFactory工厂,IIsolationBoundary 边界,AppDomainSetup appDomainInfo,IIsolationTarget isolationTarget, String baseDirectory) 在Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.ProcessDomainFactory.CreateIsolationDomain(IIsolationBoundary边界)在Microsoft.VisualStudio.DesignTools.HostUtility.Platform.AppContainerProcessDomainFactory.CreateIsolationDomain(IIsolationBoundary边界)在Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.IsolationBoundary.Initialize()在Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.IsolationBoundary.CreateInstance[T](类型类型)在Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolatedObjectFactory.Initialize()在Microsoft.VisualStudio.DesignTools.DesignerHost.Services.VSIsolationService.CreateObjectFactory(IIsolationTarget隔离目标,IObjectCatalog 目录)在Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolationService.CreateLease(IIsolationTarget隔离目标)在Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolationService.CreateLease(IIsolationTarget隔离目标)在Microsoft.VisualStudio.DesignTools.DesignerContract.IsolatedDesignerService.CreateLease(IIsolationTarget隔离目标、CancellationToken 取消令牌、DesignerServiceEntry&条目,IServiceProvider serviceOverrides) 在Microsoft.VisualStudio.DesignTools.DesignerContract.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken取消令牌)在Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolatedTaskScheduler.InvokeWithCulture[T](CultureInfo文化, Func2 func, CancellationToken cancelToken) 在Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolatedTaskScheduler.<>c__DisplayClass10_01.b__0()在 System.Threading.Tasks.Task`1.InnerInvoke() 在System.Threading.Tasks.Task.Execute()

error 0x80070005: While processing the request, the system failed to register the windows.capability extension due to the following error: Access is denied. . 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, Func2 func, CancellationToken cancelToken) at Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolatedTaskScheduler.<>c__DisplayClass10_01.b__0() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute()

推荐答案

它确实与升级到 Windows 10 有关.这是由于您的计算机未处于开发人员模式造成的.要解决此问题,请在开始菜单上选择设置"、更新"和更新".Security、For Developers、Developer Mode,然后接受对话框.您现在处于开发者模式,这不应该是问题.

It does have to do with upgrading to Windows 10. This is caused by your computer not being in Developer Mode. To fix this, on the start menu choose Settings, Update & Security, For Developers, Developer Mode, then accept the dialog. You are now in developer mode, and this should not be an issue.

这篇关于不会为“通用 Windows"加载 XAML 设计器窗口应用程序 - 即使在新项目中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-11 08:13