title: A fatal error occurred, the required library libhostfxr.dylib could not be found
body: <p>While trying to add authentication to a .net core app on mac, using this command :</p>
  
  <pre><code>dotnet aspnet-codegenerator identity -h
  </code></pre>
  
  <p>I receive this error :</p>
  
  <blockquote>
    <p>Macintosh-2:Website abd$ dotnet aspnet-codegenerator identity -h A
    fatal error occurred, the required library libhostfxr.dylib could not
    be found. If this is a self-contained application, that library should
    exist in
    [/Users/abd/.dotnet/tools/.store/dotnet-aspnet-codegenerator/2.2.3/dotnet-aspnet-codegenerator/2.2.3/tools/netcoreapp2.1/any/].
    If this is a framework-dependent application, install the runtime in
    the default location [/usr/local/share/dotnet] or use the DOTNET_ROOT
    environment variable to specify the runtime location. M</p>
  </blockquote>