title: The type or namespace name 'Products' does not exist in the namespace 'Umbraco.Web.PublishedContentModels'
body: <p>I am maintaining an Umbraco solution (version 7.15.3).
  Recently a bug has been discovered: Upon navigating to a certain page it fails with the following error:</p>
  
  <blockquote>
    <p>The type or namespace name 'Products' does not exist in the namespace
    'Umbraco.Web.PublishedContentModels' (are you missing an assembly
    reference?)</p>
  </blockquote>
  
  <p>This isn't really surprising, there have been several version upgrades recently, performed by people who are no longer with the company. For instance, the ModelBuilder (which I believe is related to this) was recently upgraded from version 3.0.7 to 3.0.10.</p>
  
  <p>Not knowing much about the issue, I first trried to hunt down the Umbraco.Web.PublishedContentModels. To my surprise it wasn't in umbraco\Umbraco.Web\Lib or umbraco\Umbraco.Web\bin and when I built the solution it wasn't generated. </p>
  
  <p>I eventually found it in a folder that looked like this:</p>
  
  <blockquote>
    <p>C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET
    Files\root\74e32662\fd1a65f5\assembly\dl3\09bc313a\c9c37261_f6d1d501</p>
  </blockquote>
  
  <p>Strange thing is, while the UAT server has one such location, the production server has 4 (the paths only differ in the last folder name).</p>
  
  <p>Luckily, while this error shows up in production, and when I run the project locally, the page just works on the UAT environment. So I took the dll from UAT and copied to umbraco\UmbracoWeb\bin on the production server. This fixed the issue, but it's just a temporary solution. Unless I fix it properly, the next time someone makes a change and redeploys production, the problem will likely come back.</p>
  
  <p>I have a page called Products.cshtml which has the following on the first two lines: </p>
  
  <pre><code>@inherits Umbraco.Web.Mvc.UmbracoTemplatePage&lt;ContentModels.Products&gt;
  @using ContentModels = Umbraco.Web.PublishedContentModels;
  </code></pre>
  
  <p>The 'Products' bit at the first line is underlined and it gives me the same error in VS as the one I get at runtime. Suspecting the upgrade of the ModelBuilder assembly might have been the cause, I tried checking out a version from before the upgrade. But the error is still there.</p>
  
  <p>The solution also has another project that is referenced from the Umbraco project. It has a class called Products, but I don't know if this is in any way related. The Products class doesn't inherit anything.</p>
  
  <p>How can I fix this? Is there a way to recreate the correct Umbraco.Web.PublishedContentModels dll and have it referenced properly?</p>