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

Move Windows Compat pack to NuGet pack task #56686

Merged
merged 5 commits into from
Aug 3, 2021
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
package infra globs for .cs files. -->
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<!-- The project doesn't compile anything therefore create the package during build. -->
<GeneratePackageOnBuild Condition="'$(BuildingAnOfficialBuildLeg)' != 'true'">true</GeneratePackageOnBuild>
<IsShipping>false</IsShipping>
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
<!-- This is a source package which includes all .cs files by default. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
<PackageId>$(MSBuildProjectName)</PackageId>
<AvoidRestoreCycleOnSelfReference>true</AvoidRestoreCycleOnSelfReference>
<AssemblyName>Microsoft.NETCore.Platforms.BuildTasks</AssemblyName>
<!-- The only output of this project is the package as the tasks aren't packaged. -->
<GeneratePackageOnBuild Condition="'$(BuildingAnOfficialBuildLeg)' != 'true'">true</GeneratePackageOnBuild>

<IsSourceProject>false</IsSourceProject>
<IsPackable>true</IsPackable>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<Project Sdk="Microsoft.Build.NoTargets">
<PropertyGroup>
<!-- Using a csproj extension to get the correct multi-targeting behavior. -->
<TargetFrameworks>$(NetCoreAppCurrent);netcoreapp3.1;netstandard2.1;netstandard2.0</TargetFrameworks>
<IsPackable>true</IsPackable>
<!-- Reference the outputs for the dependency nodes calculation. -->
<NoTargetsDoNotReferenceOutputAssemblies>false</NoTargetsDoNotReferenceOutputAssemblies>
<!-- This is a meta package and doesn't contain any libs. -->
<NoWarn>$(NoWarn);NU5128</NoWarn>
<PackageDescription>This Windows Compatibility Pack provides access to APIs that were previously available only for .NET Framework. It can be used from both .NET Core as well as .NET Standard.</PackageDescription>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Win32.Registry.AccessControl\src\Microsoft.Win32.Registry.AccessControl.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Win32.SystemEvents\src\Microsoft.Win32.SystemEvents.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.CodeDom\src\System.CodeDom.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.ComponentModel.Composition\src\System.ComponentModel.Composition.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Configuration.ConfigurationManager\src\System.Configuration.ConfigurationManager.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Data.Odbc\src\System.Data.Odbc.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Data.OleDb\src\System.Data.OleDb.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Diagnostics.EventLog\src\System.Diagnostics.EventLog.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Diagnostics.PerformanceCounter\src\System.Diagnostics.PerformanceCounter.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.DirectoryServices.AccountManagement\src\System.DirectoryServices.AccountManagement.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.DirectoryServices.Protocols\src\System.DirectoryServices.Protocols.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.DirectoryServices\src\System.DirectoryServices.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Drawing.Common\src\System.Drawing.Common.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.IO.Packaging\src\System.IO.Packaging.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.IO.Ports\src\System.IO.Ports.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Management\src\System.Management.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Reflection.Context\src\System.Reflection.Context.csproj" />
ViktorHofer marked this conversation as resolved.
Show resolved Hide resolved
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.Caching\src\System.Runtime.Caching.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Cryptography.Pkcs\src\System.Security.Cryptography.Pkcs.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Cryptography.ProtectedData\src\System.Security.Cryptography.ProtectedData.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Cryptography.Xml\src\System.Security.Cryptography.Xml.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Security.Permissions\src\System.Security.Permissions.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.ServiceModel.Syndication\src\System.ServiceModel.Syndication.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.ServiceProcess.ServiceController\src\System.ServiceProcess.ServiceController.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Speech\src\System.Speech.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Text.Encoding.CodePages\src\System.Text.Encoding.CodePages.csproj" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Threading.AccessControl\src\System.Threading.AccessControl.csproj" />
</ItemGroup>

<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'netstandard2.1'))">
<ProjectReference Include="$(LibrariesProjectRoot)System.ComponentModel.Composition.Registration\src\System.ComponentModel.Composition.Registration.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Data.SqlClient" Version="$(SystemDataSqlClientVersion)" />
<PackageReference Include="System.ServiceModel.Primitives;
System.ServiceModel.Duplex;
System.ServiceModel.Http;
System.ServiceModel.NetTcp;
System.ServiceModel.Security"
Version="$(ServiceModelVersion)" />
</ItemGroup>

<!-- Packages which are inbox in NET6 and shouldn't and can't be referenced anymore. -->
<ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">
<PackageReference Include="Microsoft.Win32.Registry" Version="$(MicrosoftWin32RegistryVersion)" />
<PackageReference Include="System.Data.DataSetExtensions" Version="$(SystemDataDataSetExtensionsVersion)" />
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="$(SystemIOFileSystemAccessControlVersion)" />
<PackageReference Include="System.IO.Pipes.AccessControl" Version="$(SystemIOPipesAccessControlVersion)" />
<PackageReference Include="System.Reflection.Emit" Version="$(SystemReflectionEmitVersion)" />
<PackageReference Include="System.Reflection.Emit.ILGeneration" Version="$(SystemReflectionEmitILGenerationVersion)" />
<PackageReference Include="System.Reflection.Emit.Lightweight" Version="$(SystemReflectionEmitLightweightVersion)" />
<PackageReference Include="System.Security.AccessControl" Version="$(SystemSecurityAccessControlVersion)" />
<PackageReference Include="System.Security.Cryptography.Cng" Version="$(SystemSecurityCryptographyCngVersion)" />
<PackageReference Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" />
</ItemGroup>
</Project>
8 changes: 4 additions & 4 deletions src/libraries/libraries-packages.proj
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

<ItemGroup>
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Packaging" Version="$(MicrosoftDotNetBuildTasksPackagingVersion)" />
</ItemGroup>

<ProjectReference Include="$(MSBuildThisFileDirectory)System.Runtime.Experimental\ref\System.Runtime.Experimental.csproj"
Condition="'$(BuildAllConfigurations)' == 'true'" />
<ItemGroup Condition="'$(BuildAllConfigurations)' == 'true'">
<ProjectReference Include="$(MSBuildThisFileDirectory)System.Runtime.Experimental\ref\System.Runtime.Experimental.csproj" />
<ProjectReference Include="$(PkgDir)*\*.proj" Exclude="$(PkgDir)test\*" />
<ProjectReference Include="$(MSBuildThisFileDirectory)*\src\*.*proj"
Condition="'$(BuildAllConfigurations)' == 'true'"
Exclude="$(MSBuildThisFileDirectory)*\src\**\*.shproj"/>
Exclude="$(MSBuildThisFileDirectory)*\src\**\*.shproj" />
</ItemGroup>

<!-- Need the PackageIndexFile file property from baseline.props -->
Expand Down

This file was deleted.

This file was deleted.

19 changes: 0 additions & 19 deletions src/libraries/pkg/baseline/packageIndex.json
Original file line number Diff line number Diff line change
Expand Up @@ -1439,25 +1439,6 @@
"6.0.0.0": "6.0.0"
}
},
"Microsoft.Windows.Compatibility": {
"StableVersions": [
"2.0.0",
"2.0.1",
"2.1.0",
"2.1.1",
"3.0.0",
"3.0.1",
"5.0.0"
],
"InboxOn": {}
},
"Microsoft.Windows.Compatibility.Shims": {
"StableVersions": [
"2.0.0",
"2.0.1"
],
"InboxOn": {}
},
"Microsoft.XmlSerializer.Generator": {
"StableVersions": [
"1.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project DefaultTargets="Build">
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />

<ItemGroup Condition="'$(BuildAllConfigurations)' == 'true'">
<ItemGroup>
<!-- identity project built in AllConfigurations leg, runtime specific projects are included through netcoreapp.rids.props -->
<Project Include="$(MSBuildProjectName).pkgproj" />
</ItemGroup>
Expand Down
6 changes: 6 additions & 0 deletions src/libraries/src.proj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
<ItemGroup>
<_allSrc Include="$(MSBuildThisFileDirectory)*\src\*.csproj"
Exclude="@(ProjectExclusions)" />
<!-- Don't build ProjectReferences of the compat pack in a traversal build to avoid unnecessary incremental builds. -->
<_allSrc Update="$(MSBuildThisFileDirectory)Microsoft.Windows.Compatibility\src\Microsoft.Windows.Compatibility.csproj"
AdditionalProperties="BuildProjectReferences=false" />
<!-- Only build the compat pack in the allconfigurations leg. -->
<_allSrc Remove="$(MSBuildThisFileDirectory)Microsoft.Windows.Compatibility\src\Microsoft.Windows.Compatibility.csproj"
Condition="'$(BuildAllConfigurations)' != 'true'" />
<NonNetCoreAppProject Include="@(_allSrc)"
Exclude="@(NetCoreAppLibrary->'%(Identity)\src\%(Identity).csproj')" />
<NetCoreAppProject Include="$(CoreLibProject);
Expand Down