title: Could not load type 'System.Web.Mvc.ViewUserControl<SOMETYPE>'
body: <p>I'm trying to deploy ASP.NET MVC 2 project (VS2010) to Win Server 2008 R2 </p>
  
  <p>It works perfectly on dev machine. But strange error occurs at Server 2008 R2:
  When .ascx file has header that uses generic type:</p>
  
  <pre><code>&lt;%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl&lt;MyProj.Web.Models.RangeViewModel&gt;" %&gt;
  </code></pre>
  
  <p>Server reports <strong>Could not load type 'System.Web.Mvc.ViewUserControl&lt;MyProj.Web.Models.RangeViewModel&gt;'.</strong></p>
  
  <p>But when I declare somewhere in .cs file type like</p>
  
  <pre><code>public class AA : System.Web.Mvc.ViewUserControl&lt;MyProj.Web.Models.RangeViewModel&gt;
  {
  }
  </code></pre>
  
  <p>and use it instead in <em>&lt;%@ Control</em> header. Then it works as it should.</p>
  
  <p>Am I missing something?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I deploy app in two steps (on server):</p>
  
  <ol>
  <li>Rebuild VS solution from source using command-line MSBuild (for .NET 4)</li>
  <li>Launch custom msbuild task (have publih.msbuild file for this) that executes two targets: Targets="ResolveReferences;_CopyWebApplication"</li>
  </ol>