Skip to content

Commit fad9f15

Browse files
committed
Make PrivateAssets=all implicit for P2Ps pointing to sfx
1 parent 75def83 commit fad9f15

File tree

15 files changed

+89
-90
lines changed

15 files changed

+89
-90
lines changed

eng/references.targets

+3-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@
3333
<Target Name="UpdateProjectReferencesWithPrivateAttribute"
3434
AfterTargets="AssignProjectConfiguration"
3535
BeforeTargets="PrepareProjectReferences"
36-
Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and
37-
('$(IsTestProject)' == 'true' or '$(IsTestSupportProject)' == 'true') and
36+
Condition="'@(ProjectReference)' != '' and
37+
'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and
38+
'$(TargetFrameworkVersion)' == 'v$(NetCoreAppCurrentVersion)' and
3839
'@(ProjectReferenceWithConfiguration)' != ''">
3940
<ItemGroup>
4041
<ProjectReferenceWithConfiguration PrivateAssets="all"

src/libraries/Directory.Build.targets

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
<UseLocalTargetingRuntimePack Condition="'$(IsNETCoreAppAnalyzer)' == 'true'">false</UseLocalTargetingRuntimePack>
6060
<!-- By default, disable implicit framework references for NetCoreAppCurrent libraries. -->
6161
<DisableImplicitFrameworkReferences Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and
62-
$([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '$(NETCoreAppCurrentVersion)')) and
62+
'$(TargetFrameworkVersion)' == 'v$(NetCoreAppCurrentVersion)' and
6363
('$(IsNETCoreAppRef)' == 'true' or '$(IsNETCoreAppSrc)' == 'true')">true</DisableImplicitFrameworkReferences>
6464
<!-- Enable trimming for any source project that's part of the shared framework.
6565
Don't attempt to trim PNSE assemblies which are generated from the reference source. -->

src/libraries/System.Collections.Immutable/src/System.Collections.Immutable.csproj

+6-6
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,12 @@ The System.Collections.Immutable library is built-in as part of the shared frame
168168
</ItemGroup>
169169

170170
<ItemGroup Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'">
171-
<ProjectReference Include="$(LibrariesProjectRoot)System.Collections\src\System.Collections.csproj" PrivateAssets="all" />
172-
<ProjectReference Include="$(LibrariesProjectRoot)System.Linq\src\System.Linq.csproj" PrivateAssets="all" />
173-
<ProjectReference Include="$(LibrariesProjectRoot)System.Memory\src\System.Memory.csproj" PrivateAssets="all" />
174-
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.InteropServices\src\System.Runtime.InteropServices.csproj" PrivateAssets="all" />
175-
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" PrivateAssets="all" />
176-
<ProjectReference Include="$(LibrariesProjectRoot)System.Threading\src\System.Threading.csproj" PrivateAssets="all" />
171+
<ProjectReference Include="$(LibrariesProjectRoot)System.Collections\src\System.Collections.csproj" />
172+
<ProjectReference Include="$(LibrariesProjectRoot)System.Linq\src\System.Linq.csproj" />
173+
<ProjectReference Include="$(LibrariesProjectRoot)System.Memory\src\System.Memory.csproj" />
174+
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.InteropServices\src\System.Runtime.InteropServices.csproj" />
175+
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" />
176+
<ProjectReference Include="$(LibrariesProjectRoot)System.Threading\src\System.Threading.csproj" />
177177
</ItemGroup>
178178

179179
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">

src/libraries/System.Diagnostics.DiagnosticSource/src/System.Diagnostics.DiagnosticSource.csproj

+9-9
Original file line numberDiff line numberDiff line change
@@ -135,18 +135,18 @@ System.Diagnostics.DiagnosticSource</PackageDescription>
135135

136136
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net9.0'))">
137137
<Compile Include="System\Diagnostics\Metrics\RuntimeMetrics.cs" />
138-
<ProjectReference Include="$(LibrariesProjectRoot)System.Threading.ThreadPool\src\System.Threading.ThreadPool.csproj" PrivateAssets="all" />
138+
<ProjectReference Include="$(LibrariesProjectRoot)System.Threading.ThreadPool\src\System.Threading.ThreadPool.csproj" />
139139
</ItemGroup>
140140

141141
<ItemGroup Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'">
142-
<ProjectReference Include="$(LibrariesProjectRoot)System.Collections\src\System.Collections.csproj" PrivateAssets="all" />
143-
<ProjectReference Include="$(LibrariesProjectRoot)System.Collections.Concurrent\src\System.Collections.Concurrent.csproj" PrivateAssets="all"/>
144-
<ProjectReference Include="$(LibrariesProjectRoot)System.Diagnostics.Tracing\src\System.Diagnostics.Tracing.csproj" PrivateAssets="all" />
145-
<ProjectReference Include="$(LibrariesProjectRoot)System.Memory\src\System.Memory.csproj" PrivateAssets="all" />
146-
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" PrivateAssets="all" />
147-
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.InteropServices\src\System.Runtime.InteropServices.csproj" PrivateAssets="all" />
148-
<ProjectReference Include="$(LibrariesProjectRoot)System.Threading\src\System.Threading.csproj" PrivateAssets="all" />
149-
<ProjectReference Include="$(LibrariesProjectRoot)System.Threading.Thread\src\System.Threading.Thread.csproj" PrivateAssets="all" />
142+
<ProjectReference Include="$(LibrariesProjectRoot)System.Collections\src\System.Collections.csproj" />
143+
<ProjectReference Include="$(LibrariesProjectRoot)System.Collections.Concurrent\src\System.Collections.Concurrent.csproj" />
144+
<ProjectReference Include="$(LibrariesProjectRoot)System.Diagnostics.Tracing\src\System.Diagnostics.Tracing.csproj" />
145+
<ProjectReference Include="$(LibrariesProjectRoot)System.Memory\src\System.Memory.csproj" />
146+
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" />
147+
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.InteropServices\src\System.Runtime.InteropServices.csproj" />
148+
<ProjectReference Include="$(LibrariesProjectRoot)System.Threading\src\System.Threading.csproj" />
149+
<ProjectReference Include="$(LibrariesProjectRoot)System.Threading.Thread\src\System.Threading.Thread.csproj" />
150150
</ItemGroup>
151151

152152
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">

src/libraries/System.Formats.Asn1/src/System.Formats.Asn1.csproj

+6-6
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@
5555
</ItemGroup>
5656

5757
<ItemGroup Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'">
58-
<ProjectReference Include="$(LibrariesProjectRoot)System.Collections\src\System.Collections.csproj" PrivateAssets="all" />
59-
<ProjectReference Include="$(LibrariesProjectRoot)System.Memory\src\System.Memory.csproj" PrivateAssets="all" />
60-
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.InteropServices\src\System.Runtime.InteropServices.csproj" PrivateAssets="all" />
61-
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.Numerics\src\System.Runtime.Numerics.csproj" PrivateAssets="all" />
62-
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" PrivateAssets="all" />
63-
<ProjectReference Include="$(LibrariesProjectRoot)System.Text.Encoding.Extensions\src\System.Text.Encoding.Extensions.csproj" PrivateAssets="all" />
58+
<ProjectReference Include="$(LibrariesProjectRoot)System.Collections\src\System.Collections.csproj" />
59+
<ProjectReference Include="$(LibrariesProjectRoot)System.Memory\src\System.Memory.csproj" />
60+
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.InteropServices\src\System.Runtime.InteropServices.csproj" />
61+
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.Numerics\src\System.Runtime.Numerics.csproj" />
62+
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" />
63+
<ProjectReference Include="$(LibrariesProjectRoot)System.Text.Encoding.Extensions\src\System.Text.Encoding.Extensions.csproj" />
6464
</ItemGroup>
6565

6666
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">

src/libraries/System.IO.Pipelines/src/System.IO.Pipelines.csproj

+5-5
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ System.IO.Pipelines.PipeReader</PackageDescription>
6666
</ItemGroup>
6767

6868
<ItemGroup Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'">
69-
<ProjectReference Include="$(LibrariesProjectRoot)System.Collections\src\System.Collections.csproj" PrivateAssets="all" />
70-
<ProjectReference Include="$(LibrariesProjectRoot)System.Memory\src\System.Memory.csproj" PrivateAssets="all" />
71-
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" PrivateAssets="all" />
72-
<ProjectReference Include="$(LibrariesProjectRoot)System.Threading\src\System.Threading.csproj" PrivateAssets="all" />
73-
<ProjectReference Include="$(LibrariesProjectRoot)System.Threading.ThreadPool\src\System.Threading.ThreadPool.csproj" PrivateAssets="all" />
69+
<ProjectReference Include="$(LibrariesProjectRoot)System.Collections\src\System.Collections.csproj" />
70+
<ProjectReference Include="$(LibrariesProjectRoot)System.Memory\src\System.Memory.csproj" />
71+
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" />
72+
<ProjectReference Include="$(LibrariesProjectRoot)System.Threading\src\System.Threading.csproj" />
73+
<ProjectReference Include="$(LibrariesProjectRoot)System.Threading.ThreadPool\src\System.Threading.ThreadPool.csproj" />
7474
</ItemGroup>
7575

7676
</Project>

src/libraries/System.Net.Http.Json/src/System.Net.Http.Json.csproj

+7-7
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,17 @@ System.Net.Http.Json.JsonContent</PackageDescription>
4848
<Compile Include="System\Net\Http\Json\TranscodingWriteStream.cs" />
4949
</ItemGroup>
5050

51-
<ItemGroup Condition="'$(TargetFramework)' != '$(NetCoreAppCurrent)'">
51+
<!-- Application tfms (.NETCoreApp, .NETFramework) need to use the same or higher version of .NETStandard's dependencies. -->
52+
<ItemGroup>
5253
<ProjectReference Include="$(LibrariesProjectRoot)System.Text.Json\src\System.Text.Json.csproj" />
5354
</ItemGroup>
5455

5556
<ItemGroup Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'">
56-
<ProjectReference Include="$(LibrariesProjectRoot)System.IO.Pipelines\src\System.IO.Pipelines.csproj" PrivateAssets="all" />
57-
<ProjectReference Include="$(LibrariesProjectRoot)System.Memory\src\System.Memory.csproj" PrivateAssets="all" />
58-
<ProjectReference Include="$(LibrariesProjectRoot)System.Net.Http\src\System.Net.Http.csproj" PrivateAssets="all" />
59-
<ProjectReference Include="$(LibrariesProjectRoot)System.Net.Primitives\src\System.Net.Primitives.csproj" PrivateAssets="all" />
60-
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" PrivateAssets="all" />
61-
<ProjectReference Include="$(LibrariesProjectRoot)System.Text.Json\src\System.Text.Json.csproj" PrivateAssets="all" />
57+
<ProjectReference Include="$(LibrariesProjectRoot)System.IO.Pipelines\src\System.IO.Pipelines.csproj" />
58+
<ProjectReference Include="$(LibrariesProjectRoot)System.Memory\src\System.Memory.csproj" />
59+
<ProjectReference Include="$(LibrariesProjectRoot)System.Net.Http\src\System.Net.Http.csproj" />
60+
<ProjectReference Include="$(LibrariesProjectRoot)System.Net.Primitives\src\System.Net.Primitives.csproj" />
61+
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" />
6262
</ItemGroup>
6363

6464
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">

src/libraries/System.Reflection.Metadata/src/System.Reflection.Metadata.csproj

+10-10
Original file line numberDiff line numberDiff line change
@@ -264,20 +264,20 @@ The System.Reflection.Metadata library is built-in as part of the shared framewo
264264
<Compile Include="$(CommonPath)System\Text\ValueStringBuilder.AppendSpanFormattable.cs" Link="System\Text\ValueStringBuilder.AppendSpanFormattable.cs" Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" />
265265
</ItemGroup>
266266

267-
<ItemGroup Condition="'$(TargetFramework)' != '$(NetCoreAppCurrent)'">
267+
<!-- Application tfms (.NETCoreApp, .NETFramework) need to use the same or higher version of .NETStandard's dependencies. -->
268+
<ItemGroup>
268269
<ProjectReference Include="$(LibrariesProjectRoot)System.Collections.Immutable\src\System.Collections.Immutable.csproj" />
269270
</ItemGroup>
270271

271272
<ItemGroup Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'">
272-
<ProjectReference Include="$(LibrariesProjectRoot)System.Collections\src\System.Collections.csproj" PrivateAssets="all" />
273-
<ProjectReference Include="$(LibrariesProjectRoot)System.Collections.Immutable\src\System.Collections.Immutable.csproj" PrivateAssets="all" />
274-
<ProjectReference Include="$(LibrariesProjectRoot)System.IO.Compression\src\System.IO.Compression.csproj" PrivateAssets="all" />
275-
<ProjectReference Include="$(LibrariesProjectRoot)System.IO.MemoryMappedFiles\src\System.IO.MemoryMappedFiles.csproj" PrivateAssets="all" />
276-
<ProjectReference Include="$(LibrariesProjectRoot)System.Memory\src\System.Memory.csproj" PrivateAssets="all" />
277-
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.InteropServices\src\System.Runtime.InteropServices.csproj" PrivateAssets="all" />
278-
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" PrivateAssets="all" />
279-
<ProjectReference Include="$(LibrariesProjectRoot)System.Text.Encoding.Extensions\src\System.Text.Encoding.Extensions.csproj" PrivateAssets="all" />
280-
<ProjectReference Include="$(LibrariesProjectRoot)System.Threading\src\System.Threading.csproj" PrivateAssets="all" />
273+
<ProjectReference Include="$(LibrariesProjectRoot)System.Collections\src\System.Collections.csproj" />
274+
<ProjectReference Include="$(LibrariesProjectRoot)System.IO.Compression\src\System.IO.Compression.csproj" />
275+
<ProjectReference Include="$(LibrariesProjectRoot)System.IO.MemoryMappedFiles\src\System.IO.MemoryMappedFiles.csproj" />
276+
<ProjectReference Include="$(LibrariesProjectRoot)System.Memory\src\System.Memory.csproj" />
277+
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.InteropServices\src\System.Runtime.InteropServices.csproj" />
278+
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" />
279+
<ProjectReference Include="$(LibrariesProjectRoot)System.Text.Encoding.Extensions\src\System.Text.Encoding.Extensions.csproj" />
280+
<ProjectReference Include="$(LibrariesProjectRoot)System.Threading\src\System.Threading.csproj" />
281281
</ItemGroup>
282282

283283
</Project>

src/libraries/System.Runtime.Serialization.Xml/src/System.Runtime.Serialization.Xml.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.DataContractSerialization\src\System.Private.DataContractSerialization.csproj" PrivateAssets="all"/>
10+
<ProjectReference Include="$(LibrariesProjectRoot)System.Private.DataContractSerialization\src\System.Private.DataContractSerialization.csproj" PrivateAssets="all" />
1111
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" />
1212
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.Serialization.Primitives\src\System.Runtime.Serialization.Primitives.csproj" />
1313
</ItemGroup>

src/libraries/System.Text.Encoding.CodePages/src/System.Text.Encoding.CodePages.csproj

+5-5
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ System.Text.CodePagesEncodingProvider</PackageDescription>
8181
</ItemGroup>
8282

8383
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '$(NetCoreAppCurrent)'))">
84-
<ProjectReference Include="$(LibrariesProjectRoot)System.Collections\src\System.Collections.csproj" PrivateAssets="all" />
85-
<ProjectReference Include="$(LibrariesProjectRoot)System.Memory\src\System.Memory.csproj" PrivateAssets="all" />
86-
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" PrivateAssets="all" />
87-
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.InteropServices\src\System.Runtime.InteropServices.csproj" PrivateAssets="all" />
88-
<ProjectReference Include="$(LibrariesProjectRoot)System.Threading\src\System.Threading.csproj" PrivateAssets="all" />
84+
<ProjectReference Include="$(LibrariesProjectRoot)System.Collections\src\System.Collections.csproj" />
85+
<ProjectReference Include="$(LibrariesProjectRoot)System.Memory\src\System.Memory.csproj" />
86+
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" />
87+
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.InteropServices\src\System.Runtime.InteropServices.csproj" />
88+
<ProjectReference Include="$(LibrariesProjectRoot)System.Threading\src\System.Threading.csproj" />
8989
</ItemGroup>
9090

9191
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">

src/libraries/System.Text.Encodings.Web/src/System.Text.Encodings.Web.csproj

+5-5
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ System.Text.Encodings.Web.JavaScriptEncoder</PackageDescription>
6565
</ItemGroup>
6666

6767
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '$(NetCoreAppCurrent)'))">
68-
<ProjectReference Include="$(LibrariesProjectRoot)System.Memory\src\System.Memory.csproj" PrivateAssets="all" />
69-
<ProjectReference Include="$(LibrariesProjectRoot)System.Numerics.Vectors\src\System.Numerics.Vectors.csproj" PrivateAssets="all" />
70-
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.Intrinsics\src\System.Runtime.Intrinsics.csproj" PrivateAssets="all" />
71-
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" PrivateAssets="all" />
72-
<ProjectReference Include="$(LibrariesProjectRoot)System.Threading\src\System.Threading.csproj" PrivateAssets="all" />
68+
<ProjectReference Include="$(LibrariesProjectRoot)System.Memory\src\System.Memory.csproj" />
69+
<ProjectReference Include="$(LibrariesProjectRoot)System.Numerics.Vectors\src\System.Numerics.Vectors.csproj" />
70+
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.Intrinsics\src\System.Runtime.Intrinsics.csproj" />
71+
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" />
72+
<ProjectReference Include="$(LibrariesProjectRoot)System.Threading\src\System.Threading.csproj" />
7373
</ItemGroup>
7474

7575
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">

0 commit comments

Comments
 (0)