Debug and Fixing ObjectDisposedException in Visual Studio 2010 Debug and Fixing ObjectDisposedException in Visual Studio 2010 wpf wpf

Debug and Fixing ObjectDisposedException in Visual Studio 2010


Are you running a XAML beautifier? - I've had something similar with an extension that cleans XAML up.


This happened to me when I manually grouped a .xaml.cs and .xaml file by editing the .csproj file. To fix this I:

  1. Moved .xaml file to different folder.
  2. Opened up solution.
  3. Removed .xaml from project.
  4. Re-created .xaml file in Visual Studio.
  5. Copied the contents of my original .xaml into the newly created .xaml.

After following these steps I no longer got that error message.