title: Compilation error after changing ASP.NET MVC project namespace?
body: <p>I'm sure that this is a bug of Visual Studio (2017 if it matters).</p>
  
  <p>I would like to keep the project name short and simple but the project namespace should be verbose enough to follow my naming convention. So after creating the project, I changed the project namespace in the Application tab in project properties window. Building is OK, but debugging showed that there was some compilation error (will be soon posted below). I've Googled around and found out that the problem is in the <code>web.config</code> inside the <code>Views</code> folder, that looks like the last place the old namespace referenced. I've also tried changing it to the new one and the first time it seemed to work OK.</p>
  
  <p>But now I've encountered that exact same issue again and of course the <code>web.config</code> file I fixed before is not changed to something wrong, the new namespace is there (replacing the old one). I've tried deleting all the cached files in /Local/Temp/Temporary ASP.NET Files, clean (manually deleting all files in /bin) and rebuild the project. Nothing worked. Still that same error. I've even tried restarting my computer and repeating the steps above but still nothing changed.</p>
  
  <p>Here is the involved section in <code>web.config</code>:</p>
  
  <pre><code>&lt;namespaces&gt;
      &lt;add namespace="System.Web.Mvc" /&gt;
      &lt;add namespace="System.Web.Mvc.Ajax" /&gt;
      &lt;add namespace="System.Web.Mvc.Html" /&gt;
      &lt;add namespace="System.Web.Optimization" /&gt;
      &lt;add namespace="System.Web.Routing" /&gt;        
      &lt;add namespace="CS.MvcWebsite" /&gt;
    &lt;/namespaces&gt;
  </code></pre>
  
  <p>The new namespace here is <code>CS.MvcWebsite</code>, while the old one is <code>WebSite</code> (which is also the project name). When running, it shows the compilation error like this:</p>
  
  <p><a href="https://i.stack.imgur.com/5bOE8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5bOE8.png" alt="enter image description here"></a></p>
  
  <p>I wonder why the hell that could still be pulled out? looks like there is still some very hidden place where the cache is saved. I hope someone here has experienced with this and successfully worked-around it. I'm sure that almost encountering this should have been fine by modifying the <code>web.config</code> file (like what I did too) but as I said <strong>strangely</strong> that's not enough to force VS to use what is new, it looks really like a bug.</p>
  
  <p><strong>Update</strong>:
  After suggesting of <em>mjwills</em>, I've also tried deleting the <strong>obj</strong> folder as well (as before only <code>bin</code> was cleaned). But still it does not help anyway.</p>