views:

79

answers:

1

I recently upgraded a number of projects from VS2008 to VS2010. Now I'm having an issue at design time w/ the WPF designer in Visual Studio. It throws an exception for every XAML page I open in design mode. Exceptions also throw for new brand new XAML pages.

Projects currently target .NET 3.5. If I switch to target .NET 4.0, designer opens correctly.

Do note that projects build and run successfully.

The exception Details displayed in the WPF designer vary but scrolling to the bottom of the Details of all the exceptions do show something similar to:

 The component 'MS.Internal.Interaction.AdornerFontResourceDictionary' does not have a resource identified by the URI '/Microsoft.Windows.Design.Interaction;component/ms/internal/interaction/adornerfontresourcedictionary.xaml'.
   at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
   at MS.Internal.Interaction.AdornerFontResourceDictionary.InitializeComponent()
   at MS.Internal.Interaction.AdornerFontResourceDictionary..ctor()
   at Microsoft.Windows.Design.Interaction.AdornerFonts.<.cctor>b__0()
   at Microsoft.Windows.Design.Interaction.AdornerResources.EnsureResources(Boolean forceUpdate)
   at Microsoft.Windows.Design.Interaction.AdornerResources.get_ThemeResources()
   at MS.Internal.Themes.GenericTheme..ctor()

I'm guessing switching the framework targets is is causing the project to point to some older DLL. Any thoughts?

A: 

Following the upgrade, look through all the projects in the solution looking for references to any DLL named "Microsoft.Windows.Design*". Removing these references and recompiling will fix the issue.

Scott Simock