Skip to content

Commit 9713954

Browse files
committed
Use P2Ps in libs
1 parent a842025 commit 9713954

File tree

107 files changed

+900
-867
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+900
-867
lines changed

eng/Versions.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119
<SystemDrawingCommonVersion>8.0.0</SystemDrawingCommonVersion>
120120
<SystemIOFileSystemAccessControlVersion>5.0.0</SystemIOFileSystemAccessControlVersion>
121121
<SystemMemoryVersion>4.5.5</SystemMemoryVersion>
122+
<SystemNumericsVectorsVersion>4.5.0</SystemNumericsVectorsVersion>
122123
<SystemReflectionMetadataVersion>9.0.0-rc.1.24410.5</SystemReflectionMetadataVersion>
123124
<SystemReflectionMetadataLoadContextVersion>9.0.0-rc.1.24410.5</SystemReflectionMetadataLoadContextVersion>
124125
<SystemSecurityAccessControlVersion>6.0.0</SystemSecurityAccessControlVersion>

eng/generators.targets

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
'$(DisableImplicitFrameworkReferences)' == 'true' and
2828
(
2929
'@(Reference->AnyHaveMetadataValue('Identity', 'System.Runtime.InteropServices'))' == 'true' or
30+
'@(ProjectReference->AnyHaveMetadataValue('Filename', 'System.Runtime.InteropServices'))' == 'true' or
3031
'@(ProjectReference->AnyHaveMetadataValue('Identity', '$(CoreLibProject)'))' == 'true'
3132
)
3233
)
@@ -39,7 +40,10 @@
3940
'$(MSBuildProjectExtension)' == '.csproj' and
4041
(
4142
'$(DisableImplicitFrameworkReferences)' == 'true' and
42-
'@(Reference->AnyHaveMetadataValue('Identity', 'System.Runtime.InteropServices'))' == 'true'
43+
(
44+
'@(Reference->AnyHaveMetadataValue('Identity', 'System.Runtime.InteropServices'))' == 'true' or
45+
'@(ProjectReference->AnyHaveMetadataValue('Filename', 'System.Runtime.InteropServices'))' == 'true'
46+
)
4347
)" />
4448
</ItemGroup>
4549

eng/resolveContract.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119
<PropertyGroup>
120120
<!-- Let GenFacades use roslyn from the toolset package as it loads sources which might require newer language features. -->
121121
<GenFacadesUseRoslynToolsetPackagePath>true</GenFacadesUseRoslynToolsetPackagePath>
122+
<GenFacadesReferencePathItemName>ReferencePathWithRefAssemblies</GenFacadesReferencePathItemName>
122123
</PropertyGroup>
123124

124125
<!-- ##### GenAPI settings ##### -->

eng/targetingpacks.targets

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -89,26 +89,6 @@
8989
Condition="'$(UseLocalAppHostPack)' == 'true' and '@(KnownAppHostPack->AnyHaveMetadataValue('TargetFramework', '$(NetCoreAppCurrent)'))' != 'true'" />
9090
</ItemGroup>
9191

92-
<!-- Simple name references will be resolved from the targeting pack folders and should never be copied to the output. -->
93-
<ItemGroup>
94-
<Reference Update="@(Reference)">
95-
<Private Condition="'%(Reference.Extension)' != '.dll'">false</Private>
96-
</Reference>
97-
</ItemGroup>
98-
99-
<!-- Add the resolved targeting pack to the assembly search path. -->
100-
<Target Name="UseTargetingPackForAssemblySearchPaths"
101-
BeforeTargets="ResolveAssemblyReferences;
102-
DesignTimeResolveAssemblyReferences"
103-
Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and
104-
'$(TargetFrameworkVersion)' == 'v$(NetCoreAppCurrentVersion)' and
105-
'$(DisableImplicitFrameworkReferences)' == 'true'">
106-
<PropertyGroup>
107-
<AssemblySearchPaths>$(AssemblySearchPaths);$(MicrosoftNetCoreAppRefPackRefDir.TrimEnd('/\'))</AssemblySearchPaths>
108-
<DesignTimeAssemblySearchPaths>$(DesignTimeAssemblySearchPaths);$(MicrosoftNetCoreAppRefPackRefDir.TrimEnd('/\'))</DesignTimeAssemblySearchPaths>
109-
</PropertyGroup>
110-
</Target>
111-
11292
<!--
11393
SDK tries to download the ILCompiler runtime packs.
11494
TODO: Remove this target when a 9.0.100 SDK is consumed that respects EnableRuntimePackDownload for the ILCompiler.

src/libraries/Directory.Build.targets

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,4 +228,11 @@
228228
</ItemGroup>
229229
</When>
230230
</Choose>
231+
232+
<!-- Required to work around https://github.com/NuGet/Home/issues/10368. -->
233+
<ItemGroup Condition="('$(IsTestProject)' == 'true' or '$(IsTestSupportProject)' == 'true') and '$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
234+
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" PrivateAssets="all" Condition="'@(PackageReference->AnyHaveMetadataValue('Identity', 'System.Memory'))' != 'true'" />
235+
<PackageReference Include="System.Numerics.Vectors" Version="$(SystemNumericsVectorsVersion)" PrivateAssets="all" Condition="'@(PackageReference->AnyHaveMetadataValue('Identity', 'System.Numerics.Vectors'))' != 'true'" />
236+
</ItemGroup>
237+
231238
</Project>

src/libraries/Microsoft.CSharp/src/Microsoft.CSharp.csproj

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -238,23 +238,25 @@
238238
<Compile Include="Microsoft\CSharp\RuntimeBinder\ComInterop\VariantArgBuilder.cs" />
239239
<Compile Include="Microsoft\CSharp\RuntimeBinder\ComInterop\VariantArray.cs" />
240240
<Compile Include="Microsoft\CSharp\RuntimeBinder\ComInterop\VariantBuilder.cs" />
241-
242-
<Reference Include="System.Reflection.Emit" />
243-
<Reference Include="System.Reflection.Emit.ILGeneration" />
244-
<Reference Include="System.Reflection.Emit.Lightweight" />
245-
<Reference Include="System.Reflection.Primitives" />
246241
</ItemGroup>
247242

248243
<ItemGroup>
249-
<Reference Include="System.Collections" />
250-
<Reference Include="System.Collections.Concurrent" />
251-
<Reference Include="System.Linq" />
252-
<Reference Include="System.Linq.Expressions" />
253-
<Reference Include="System.Memory" />
254-
<Reference Include="System.ObjectModel" />
255-
<Reference Include="System.Runtime" />
256-
<Reference Include="System.Runtime.InteropServices" />
257-
<Reference Include="System.Threading" />
244+
<ProjectReference Include="$(LibrariesProjectRoot)System.Collections\src\System.Collections.csproj" />
245+
<ProjectReference Include="$(LibrariesProjectRoot)System.Collections.Concurrent\src\System.Collections.Concurrent.csproj" />
246+
<ProjectReference Include="$(LibrariesProjectRoot)System.Linq\src\System.Linq.csproj" />
247+
<ProjectReference Include="$(LibrariesProjectRoot)System.Linq.Expressions\src\System.Linq.Expressions.csproj" />
248+
<ProjectReference Include="$(LibrariesProjectRoot)System.Memory\src\System.Memory.csproj" />
249+
<ProjectReference Include="$(LibrariesProjectRoot)System.ObjectModel\src\System.ObjectModel.csproj" />
250+
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime\src\System.Runtime.csproj" />
251+
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.InteropServices\src\System.Runtime.InteropServices.csproj" />
252+
<ProjectReference Include="$(LibrariesProjectRoot)System.Threading\src\System.Threading.csproj" />
253+
</ItemGroup>
254+
255+
<ItemGroup Condition="'$(EnableComBinder)'=='true'">
256+
<ProjectReference Include="$(LibrariesProjectRoot)System.Reflection.Emit\src\System.Reflection.Emit.csproj" />
257+
<ProjectReference Include="$(LibrariesProjectRoot)System.Reflection.Emit.ILGeneration\src\System.Reflection.Emit.ILGeneration.csproj" />
258+
<ProjectReference Include="$(LibrariesProjectRoot)System.Reflection.Emit.Lightweight\src\System.Reflection.Emit.Lightweight.csproj" />
259+
<ProjectReference Include="$(LibrariesProjectRoot)System.Reflection.Primitives\src\System.Reflection.Primitives.csproj" />
258260
</ItemGroup>
259261

260262
</Project>

src/libraries/Microsoft.Extensions.Configuration.Json/src/Microsoft.Extensions.Configuration.Json.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,9 @@
2121
<ProjectReference Include="$(LibrariesProjectRoot)System.Text.Json\src\System.Text.Json.csproj" />
2222
</ItemGroup>
2323

24+
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
25+
<!-- Required to workaround https://github.com/NuGet/Home/issues/10368. -->
26+
<PackageReference Include="System.Numerics.Vectors" Version="$(SystemNumericsVectorsVersion)" PrivateAssets="all" />
27+
</ItemGroup>
28+
2429
</Project>

src/libraries/Microsoft.Extensions.Configuration.UserSecrets/src/Microsoft.Extensions.Configuration.UserSecrets.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
Link="Common\System\ThrowHelper.cs" />
1717
</ItemGroup>
1818

19+
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
20+
<!-- Required to workaround https://github.com/NuGet/Home/issues/10368. -->
21+
<PackageReference Include="System.Numerics.Vectors" Version="$(SystemNumericsVectorsVersion)" PrivateAssets="all" />
22+
</ItemGroup>
23+
1924
<ItemGroup>
2025
<Content Include="buildTransitive\$(MSBuildProjectName).*"
2126
PackagePath="buildTransitive\netstandard2.0\;

src/libraries/Microsoft.Extensions.DependencyModel/src/Microsoft.Extensions.DependencyModel.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ By default, the dependency manifest contains information about the application's
3838
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
3939
<PackageReference Include="System.Buffers" Version="$(SystemBuffersVersion)" />
4040
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
41+
<!-- Required to workaround https://github.com/NuGet/Home/issues/10368. -->
42+
<PackageReference Include="System.Numerics.Vectors" Version="$(SystemNumericsVectorsVersion)" PrivateAssets="all" />
4143
</ItemGroup>
4244

4345
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">

src/libraries/Microsoft.Extensions.Hosting.WindowsServices/src/Microsoft.Extensions.Hosting.WindowsServices.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@
3131
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Extensions.Logging.EventLog\src\Microsoft.Extensions.Logging.EventLog.csproj" />
3232
</ItemGroup>
3333

34+
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
35+
<!-- Required to workaround https://github.com/NuGet/Home/issues/10368. -->
36+
<PackageReference Include="System.Numerics.Vectors" Version="$(SystemNumericsVectorsVersion)" PrivateAssets="all" />
37+
</ItemGroup>
38+
3439
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'">
3540
<ProjectReference Include="$(LibrariesProjectRoot)System.ServiceProcess.ServiceController\src\System.ServiceProcess.ServiceController.csproj" />
3641
</ItemGroup>

0 commit comments

Comments
 (0)