rules_dotnet
rules_dotnet copied to clipboard
[Next] Transitive dependency TFM selection
Currently the next
branch does not resolve dependencies in the exact same way as MSBuild.
The exact case that is not resolved the same way is the following:
LibA(net6.0) -> LibB(netstandard2.1) -> LibC(net6.0, netstandard2.1)
MSBuild does the following:
- LibA is build for TFM net6.0
- LibB is built for TFM netstandard2.1
- LibC is built for TFM netstandard2.1 to fulfil the LibB -> LibC dependency
- LibC is built for TFM net6.0 because LibC is a transitive dependency of LibA and thus LibC with TFM net6.0 becomes the selected version of LibC
The next
branch currently resolves it like this:
- LibA is build for TFM net6.0
- LibB is built for TFM netstandard2.1
- LibC is built for TFM netstandard2.1 to fulfil the LibB -> LibC dependency
- LibC is NOT built in net6.0 and thus LibC with TFM netstandard2.1 becomes the selected version of LibC
This behaviour reflects the MSBuild behaviour if the setting DisableTransitiveProjectReferences
is set to true
If we want to mirror the MSBuild resolution we need to fix this.