Botbuilder-dotnet: NuGet packages reference SourceLink as a runtime dependency rather than dev dependency

Created on 25 Jan 2019  路  3Comments  路  Source: microsoft/botbuilder-dotnet

Version

4.2.x

Describe the bug

The libraries that produce NuGet packages have a reference to the SourceLink.Create.CommandLine package, but they lack the PrivateAssets="All" attribute which ultimately results in there being a transitive dependency to the package for consumers of the SDK.

To Reproduce

Steps to reproduce the behavior:

  1. Install any SDK package (e.g. Microsoft.BotBuilder.Schema) from NuGet
  2. Notice that SourceLink.Create.CommandLine is installed as a transitive dependency to your application's project

Expected behavior

Since SourceLink is a tool used during the development of the SDK packages, I would not expect there to be a transitive dependency to it from the published packages.

Additional Context

One fix is to simply manually add PrivateAssets="All" to the PackageReference for SourceLink.Create.CommandLine across all the projects.

Another, simpler fix is to just update the package to 2.8.3 (latest as of right now) which will has the proper metadata to trigger PrivateAssets to be set automatically (along with some other properties).

[bug]

4.3 P1

Most helpful comment

Still see this issue on 4.3.2. Why it's closed? @cleemullins
image

All 3 comments

As of version 4.2.2 this is still an issue. Is there an open PR to change the proejcts to use PrivateAssets=All?

Still see this issue on 4.3.2. Why it's closed? @cleemullins
image

@cleemullins, this bug should be reopened, because #1324
did not fix the bug, it only updated the version number, but updating the package should have also added the PrivateAssets="All" attribute.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sgellock picture sgellock  路  4Comments

chaoteng picture chaoteng  路  6Comments

nrandell picture nrandell  路  6Comments

MarceloRGonc picture MarceloRGonc  路  6Comments

brandonh-msft picture brandonh-msft  路  6Comments