title: Copy User Control from one project to another within same solution
body: <p>Occasionally, a C# project will have a user control in it that belongs to another C# project and I will have to move it over.  Attempting to simply copy + paste that user control  over results in namespace errors. Let's say project 1 has a namespace of <code>namespace General.Category1.Controls</code> and project 2 has a namespace of <code>namespace General.Category2.Controls</code>.</p>
  
  <p>The steps I initially took were:</p>
  
  <p><strong>1)</strong> Copy + paste control (which includes <code>.cs</code>, <code>designer.cs</code> and <code>.resx</code> files) from project 1 to project 2</p>
  
  <p><strong>2)</strong> Change namespace to project 2's <code>namespace General.Category2.Controls</code></p>
  
  <p>At this point upon building, I received additional errors from the forms on which this control is used before the copy + paste that states <code>'The type of namespace name 'UserControl1' does not exist in namespace 'General.Category1.Controls' (are you missing an assembly reference?)</code>.  It turns out that the <code>designer.cs</code> form files did not update to the correct namespace after the copy + paste.</p>
  
  <p>So then I add to add an additional step:</p>
  
  <p><strong>3)</strong> Change declarations to match new namespace of <code>General.Category2.controls</code> aka <code>private General.Category2.Controls UserControl userControl1;</code></p>
  
  <p>I'm confused why the <code>designer.cs</code> files wouldn't have updated that since it's not usually advised to edit <code>designer.cs</code> files.  But then again, maybe it's ok to modify them as long as you don't touch the <code>InitializeComponent()</code> method as it states in the actual file itself.</p>
  
  <p>In conclusion, why do all of the <code>designer.cs</code> not update automatically? Is the actual answer to know where this control is used and update the declarations myself as I have done?</p>
  
  <p>[EDIT]: The first 2 steps are for the control itself (it's <code>.cs</code> and <code>.designer.cs</code> files). The 3rd step is for associated with any forms in which the control was placed on before copying it over because it is still using the old namespace, so all of the form <code>.designer.cs</code> files must be changed as well.</p>