What causes Visual Studio 2008 SP1 to crash when switch to Design View of a WPF application

[亡魂溺海] 提交于 2019-11-29 06:13:41

问题


After developing a WPF application without Source Control, I decided to add the solution to TFS.

After doing so whenever I opened the main window.xaml file in Design View Visual Studio would disappear and the following event would be logged in the Application Event log:

.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.


回答1:


Same issue, but without Power Commands installed. The only workaround I've been able to consistently use is to Clean/Rebuild the solution before opening ANY xaml file. If you can't get into your solution because the XAML is loading on start up, delete the suo.




回答2:


The problem was caused by a Visual Studio add-in named, "Power Commands for Visual Studio 2008".

After uninstalling them and restarting Visual Studio, the design view for xaml files began working normally.




回答3:


If you wish to keep Power Commands for Visual Studio 2008 installed, see this workaround here:

PowerCommands crashing VS2008 SP1

But basically:

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>

This worked nicely for me.




回答4:


I just came across an answer that worked in my situation. Using the ngen utility to delete the native image cache fixed the problem. I don't know which image it was exactly, as I did not go through then one at a time, but it worked and I was able to keep PowerCommands!

The command is:

ngen /delete *

For a full recount of my tale I've posted it on my blog, including what I found out about ngen and the native image cache. I think I still have some more to learn about it, but it's a start.




回答5:


I didn't have PowerCommands installed, but had the same problem. Starting in safe mode and deleting any exotic tabs in the toolbox solved the problem (you can start in normal mode afterwards). This is one of many possible causes of this error, as some Googling will show you.




回答6:


There is an hot-fix available from Microsoft: Microsoft Connect. I found this link on this blog.

This fix solved the problem after a restart for me.




回答7:


I had this problem for quite a while. I never had Power Commands installed, deleting the .suo files and cleaning/rebuilding didn't help. What fixed it for me was to turn off the auto-population of the toolbox. Just go to Tools | Options | Windows Form Designer, then the bottom options is AutoToolboxPopulate which I set to false. Then I reloaded the solution into VS2008 and I was able to open WPF files in either Xaml or designer mode.




回答8:


I have been experiencing this kind of crashes. Make sure your code behind contains the class of the xaml you are editing (this is by default)



来源:https://stackoverflow.com/questions/153942/what-causes-visual-studio-2008-sp1-to-crash-when-switch-to-design-view-of-a-wpf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!