title: dotnet pack for .NET Core project produces .nupkg file with sources
body: <p>I have a simple .NET Core 2.1 class library project and need to pack it as a Nuget package. For that I'm using this command:</p>
  
  <pre><code>dotnet pack &lt;project&gt;.csproj --output &lt;outputFolder&gt; /p:Configuration=Release
  </code></pre>
  
  <p>But, I'm getting this warning:</p>
  
  <pre><code>C:\Program Files\dotnet\sdk\2.1.502\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(202,5): warning NU5100: The assembly 'obj\Release\netcoreapp2.1\&lt;assembly&gt;.dll' is not inside the 'lib' folder and hence it won't be added as a reference when the package is installed into a project. Move it into the 'lib' folder if it needs to be referenced.
  </code></pre>
  
  <p>I understand that <code>lib</code> folders are for targeting multiple frameworks, but I don't want that. I only want to target .NET Core 2.1.</p>
  
  <p>At the end my <code>.nupkg</code> file is created, but it has all the source code (don't know why) and when used in other projects, they cannot reference the assemblies, because they are inside the <code>bin\Release\netcoreapp2.1</code> folder.</p>
  
  <p>I've seen some guides to create Nuget packages from .Net Core projects and none of them mention something related to <code>lib</code> folders.</p>
  
  <p>I need to understand if something is missing or if I'm doing something wrong.</p>
  
  <p>Thanks.</p>
  
  <p><strong>Edit: Added the project file and the .nuspec file</strong></p>
  
  <p>Project File:</p>
  
  <pre><code>&lt;Project Sdk="Microsoft.NET.Sdk"&gt;
  
    &lt;PropertyGroup&gt;
      &lt;TargetFramework&gt;netcoreapp2.1&lt;/TargetFramework&gt;
      &lt;Company&gt;xxx&lt;/Company&gt;
      &lt;RootNamespace&gt;xxxx&lt;/RootNamespace&gt;
      &lt;Product&gt;xxxx&lt;/Product&gt;
      &lt;Authors&gt;xxxx&lt;/Authors&gt;
      &lt;NuspecFile&gt;xxxxx.nuspec&lt;/NuspecFile&gt;
    &lt;/PropertyGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="5.0.1" /&gt;
      &lt;PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.4" /&gt;
      &lt;PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="2.1.4" /&gt;
      &lt;PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.1.4" /&gt;
      &lt;PackageReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.3" /&gt;
    &lt;/ItemGroup&gt;
  
  &lt;/Project&gt;
  </code></pre>
  
  <p><code>.nuspec</code> File:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"&gt;
    &lt;metadata&gt;
      &lt;id&gt;xxxxxx&lt;/id&gt;
      &lt;version&gt;1.0.0&lt;/version&gt;
      &lt;title&gt;xxxx&lt;/title&gt;
      &lt;owners&gt;xxxx&lt;/owners&gt;
      &lt;description&gt;xxxx&lt;/description&gt;
      &lt;authors&gt;xxxx.&lt;/authors&gt;
      &lt;copyright&gt;Copyright 2019 xxxx.&lt;/copyright&gt;
      &lt;summary&gt;xxx is a common code library for internal projects.&lt;/summary&gt;
    &lt;/metadata&gt;
  &lt;/package&gt;
  </code></pre>