I have Visual Studio 2019 Community Edition
Steps to reproduce:
I load up VS and start a brand new C# .Net Standard Library project. I go to Nuget Pkg Manager and install ANY nuget package. I add a single line to Class1.cs to use a Type from the package.
For instance, if I install WatsonTCP nuget package, I change Class1.cs to look like this:
using System;
using WatsonTcp;
namespace NugetTest
{
public class Class1
{
public Class1()
{
WatsonTcpClient client = new WatsonTcpClient("", 0);
}
}
}
I hit Rebuild Solution. I check the bin/Debug folder and none of the dlls for the nuget package are there. Same thing with bin/Release for a Release build.
I have poored through as many SO issues as I can. I've read the MSDN documentation on nuget.
I set Build and Run MSBuild settings to Detailed. In the build log, I see something like the following output for every single dll:
Primary reference "WatsonTcp, Version=2.0.7.0, Culture=neutral, PublicKeyToken=null".
Resolved file path is "C:\Users\James\.nuget\packages\watsontcp\2.0.7\lib\netstandard2.0\WatsonTcp.dll".
Reference found at search path location "{HintPathFromItem}".
This reference is not "CopyLocal" because at least one source item had "Private" set to "false" and no source items had "Private" set to "true".
I'm guessing this notice about CopyLocal is the reason nothing is being output in the build folder. But I'm not 100% sure.
SO mostly contains older questions that pertain to the pre-"package reference" era before .Net Core and .Net Standard. As a result, any time I search for issues pertaining to "CopyLocal", I get information on setting the CopyLocal property explicitly on a DLL Reference. I'm not finding anything helpful to fix my issue with automatic determination of CopyLocal by the Package Reference and RAR system.
Can anyone help?