admin管理员组

文章数量:1315306

I installed HttpClientToCurl on my project to inspect and export some requests, but I don't want to bring unwanted dependencies on the project, I mean, it is only for debuggind purpuse and no reference of such library should end in production code.

So I'm asking if in nuget there is something like the npm i --save-dev to save a library as a dependency but only for development, and it wont end in the published package.

I read that the most similar idea is marking the PackageReference as PrivateAssets

<PackageReference Include="HttpClientToCurl" Version="2.0.6">
    <PrivateAssets>all</PrivateAssets>
</PackageReference>

Is that true? I mean if I add PrivateAssets=all wouldn't the package installer still add the HttpClientToCurl library but without exporting it?

本文标签: Is there a way to install a nuget package only for development environmentStack Overflow