title: Install .nupkg locally on macOS using dotnet or nuget
body: <h2>Question</h2>
  
  <p>I've got a <code>.nupkg</code> file, and I'm trying to install it locally on macOS, so that I can run a .net core application that depends on it. How do I do this?</p>
  
  <p>I've installed the <code>dotnet</code> runtime, <code>mono</code> and <code>nuget.exe</code>. I've tried to look at the different <code>nuget install</code> options, tried things like <code>nuget install &lt;file&gt;.nupkg</code>, <code>nuget install -Source . &lt;file&gt;</code>, ... but nothing seems to work; they just tell me that the path is incorrect or show me the command help again. I'd expect it to say something like "installing .nupkg to ~/.nuget/packages".</p>
  
  <p>I read that one of the options that Windows users have is an <code>Install-Package</code> command that they can use from Powershell, but I'm pretty sure this should be possible with just nuget as well?</p>
  
  <h2>Background</h2>
  
  <p>I'm somewhat new to .net and .net core development.</p>
  
  <p>I've compiled some .net core code in Windows that depends on a custom library, and I believe I should be able to run the resulting <code>.dll</code> file on macOS using <code>dotnet</code>. Instead, I get an error similar to the following:</p>
  
  <pre><code>Error:
    An assembly specified in the application dependencies manifest (foo.deps.json) was not found:
      package: 'A.B', version: '0.9.5'
      path: 'lib/netstandard1.3/A.B.dll'
  </code></pre>
  
  <h2>Update</h2>
  
  <p>I think I misunderstood the purpose of the <code>.nupkg</code> files; I now think they're only used during development, and not for running the code (the dependencies for running the code seem to be packaged as <code>.dll</code>s, as the  error message above says).</p>
  
  <p>I solved the error above by <em>publishing</em> the project (<code>dotnet publish</code>), and then I can run the resulting <code>.dll</code> using <code>dotnet ./path/to/publish/foo.dll</code>; the dependencies end up being copied into the <code>publish</code> folder.</p>
  
  <p>I still had issues figuring out how to install the <code>.nupkg</code>s for development, so I'm grateful for the accepted answer.</p>