title: Cannot create instance of 'x' WPF Design time
body: <p>I have a WPF Usercontrol that displays "Cannot create an instance of 'x'" during design time. At runtime it works fine. I can view it directly when I open the user control, however when I add the user control to another control is gives me this error.</p>
  
  <p>the most inner Stack Trace gives me this:</p>
  
  <pre><code>IOException: Cannot locate resource 'cptv/vtimewidget.xaml'.
  
     at MS.Internal.AppModel.ResourcePart.GetStreamCore(FileMode mode, FileAccess access)
     at System.IO.Packaging.PackagePart.GetStream(FileMode mode, FileAccess access)
     at System.IO.Packaging.PackagePart.GetStream()
     at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
     at BLUE.Controls.CPTV.VTimeWidget.InitializeComponent()
     at BLUE.Controls.CPTV.VTimeWidget..ctor()
  </code></pre>
  
  <p>Possible fixes found online that didn't work</p>
  
  <ul>
  <li>Clean and build the solution</li>
  <li>Using "pack://application:,,,/Project/..." instead of "../../" for file references</li>
  </ul>
  
  <p>Thank-you</p>