dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
https://dot.net/core
MIT License
2.68k stars 1.06k forks source link

apicompat --package-assembly-references is difficult to use #41686

Open ericstj opened 3 months ago

ericstj commented 3 months ago

The docs/usage say it should be TFM=file,file, but it's actually a tfm|file,file.

The docs don't indicate how to specify more than one TFM - but this is done by passing the parameter multiple times.

The docs say TFM but it actually needs the full form of the moniker. It should allow the short form (by parsing it).

The docs should also indicate that a directory works.

Alternate option for a package - generate a multi-targeting project for all frameworks discovered in package, add a reference to the package, restore it, and then drive API compat off such a project. This could save a lot of manual inputs, but it would be a lot to juggle (MSBuild reference, temporary project, etc etc).

dotnet-policy-service[bot] commented 2 months ago

@dotnet/area-infrastructure-libraries a new issue has been filed in the ApiCompat area, please triage