Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

port some System.IO.Packaging, System.CodeDom, System.Collections.Immutable and System.Configuration.ConfigurationManager #55216

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions eng/packaging.targets
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<ItemGroup>
<TfmSpecificPackageFile Include="@(SatelliteDllsProjectOutputGroupOutput);
@(BuiltProjectOutputGroupOutput)">
<PackagePath>runtimes/$(_runtimeOS)/lib/$(TargetFrameworkWithoutSuffix)</PackagePath>
<PackagePath>runtimes/$(PackageTargetRuntime)/lib/$(TargetFrameworkWithoutSuffix)</PackagePath>
</TfmSpecificPackageFile>
</ItemGroup>
</Target>
Expand All @@ -74,9 +74,18 @@

<ItemGroup Condition="Exists('$(RuntimeSymbolPath)')">
<TfmSpecificDebugSymbolsFile Include="$(RuntimeSymbolPath)">
<TargetPath>/runtimes/$(_runtimeOS)/lib/$(TargetFrameworkWithoutSuffix)/$(TargetName).pdb</TargetPath>
<TargetPath>/runtimes/$(PackageTargetRuntime)/lib/$(TargetFrameworkWithoutSuffix)/$(TargetName).pdb</TargetPath>
<TargetFramework>$(TargetFrameworkWithoutSuffix)</TargetFramework>
</TfmSpecificDebugSymbolsFile>
</ItemGroup>
</Target>

<!-- Ensure that the IsPackable attribute in NetCoreAppLibrary.props is in sync with IsPackable properties in projects. -->
<Target Name="EnsureNetCoreAppLibraryIsPackableInSync"
BeforeTargets="Pack">
<Error Text="Please add $(AssemblyName) to the NetCoreAppLibrary IsPackable item update in NetCoreAppLibrary.props."
Condition="!@(NetCoreAppLibrary->WithMetadataValue('Identity', '$(AssemblyName)')->AnyHaveMetadataValue('IsPackable', 'true')) and '$(IsNETCoreAppSrc)' == 'true' and '$(IsPackable)' == 'true'" />
<Error Text="Please remove $(AssemblyName) from the NetCoreAppLibrary IsPackable item update in NetCoreAppLibrary.props."
Condition="@(NetCoreAppLibrary->WithMetadataValue('Identity', '$(AssemblyName)')->AnyHaveMetadataValue('IsPackable', 'true')) and '$(IsSourceProject)' == 'true' and ('$(IsNETCoreAppSrc)' != 'true' or '$(IsPackable)' != 'true')" />
</Target>
</Project>
31 changes: 18 additions & 13 deletions eng/references.targets
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,23 @@
</ItemGroup>
</Target>

<!-- Make shared framework assemblies not app-local (non private). -->
<Target Name="UpdateProjectReferencesWithPrivateAttribute"
AfterTargets="AssignProjectConfiguration"
BeforeTargets="PrepareProjectReferences"
Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and
('$(IsTestProject)' == 'true' or '$(IsTestSupportProject)' == 'true') and
'@(ProjectReferenceWithConfiguration)' != ''">
<ItemGroup>
<ProjectReferenceWithConfiguration PrivateAssets="all"
Private="false"
Condition="$(NetCoreAppLibrary.Contains('%(Filename);'))" />
</ItemGroup>
</Target>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and
('$(IsSourceProject)' == 'true' or '$(IsTestProject)' == 'true' or '$(IsTestSupportProject)' == 'true')">
<_projectReferenceWithOriginal Include="@(ProjectReference)"
Original="%(Identity)" />
<_projectReferenceByFileName Include="@(_projectReferenceWithOriginal->'%(FileName)')" />
</ItemGroup>

<!-- Make NetCoreAppLibrary P2Ps which aren't packable not app-local (non private). -->
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and
('$(IsSourceProject)' == 'true' or '$(IsTestProject)' == 'true' or '$(IsTestSupportProject)' == 'true')">
<_projectReferencePackable Include="@(_projectReferenceByFileName)"
Exclude="@(NetCoreAppLibrary->WithMetadataValue('IsPackable', ''))" />
<_projectReferenceNonPackable Include="@(_projectReferenceByFileName)"
Exclude="@(_projectReferencePackable)" />
<ProjectReference Update="@(_projectReferenceNonPackable->'%(Original)')"
PrivateAssets="all"
Private="false" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Extensions.Logging.Abstractions\src\Microsoft.Extensions.Logging.Abstractions.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Extensions.Logging.Configuration\src\Microsoft.Extensions.Logging.Configuration.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Extensions.Options\src\Microsoft.Extensions.Options.csproj" />
<!-- Application tfms (.NETCoreApp, .NETFramework) need to use the same or higher version of .NETStandard's dependencies. -->
<ProjectReference Include="$(LibrariesProjectRoot)System.Text.Json\src\System.Text.Json.csproj" />
</ItemGroup>

Expand All @@ -60,4 +61,4 @@
<NETStandardCompatError Include="netcoreapp2.0" Supported="$(NetCoreAppMinimum)" />
</ItemGroup>

</Project>
</Project>
15 changes: 14 additions & 1 deletion src/libraries/NetCoreAppLibrary.props
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,18 @@
<!-- Make NetCoreAppLibrary available as an item. -->
<ItemGroup>
<NetCoreAppLibrary Include="$(NetCoreAppLibrary)" />
<NetCoreAppLibrary Update="
ViktorHofer marked this conversation as resolved.
Show resolved Hide resolved
System.Collections.Immutable;
System.Diagnostics.DiagnosticSource;
System.Formats.Asn1;
System.Net.Http.Json;
System.Reflection.Metadata;
System.Runtime.CompilerServices.Unsafe;
System.Text.Encoding.CodePages;
System.Text.Encodings.Web;
System.Text.Json;
System.Threading.Channels;
System.Threading.Tasks.Dataflow"
IsPackable="true" />
</ItemGroup>
</Project>
</Project>
7 changes: 0 additions & 7 deletions src/libraries/System.CodeDom/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<StrongNameKeyId>Open</StrongNameKeyId>
<PackageDescription>Provides types that can be used to model the structure of a source code document and to output source code for that model in a supported language.

Commonly Used Types:
System.CodeDom.CodeObject
System.CodeDom.Compiler.CodeDomProvider
Microsoft.CSharp.CSharpCodeProvider
Microsoft.VisualBasic.VBCodeProvider</PackageDescription>
<IncludePlatformAttributes>true</IncludePlatformAttributes>
<UnsupportedOSPlatforms>browser;ios;tvos;maccatalyst</UnsupportedOSPlatforms>
</PropertyGroup>
Expand Down
10 changes: 0 additions & 10 deletions src/libraries/System.CodeDom/pkg/System.CodeDom.pkgproj

This file was deleted.

Loading