Skip to content

Support transitive P2P references - #4992

Merged
ViktorHofer merged 2 commits into
masterfrom
ViktorHofer-p2p
Mar 6, 2020
Merged

Support transitive P2P references#4992
ViktorHofer merged 2 commits into
masterfrom
ViktorHofer-p2p

Conversation

@ViktorHofer

@ViktorHofer ViktorHofer commented Mar 6, 2020

Copy link
Copy Markdown
Member

When enabling project restore in dotnet/runtime, transitive dependencies are now resolved but the hook is missing the TargetFramework.Sdk to annotate/filter them.

Port of aa4285b#diff-65c01698b75e00dac00a586ec65bace1 from the old config system.

When enabling project restore in dotnet/runtime, transitive dependencies are now resolved but the hook is missing the TargetFramework.Sdk to annotate/filter them.
@ViktorHofer
ViktorHofer requested review from Anipik and ericstj March 6, 2020 10:01
@ViktorHofer ViktorHofer self-assigned this Mar 6, 2020

@Anipik Anipik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ViktorHofer can you give an example here for better understanding ?

@ViktorHofer

Copy link
Copy Markdown
Member Author

Sure, I shared the details with you offline in Teams:

C:\git\runtime4\src\libraries>dotnet msbuild C:\git\runtime4\src\libraries\System.Collections\src\System.Collections.csproj /bl
Microsoft (R) Build Engine version 16.4.0+e901037fe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

 

C:\Program Files\dotnet\sdk\3.1.101\MSBuild.dll -distributedlogger:Microsoft.DotNet.Tools.MSBuild.MSBuildLogger,C:\Program Files\dotnet\sdk\3.1.101\dotnet.dll*Microsoft.DotNet.Tools.MSBuild.MSBuildForwardingLogger,C:\Program Files\dotnet\sdk\3.1.101\dotnet.dll -maxcpucount -verbosity:m /bl C:\git\runtime4\src\libraries\System.Collections\src\System.Collections.csproj
C:\Program Files\dotnet\sdk\3.1.101\Microsoft.Common.CurrentVersion.targets(1653,5): error : Project '..\..\System.Private.Uri\src\System.Private.Uri.csproj' targets 'netcoreapp5.0-Windows_NT;netcoreapp5.0-Unix'. It cannot be referenced by a project that targets '.NETCoreApp,Version=v5.0'. [C:\git\runtime4\src\libraries\System.Collections\src\System.Collections.csproj]

System.Collections references System.Runtime which references System.Private.Uri. Now that we enable restore for these projects, more targets run because the ProjectAssetsFile exists. The additional project reference from System.Collections to System.Private.Uri comes from the "IncludeTransitiveProjectReferences" target:

image

@ViktorHofer
ViktorHofer merged commit 010054d into master Mar 6, 2020
@ViktorHofer
ViktorHofer deleted the ViktorHofer-p2p branch March 6, 2020 16:49
@Anipik

Anipik commented Mar 6, 2020

Copy link
Copy Markdown
Contributor

apologies. Teams on my mac weirds strangely :). The messages are quite delayed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants