title: Avoiding Visual Studio designer errors when WPF resource is defined in separate project
body: <p>How can I avoid Visual Studio designer errors when a WPF resource is defined in separate project?</p>
  
  <p>I have three projects in a composite WPF application: the main application, an "infrastructure" library, and a "module" library. The main application references the other projects via their output DLLs (the projects are not located in a single solution together).</p>
  
  <p>I am defining a skin (some brushes and styles in a <code>ResourceDictionary</code>) in the "infrastructure" library. I would like the main application to select a skin and make it available to the entire application (via <code>MergedDictionaries</code> in App.xaml).</p>
  
  <p>In my module I want to use the resources defined in the skin that the main application loads. If I reference the resource as if it were locally available like this:</p>
  
  <pre><code>Background={StaticResource MainBackgroundBrush}
  </code></pre>
  
  <p>almost everything works as desired. The exception is that Visual Studio's designer gets confused and tells me that "StaticResource reference 'MainBackgroundBrush' was not found". This effectively prevents me from using the designer.</p>
  
  <p>What can I do to define a "skin" <code>ResourceDictionary</code> in a project, reference that skin in the main application, and then use its resources in a module project?</p>