Visual Studio 2015 WPF XAML编辑器无法打开XAML文件 [英] Visual Studio 2015 WPF XAML Editor cannot open XAML files

查看:654
本文介绍了Visual Studio 2015 WPF XAML编辑器无法打开XAML文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近从Visual Studio 2015更新到了Visual Studio 2015 Update 2(专业版).一切正常,除了我无法打开XAML文件的事实-单击任何XAML文件后,我得到:

I have recently updated from Visual Studio 2015 to Visual Studio 2015 Update 2 (Professional). Everything works fine except the fact that I can't open XAML files - after clicking on any XAML file I get:

Visual Studio has encountered an unexpected error.

似乎尚未安装XamlDesignerPackage. XamlEditor条目在HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0 \下不存在,而在HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0 \下存在 HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\,可能表明该Visual Studio 2015未安装XAML设计器.

It looks that XamlDesignerPackage hasn't been installed. XamlEditor entry doesn't exist under HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\ and it exists under HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\ which may suggest that XAML Designer is not installed for this visual studio 2015.

我已经尝试了一切:

  • 4个重新安装
  • 清理缓存
  • 删除ComponentDataCache
  • 重置设置.

在Visual Studio 2013中,一切正常.有没有一种方法可以使用VS2013中的XAMLEditor?您有什么想法我可以做什么?我会很高兴为您提供任何帮助,因为它使我无法工作.这是来自ActivityLog.xml的错误:

In Visual Studio 2013 everything works fine. Is there a way to use XAMLEditor from VS2013? Do you have any ideas what I can do? I would be glad for any help since it prevents me from working. This is an error from ActivityLog.xml:

507 2016/04/04 13:15:58.450 错误的VisualStudio SetSite 软件包[XamlDesignerPackage]失败[方法失败,发生意外 错误代码50.]:{在 System.Security.AccessControl.NativeObjectSecurity.CreateInternal(ResourceType resourceType,布尔值isContainer,字符串名称,SafeHandle句柄, AccessControlSections includeSections,布尔值createByName, ExceptionFromErrorCode exceptionFromErrorCode,对象 exceptionContext) 在 System.Security.AccessControl.FileSystemSecurity..ctor(布尔 isContainer,字符串名称,AccessControlSections includeSections, 布尔值isDirectory) 在 System.Security.AccessControl.FileSecurity..ctor(字符串fileName, AccessControlSections包括Sections) 在 Microsoft.VisualStudio.DesignTools.Utility.IO.AccessHelper.IsAccessibleByAllApplicationPackages(字符串 路径) 在 Microsoft.VisualStudio.DesignTools.HostUtility.Utils.HostAppPackageAclService.CheckAclsOnDirectory(String 目录) 在 Microsoft.VisualStudio.DesignTools.HostUtility.Utils.HostAppPackageAclService.ValidateOrUpdateDirectoryAcls(String 目录) 在 Microsoft.VisualStudio.DesignTools.HostUtility.Utils.HostAppPackageAclService.ValidateOrUpdateAclsNoPrompt(IEnumerable`1 路径) 在 Microsoft.VisualStudio.DesignTools.DesignerContract.IsolatedDesignerService.Initialize() 在 MS.Internal.Package.XamlDesignerPackage.Initialize()
在 Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)} {512BE089-83EC-4CC6-8483-CF16565AE209}


80131509 方法失败,出现意外错误代码50.

507 2016/04/04 13:15:58.450 Error VisualStudio SetSite failed for package [XamlDesignerPackage][Method failed with unexpected error code 50.]:{ at System.Security.AccessControl.NativeObjectSecurity.CreateInternal(ResourceType resourceType, Boolean isContainer, String name, SafeHandle handle, AccessControlSections includeSections, Boolean createByName, ExceptionFromErrorCode exceptionFromErrorCode, Object exceptionContext) at System.Security.AccessControl.FileSystemSecurity..ctor(Boolean isContainer, String name, AccessControlSections includeSections, Boolean isDirectory) at System.Security.AccessControl.FileSecurity..ctor(String fileName, AccessControlSections includeSections) at Microsoft.VisualStudio.DesignTools.Utility.IO.AccessHelper.IsAccessibleByAllApplicationPackages(String path) at Microsoft.VisualStudio.DesignTools.HostUtility.Utils.HostAppPackageAclService.CheckAclsOnDirectory(String directory) at Microsoft.VisualStudio.DesignTools.HostUtility.Utils.HostAppPackageAclService.ValidateOrUpdateDirectoryAcls(String directory) at Microsoft.VisualStudio.DesignTools.HostUtility.Utils.HostAppPackageAclService.ValidateOrUpdateAclsNoPrompt(IEnumerable`1 paths) at Microsoft.VisualStudio.DesignTools.DesignerContract.IsolatedDesignerService.Initialize() at MS.Internal.Package.XamlDesignerPackage.Initialize()
at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)} {512BE089-83EC-4CC6-8483-CF16565AE209}


80131509 Method failed with unexpected error code 50.

我发现在编辑器条目下的HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0_Config\中存在以上guid.似乎尚未安装设计器,因为vs 2013中存在该设计器.一定存在冲突.

I have found that above guid exists in HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0_Config\ under Editors entry. It looks like designer hasn't been installed because it exists in vs 2013. There must be a conflict.

我已经删除了2013和2015并安装了2015,并且在运行Visual Studio 2015时收到以下消息:

I have removed both 2013 and 2015 and installed 2015 and getting the following message when running Visual Studio 2015:

推荐答案

已修复Visual Studio Update 3

Fixed with Visual Studio Update 3

这篇关于Visual Studio 2015 WPF XAML编辑器无法打开XAML文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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