title: MVC View get's compilation error (CS0246) when referenced assembly built as console application. When it built as Class Library - it works fine
body: <p>I have a solution. First project contains entity framework models, output type is Console application. Other project is frontend, asp.net mvc 5 application that have CRUD views for entities from the first project. First project referenced from the second project, also I added dependent assembly in web.config:</p>
  
  <pre><code>&lt;dependentAssembly&gt;
   &lt;assemblyIdentity name="VolLoader" publicKeyToken="null" /&gt;
  &lt;/dependentAssembly&gt;
  </code></pre>
  
  <p>But when I access view that uses entity from this assembly, I get view compilation error: </p>
  
  <pre><code>Compiler Error Message: CS0246: The type or namespace name 'VolLoader' could not be found (are you missing a using directive or an assembly reference?)
  
  Source Error:
  
  
  
  Line 29:     
  Line 30:     
  Line 31:     public class _Page_Views_JobMon_Index_cshtml : System.Web.Mvc.WebViewPage&lt;IEnumerable&lt;VolLoader.Data.JobToWatch&gt;&gt; {
  Line 32:         
  Line 33: #line hidden
  </code></pre>
  
  <p>Adding namespace () to the web.config in views folder causes compilation errors on every view.</p>
  
  <p>Assembly is copied to output.</p>
  
  <p><strong>But when I change Output type of the first project to the Class Library, it works, no compilation errors.</strong> I can't understand why? Does anyone has ideas?</p>