I have some requirement to set Copy Local to false for the NuGet dll. Before that, I used the package.config format and everything worked fine. After migration to Package Reference format, I cannot find a way how to do that. Could someone help me?
You can use PrivateAssets. Copied from the docs
<ItemGroup>
<!-- ... -->
<PackageReference Include="Contoso.Utility.UsefulStuff" Version="3.6.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<!-- ... -->
</ItemGroup>
edit: actually, you might need to use <ExcludeAssets>runtime</ExcludeAssets>
.