切换到WPF应用程序的设计视图时,导致Visual Studio 2008 SP1崩溃的原因是什么
时间:2020-03-06 14:56:01 来源:igfitidea点击:
在开发了没有源代码控制的WPF应用程序之后,我决定将解决方案添加到TFS中。
之后,只要在Design View中打开主window.xaml文件,Visual Studio就会消失,并且以下事件将记录在应用程序事件日志中:
.NET Runtime version 2.0.50727.3053 - Fatal Execution Engine Error (7A035E00) (80131506) For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
解决方案
该问题是由名为" Visual Studio 2008的电源命令"的Visual Studio加载项引起的。
卸载它们并重新启动Visual Studio之后,xaml文件的设计视图开始正常工作。
同样的问题,但未安装电源命令。
我一直能够使用的唯一解决方法是在打开任何xaml文件之前清理/重建该解决方案。如果由于XAML在启动时加载而无法进入解决方案,请删除suo。
我没有安装PowerCommands,但是有同样的问题。以安全模式启动并删除工具箱中的所有奇异选项卡都可以解决该问题(之后可以以普通模式启动)。
这是导致此错误的许多可能原因之一,因为有些Google搜索会向我们显示。
如果我们希望保留Visual Studio 2008的Power Commands安装,请在此处查看以下解决方法:
PowerCommands崩溃VS2008 SP1
但基本上:
a work around which is a simple modification to the devenv.exe.config file. This will exist in (64 bit systems) C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE Or (32 bit systems) C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE Add this XML token to the dependentAssembly list. They had me add it after the office one, but im not sure if that matters.
<dependentAssembly> <assemblyIdentity name="office" publicKeyToken="71e9bce111e9429c" culture="neutral"/> <codeBase version="12.0.0.0" href="PrivateAssemblies\Office12\Office.dll"/> </dependentAssembly> <!-NEW STUFF--> <dependentAssembly> <assemblyIdentity name="Microsoft.PowerCommands" publicKeyToken="null" culture="neutral"/> <!-- For 64-bit systems, uncomment this one <codeBase version="1.1.0.0" href="C:\Program Files (x86)\PowerCommands\Microsoft.PowerCommands.dll"/> --> <!-- For 32-bit systems, uncomment this one <codeBase version="1.1.0.0" href="href="C:\Program Files\PowerCommands\Microsoft.PowerCommands.dll"/> --> </dependentAssembly>
这对我来说很好。
我刚刚遇到了一个适合我的情况的答案。使用ngen实用程序删除本机图像缓存可解决此问题。我不知道它到底是哪张图像,因为我一次也没有浏览过那张图像,但是它起作用了,所以我能够保留PowerCommands!
该命令是:
ngen /delete *
为了完整叙述我的故事,我已将其发布在我的博客上,包括我发现的有关ngen和本机图像缓存的信息。我想我还有很多要学习的东西,但这是一个开始。
Microsoft提供了一个修补程序:Microsoft Connect。我在此博客上找到了此链接。
重新启动后,此修复程序为我解决了问题。