title: Prevent designer.cs from rebuild
body: <p>I am using VS 2015 Pro. I have a form called <code>test</code>. The <code>test.designer.cs</code> file contains about 12k+ lines of code. It contains a lot of Telerik controls placed in several tabs (RadPageViewPage) and a lot of SplitContainer. Opening this form in design mode takes a few seconds, but that's not the issue.</p>
  
  <p>Scenario problem:</p>
  
  <ol>
  <li>Open two cards test.cs and test.cs [Design].</li>
  <li>Add one line of code in test.cs. (<code>private Int32 x = 0</code>).</li>
  <li>Perform build (Shift+F6)</li>
  <li>Profit! ... not this time because build takes 20 secound. :(</li>
  </ol>
  
  <p>If you execute the same but without opening test.cs [Design], the build is done in 1 second.</p>
  
  <ol>
  <li>Why VS rebuilds designer.cs file if I had not done any change in design mode? </li>
  <li>How to prevent this from happening?</li>
  <li>What are the best practices for such a large form containing a large amount of controls?</li>
  </ol>
  
  <p><strong>Edit 1:</strong>
  So the assumption that designer.cs is rebuilt is wrong.<br>
  The problem is something else.<br><br>
  I started VS using devenv.exe /log.<br>
  Below are some errors that may be related to my problem:</p>
  
  <pre><code>483  Begin package load [Toolbox Controls Installer Package] {2C298B35-07DA-45F1-96A3-BE55D91C8D7A}  VisualStudio 2015/08/27 08:59:05.832
  484  End package load [Toolbox Controls Installer Package] {2C298B35-07DA-45F1-96A3-BE55D91C8D7A}  VisualStudio 2015/08/27 08:59:05.833 
  485 ERROR Exception parsing Advertised (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.866 
  486 ERROR Exception parsing AssemblyFolders (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.867 
  487 ERROR Exception parsing Fusion (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.867 
  488 ERROR Exception parsing NGen (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.867 
  489 ERROR Exception parsing NGenQueue (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.867 
  490 ERROR Exception parsing policy (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.867 
  491 ERROR Exception parsing Security (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.867 
  492 ERROR Exception parsing Windows Presentation Foundation (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.867 
  493 ERROR Exception parsing Advertised (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.867 
  494 ERROR Exception parsing AssemblyFolders (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.867 
  495 ERROR Exception parsing Fusion (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.867 
  496 ERROR Exception parsing NGen (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.868 
  497 ERROR Exception parsing NGenQueue (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.868 
  498 ERROR Exception parsing policy (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.868 
  499 ERROR Exception parsing Security (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.868 
  500 ERROR Exception parsing Windows Presentation Foundation (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.868 
  501 ERROR Exception parsing Advertised (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.868 
  502 ERROR Exception parsing AssemblyFolders (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.868 
  503 ERROR Exception parsing Fusion (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.868 
  504 ERROR Exception parsing NGen (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.868 
  505 ERROR Exception parsing NGenQueue (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.868 
  506 ERROR Exception parsing policy (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.868 
  507 ERROR Exception parsing Security (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.868 
  508 ERROR Exception parsing Windows Presentation Foundation (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.868 
  509 ERROR Exception parsing Advertised (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.869 
  510 ERROR Exception parsing AssemblyFolders (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.869 
  511 ERROR Exception parsing Fusion (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.869 
  512 ERROR Exception parsing NGen (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.869 
  513 ERROR Exception parsing NGenQueue (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.869 
  514 ERROR Exception parsing policy (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.869 
  515 ERROR Exception parsing Security (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.869 
  516 ERROR Exception parsing Windows Presentation Foundation (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.870 
  517 ERROR Exception parsing Advertised (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.870 
  518 ERROR Exception parsing AssemblyFolders (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.870 
  519 ERROR Exception parsing Fusion (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.870 
  520 ERROR Exception parsing NGen (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.870 
  521 ERROR Exception parsing NGenQueue (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.870 
  522 ERROR Exception parsing policy (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.870 
  523 ERROR Exception parsing Security (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.870 
  524 ERROR Exception parsing Windows Presentation Foundation (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.870 
  525 ERROR Exception parsing Advertised (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.870 
  526 ERROR Exception parsing AssemblyFolders (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.871 
  527 ERROR Exception parsing Fusion (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.871 
  528 ERROR Exception parsing NGen (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.871 
  529 ERROR Exception parsing NGenQueue (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.871 
  530 ERROR Exception parsing policy (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.871 
  531 ERROR Exception parsing Security (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.871 
  532 ERROR Exception parsing Windows Presentation Foundation (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.871 
  533 ERROR Exception parsing Advertised (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.871 
  534 ERROR Exception parsing AssemblyFolders (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.871 
  535 ERROR Exception parsing Fusion (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.871 
  536 ERROR Exception parsing NGen (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.871 
  537 ERROR Exception parsing NGenQueue (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.871 
  538 ERROR Exception parsing policy (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.871 
  539 ERROR Exception parsing Security (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.871 
  540 ERROR Exception parsing Windows Presentation Foundation (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.871 
  541 ERROR Exception parsing Advertised (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.872 
  542 ERROR Exception parsing AssemblyFolders (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.872 
  543 ERROR Exception parsing Fusion (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.872 
  544 ERROR Exception parsing NGen (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.872 
  545 ERROR Exception parsing NGenQueue (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.872 
  546 ERROR Exception parsing policy (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.872 
  547 ERROR Exception parsing Security (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.872 
  548 ERROR Exception parsing Windows Presentation Foundation (under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework) as a version   Microsoft.VisualStudio.IDE.ToolboxControlsInstaller.ToolboxInstallerPackage 2015/08/27 08:59:05.872 
  549  Done loading new toolbox content, total time = 125 ms
  </code></pre>