title: Unable to load one or more of the requested types - ASP.NET Core 6.0 Web API
body: <p>ASP.NET Core 6.0 web app. I get an error when I try to map controllers in <code>Startup.cs</code>. The assembly referenced (<code>QESI.Accuracy.Contract</code>) is a project reference, and it works fine.</p>
  <p>The line above it loads a class from that project with no issues. This particular assembly is also packaged and used in other solutions, so I'm wondering if something is trying to load the Nuget package instead of the project reference and that is what's causing it to fail.</p>
  <p><a href="https://i.stack.imgur.com/XzroW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XzroW.png" alt="Exception" /></a></p>
  <p>If I change the name of the assembly for the project to suffix a <code>2</code> I get an error that the same type exists in two assemblies. So something somewhere is referencing the version 1.1.58, which would be the nuget package. I've cleared all nuget package caches using <a href="https://docs.microsoft.com/en-us/nuget/consume-packages/managing-the-global-packages-and-cache-folders" rel="nofollow noreferrer">these instructions</a>.</p>
  <p><a href="https://i.stack.imgur.com/6mP8p.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6mP8p.png" alt="Changed Name" /></a></p>