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