title: Missing partial modifier on declaration of type 'x' - cause by auto-generated code by designer
body: <p>The full error description is as per below:</p>
  
  <p><img src="https://i.stack.imgur.com/5oMi2.jpg" alt="enter image description here"></p>
  
  <p>And I found a few similar question posted before: <a href="https://stackoverflow.com/questions/8533473/missing-partial-modifier-on-declaration-of-type-x-another-partial-declaration-o">A</a> and <a href="https://stackoverflow.com/questions/12866436/missing-partial-modifier-on-declaration-another-partial-declaration-of-this-ty">B</a></p>
  
  <p>But the question in A and B does not provide detail of problem description (perhaps we prompted the same error message but caused by different reason? I am not sure..). Any how, answer in A and B does not have good solution. So I decided to post the similar question with some more details.</p>
  
  <p>My problem is as per below: </p>
  
  <p>The Designer auto generate a new code (ErrSer1.Designer) which contain the same partial class name in (ErrSer.Designer). [Shown in printScreen_1 -> line 25 ]</p>
  
  <p>The difference as we can see is, one is in ErrSer1.Designer (the extra auto generated one)</p>
  
  <blockquote>
    <p>internal class ErrSer</p>
  </blockquote>
  
  <p>Another one is in ErrSer.Designer (the original one who suppose to be) </p>
  
  <blockquote>
    <p>partial class ErrSer</p>
  </blockquote>
  
  <p>Here is the printScreen_1 to show ErrSer1.Designer (the extra auto-generated one) [ Notice line 25 ]</p>
  
  <p><img src="https://i.stack.imgur.com/qnQqe.jpg" alt="enter image description here"></p>
  
  <p>And here is the printScreen_2 to show ErrSer.Designer (the original and usual one) [ Notice line 3 ]</p>
  
  <p><img src="https://i.stack.imgur.com/ezkUv.jpg" alt="enter image description here"></p>
  
  <p>Lastly... what can I do to solve this annoying auto-generated code problem?</p>
  
  <p><strong>EDIT1:</strong>
  My ErrSer Form declared like this</p>
  
  <pre><code>public partial class ErrSer : Form
  </code></pre>
  
  <p><strong>EDIT2:</strong>
  My .csproj file</p>
  
  <p><a href="https://drive.google.com/file/d/0B6wTfkJvzke_OHBRT3pPRUlvTWs/edit?usp=sharing" rel="nofollow noreferrer">My .csproj file location</a></p>