通用Windows XAML设计器无法加载 [英] Universal Windows XAML Designer Won't Load

查看:106
本文介绍了通用Windows XAML设计器无法加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对,

因此XAML设计器遇到了一个问题,它完全拒绝加载.我使用Blank App(Universal Windows)模板创建了一个新项目,所做的全部工作都已提交到GitHub存储库并更新了NuGet软件包.如果有帮助的话我很 是C#的新增功能,我还没有以任何方式修改代码.我收到的错误是System.ObjectDisposedException,安全句柄已关闭.

So I've got a problem with the XAML designer where it outright refuses to load. I made a new project using the Blank App (Universal Windows) template and all I've done is committed to a GitHub repository and updated the NuGet packages. If it helps I am quite new to C# and I have not modified the code in any way. The error I am getting is System.ObjectDisposedException, Safe handle has been closed.

这是完整的堆栈跟踪:

System.ObjectDisposedException
安全把手已关闭
  在Microsoft.VisualStudio.DesignTools.HostUtility.Platform.AppContainerProcessDomainFactory.CreateDesignerProcess(String applicationPath,String clientPort,Uri hostUri,IDictionary environmentVariables,Int32& processId,Object& processData)
  在Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.ProcessDomainFactory.ProcessIsolationDomain..ctor(ProcessDomainFactory工厂,IIsolationBoundary边界,AppDomainSetup appDomainInfo,IIsolationTarget隔离目标, 字符串baseDirectory)
  在Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.Primitives.ProcessDomainFactory.CreateIsolationDomain(IIsolationBoundary边界)
  在Microsoft.VisualStudio.DesignTools.HostUtility.Platform.AppContainerProcessDomainFactory.CreateIsolationDomain(IIsolationBoundary boundary)
  在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 isolatedTarget,IObjectCatalog目录)
  在Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolationService.CreateLease(IIsolationTarget isolatedTarget)
  在Microsoft.VisualStudio.DesignTools.DesignerContract.IsolatedDesignerService.CreateLease(IIsolationTarget隔离目标,CancellationToken取消令牌,DesignerServiceEntry&条目,IServiceProvider serviceOverrides)
  在Microsoft.VisualStudio.DesignTools.DesignerContract.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken)
  在Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolatedTaskScheduler.InvokeWithCulture [T](CultureInfo文化,Func`2 func,CancellationToken cancelToken)
  在Microsoft.VisualStudio.DesignTools.DesignerContract.Isolation.IsolatedTaskScheduler中.<> c__DisplayClass10_0`1.< StartTask> b__0()
  在System.Threading.Tasks.Task`1.InnerInvoke()处
  在System.Threading.Tasks.Task.Execute()处

System.ObjectDisposedException
Safe handle has been closed
   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.<StartTask>b__0()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()

在有和没有执行项目代码的情况下都会发生这种情况.

This happens with and without project code execution.

谢谢!

推荐答案

嗨Energyspooks,

Hi Energyspooks,

谢谢您的发帖.

>>我所做的全部工作都已提交到GitHub存储库并更新了NuGet软件包

当您打开从GitHub克隆的项目时,会发生此问题吗?

Does this issue occur when you open the project which cloned from the GitHub?

要弄清楚导致此问题发生的步骤,以及如何在本地计算机上创建新的UWP项目,以查看Xaml是否可以成功加载.

To figure out which steps lead to this issue happening, how about creating a new UWP project on your local machine, to see if the Xaml could load successfully.

1.如果一切正常,则原因可能与GitHub存储库过程有关,某些源文件无法加载,您可以检查GitHub上的原始项目是否可以顺利加载Xaml.

1. If it works fine, the cause might related to the GitHub repository process, some source file failed to load, you may check the original project on the GitHub if it could load the Xaml smoothly.

2.如果新项目上的错误仍然存​​在,则VS 2015出了点问题,请检查以下内容是否有帮助:

2. If the error persists on the new project, there is something wrong with the VS 2015, please check the following to see if it helps:

(1)转到控制面板"修复Visual Studio.

(1) Go to Control Panel to repair your visual studio.

(2)请打开Windows资源管理器,然后导航到C:\ Program Files或Program Files(x86)\ Microsoft Visual Studio 14.0 \ Common7 \ IDE,然后运行以下命令:

(2) Please open Windows Explorer, and navigate to  C:\Program Files or Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE, and run the following commands:

a.devenv.exe/resetsettings,它将还原Visual Studio默认设置. (可选)将设置重置为指定的.vssettings文件.

a.devenv.exe /resetsettings, it will restore Visual Studio default settings. Optionally resets the settings to the specified .vssettings file.

最好的问候


这篇关于通用Windows XAML设计器无法加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆