views:

4905

answers:

8

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.

+8  A: 

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.

Jason Stevenson
Good call, sir! I just ran into a similar problem; in a WPF app in VS 2008, when I opened a Window in design view, the preview window would show its rendering message...and then VS 2008 would abruptly exit with no error message. Just *blink*, and gone. Uninstalling PowerCommands fixed it.
Kyralessa
This fixed it for me as well; however, I use PowerCommands many times throughout the day. Any ideas on how to fix that? I tried Ben Duguid's solutions but that did not work.
palehorse
+2  A: 

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.

This fixed the issue for me. I was not using Power Commands.
Qua
+1  A: 

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.

Peter
+3  A: 

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.

Zhaph - Ben Duguid
Since I use PowerCommands many times throughout the day, I gave this a shot. Unfortunately id did not work for me. I still get the behavior where opening the XAML file (even in full XAML view or using the Source Code(Text) Editor VS simply "goes away". :(
palehorse
Not sure what more to suggest - the only other info I have is that it worked for me on XP, but I was still having issues on Vista. As ReSharper now includes the Collapse Solution command, all I'm really missing is the "Open Folder in Windows Explorer" from solution explorer - and I get that from TFS as well. You could try disabling all the commands from Tools | Options | PowerCommands and see if that helps, then enable them one at a time.
Zhaph - Ben Duguid
This worked for me, and I would hope others as well - obviously, if you are NOT on a 64-bit system, the value of the href attribute should be "C:\Program Files\PowerCommands\Microsoft.PowerCommands.dll" and not the one in the code above...
Jason Bunting
A: 

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.

palehorse
A: 

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.

p2u
A: 

ulan boş boş konuşçağınıza çözüm bulsaymışsınız

mallar
A: 

Thanks to palehorse. All other solutions did not worked for me. It seems, that this is the solution for a very annoying problem, but without knowing why ;-9

cipher0003