title: Include Nuget dependencies in my build output?
body: <p>I am building a modular .NET core application that can load extensions at runtime using MEF. I have 2 projects, one is a library that I want to be able to load at runtime, then I have my main application that will do the loading.</p>
  
  <p>My library project has some Nuget dependencies. In order to load my library at runtime, I need those Nuget dependencies to be available next to the library at runtime, but building using VS2017 does not include these Nuget DLLs as part of the output.</p>
  
  <p>How do I get Nuget DLLs included when I build my library?</p>
  
  <p>Edit: I have tried <code>dotnet publish</code> and <code>dotnet pack</code>, but both of those make me a <code>nupkg</code> file only containing my DLL and not the nuget DLLs I need with it. Also, I can't load a <code>nupkg</code> file at runtime very easily, which is why I'd like to just get the resulting assemblies themselves on their own.</p>
  
  <p>For what it's worth, this is what my csproj looks like:</p>
  
  <pre><code>&lt;Project Sdk="Microsoft.NET.Sdk"&gt;
  
    &lt;PropertyGroup&gt;
      &lt;TargetFramework&gt;netcoreapp1.1&lt;/TargetFramework&gt;
      &lt;AssemblyName&gt;JSON.plugin&lt;/AssemblyName&gt;
      &lt;IncludeBuiltProjectOutputGroup&gt;true&lt;/IncludeBuiltProjectOutputGroup&gt;
    &lt;/PropertyGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;PackageReference Include="Microsoft.Composition" Version="1.0.31" /&gt;
      &lt;PackageReference Include="Newtonsoft.Json" Version="10.0.3" /&gt;
    &lt;/ItemGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;ProjectReference Include="..\..\BDDGen.Types\BDDGen.Types.csproj" /&gt;
    &lt;/ItemGroup&gt;
  
  &lt;/Project&gt;
  </code></pre>