Skip to content

Is there a way to "forward" content / contentFiles from one package to another? #11213

Closed Answered by the-avid-engineer
the-avid-engineer asked this question in Q&A
Discussion options

You must be logged in to vote

Turns out this is possible (at least with a .NET 6 target framework, I haven't tested anything earlier)

If you use the following in MyPackage.csproj:

    <PackageReference Include="NewRelic.Agent" Version="9.6.0">
      <PrivateAssets>analyzers;build</PrivateAssets>
    </PackageReference>

And this in MyProject.csproj:

    <PackageReference Include="...MyPackage..." Version="...MyPackageVersion...">
      <PrivateAssets>analyzers;build</PrivateAssets>
    </PackageReference>

Then the contentFiles from NewRelic.Agent will be copied to the output of MyProject!

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by the-avid-engineer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant