title: Changing host name on development machine for ASP.net Core 2.1 MVC doesn't work (fine on MVC 5)
body: <p>I want to change the local host name so <a href="http://localhost/app1" rel="nofollow noreferrer">http://localhost/app1</a> could, say, become <a href="http://app1" rel="nofollow noreferrer">http://app1</a> - for a few different ASP.net Core 2.1 MVC websites.</p>
  
  <p>I'm using IIS in Windows 10. (I have all sorts of reliability issues with IIS Express every time I try it - I'd rather use full IIS).</p>
  
  <p>I've followed this article:
  <a href="https://www.mojoportal.com/adding-a-host-name-to-the-hosts-file-for-local-testing" rel="nofollow noreferrer">https://www.mojoportal.com/adding-a-host-name-to-the-hosts-file-for-local-testing</a></p>
  
  <p>changing the hosts file then adding new websites in IIS rather than adding applications under the default website.</p>
  
  <p>I want to do this for various reasons including preventing passwords from autofilling across many websites on localhost.</p>
  
  <p>This works fine on MVC 5 sites - but in .net Core 2.1 MVC sites I get a </p>
  
  <blockquote>
    <p>HTTP Error 502.5 - Process Failure</p>
  </blockquote>
  
  <p>If I look in the log - and I've tried this on various sites - I get an error such as this:</p>
  
  <blockquote>
    <p>An assembly specified in the application dependencies manifest
    (AppName.deps.json) was not found:
        package: 'Stripe.net', version: '19.8.0'
        path: 'lib/netstandard1.2/Stripe.net.dll'</p>
  </blockquote>
  
  <p>This doesn't only happen for Stripe.</p>
  
  <p>The deps.json file I guess is being dynamically created - I can't find it. The sites deploy to the server fine.</p>
  
  <p>Why does this happen - and how can I change hostname away from localhost for .net core 2.1 MVC sites?</p>
  
  <p>If I create a template .net Core 2.1 MVC site it lets me do it fine, strangely but can see no obvious differences.</p>
  
  <p>I can't find anything on Google directly about this though I've looked for a few hours.</p>
  
  <p>I found this - but it didn't help:
  <a href="https://stackoverflow.com/questions/47171507/asp-net-core-2-0-change-localhost-to-a-hostname">ASP .NET Core 2.0 Change &quot;localhost&quot; to a &quot;hostname&quot;</a></p>
  
  <p>Thanks.</p>
  
  <p>Update</p>
  
  <p>A vanilla .net core mvc 2.1 application works fine but as soon as 1 nuget package is installed this error happens again:</p>
  
  <blockquote>
    <p>An assembly specified in the application dependencies manifest
    (hosttest.deps.json) was not found</p>
  </blockquote>
  
  <p>So there's some path issue to nuget packages - can't find how to fix it though.</p>