title: Razor web.config error - Could not load file or assembly 'Libdll.Namespace or one of its dependencies
body: <p>I am trying to add my custom namespace so that in .cshtml Razor files I don't need to do using every time for my Models. So I have something like this:</p>
  
  <pre><code>&lt;system.web.webPages.razor&gt;
      &lt;pages pageBaseType="ServiceStack.Razor.ViewPage"&gt;
      &lt;namespaces&gt;
          &lt;!-- other entries --&gt;
  
          &lt;!--works--&gt;
          &lt;add namespace="Libdll" /&gt;
  
          &lt;!-- exception for each --&gt;
          &lt;add namespace="Libdll.Customnamespace1" /&gt;
          &lt;add namespace="Libdll.Customnamespace2" /&gt;
          &lt;add namespace="Libdll.Customnamespace2.Subnamespace" /&gt;
      &lt;/namespaces&gt;
      &lt;/pages&gt;
      &lt;!-- other data --&gt;
  &lt;/system.web.webPages.razor&gt;
  </code></pre>
  
  <p>Everything appears to work fine... the only problem is that during website start I get exception on this line in Global.asax:</p>
  
  <pre><code>protected void Application_Start(object sender, EventArgs e)
  {
      new MyAppHost().Init(); // exception thrown here
  }
  </code></pre>
  
  <p>The exception is:</p>
  
  <blockquote>
    <p>Could not load file or assembly 'Libdll.Customnamespace1' or one of its
    dependencies. The system cannot find the file specified.</p>
  </blockquote>
  
  <p>True, my namespace is Libdll.Customnamespace1 in DLL named Libdll. If I just use Libdll as namespace, that will work.</p>
  
  <p>So, am I missing some configuration setting in web.config? Or this is specific problem related to ServiceStack?</p>