From 8583bf760b9c2a08e014d9473b4c59db8da6ffcd Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Sun, 1 Aug 2021 08:48:25 +0200 Subject: [PATCH 1/5] Move Windows Compat pack to NuGet pack task This is a straight port from pkgproj to csproj and also enables building the compat pack together with its dependencies. As usual, if the compat pack alone should be built (i.e. for inner loop tests), the `--no-dependencies` flag should be used, i.e. `dotnet build --no-dependencies`. --- .../Microsoft.Windows.Compatibility.csproj | 70 +++++++++++++ .../Microsoft.Windows.Compatibility.pkgproj | 98 ------------------- .../Microsoft.Windows.Compatibility.proj | 10 -- src/libraries/pkg/baseline/packageIndex.json | 19 ---- 4 files changed, 70 insertions(+), 127 deletions(-) create mode 100644 src/libraries/Microsoft.Windows.Compatibility/src/Microsoft.Windows.Compatibility.csproj delete mode 100644 src/libraries/pkg/Microsoft.Windows.Compatibility/Microsoft.Windows.Compatibility.pkgproj delete mode 100644 src/libraries/pkg/Microsoft.Windows.Compatibility/Microsoft.Windows.Compatibility.proj diff --git a/src/libraries/Microsoft.Windows.Compatibility/src/Microsoft.Windows.Compatibility.csproj b/src/libraries/Microsoft.Windows.Compatibility/src/Microsoft.Windows.Compatibility.csproj new file mode 100644 index 00000000000000..2d1226ec0433e4 --- /dev/null +++ b/src/libraries/Microsoft.Windows.Compatibility/src/Microsoft.Windows.Compatibility.csproj @@ -0,0 +1,70 @@ + + + + $(NetCoreAppCurrent);netcoreapp3.1;netstandard2.1;netstandard2.0 + + true + true + + false + + $(NoWarn);NU5128 + 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. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/libraries/pkg/Microsoft.Windows.Compatibility/Microsoft.Windows.Compatibility.pkgproj b/src/libraries/pkg/Microsoft.Windows.Compatibility/Microsoft.Windows.Compatibility.pkgproj deleted file mode 100644 index c1a3f16e19ec1c..00000000000000 --- a/src/libraries/pkg/Microsoft.Windows.Compatibility/Microsoft.Windows.Compatibility.pkgproj +++ /dev/null @@ -1,98 +0,0 @@ - - - - - false - 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. - - - - $(PackageVersion) - - - $(PackageVersion) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/libraries/pkg/Microsoft.Windows.Compatibility/Microsoft.Windows.Compatibility.proj b/src/libraries/pkg/Microsoft.Windows.Compatibility/Microsoft.Windows.Compatibility.proj deleted file mode 100644 index 17a7f16890297a..00000000000000 --- a/src/libraries/pkg/Microsoft.Windows.Compatibility/Microsoft.Windows.Compatibility.proj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/libraries/pkg/baseline/packageIndex.json b/src/libraries/pkg/baseline/packageIndex.json index 6c24d93bbb4860..09f1be0796e397 100644 --- a/src/libraries/pkg/baseline/packageIndex.json +++ b/src/libraries/pkg/baseline/packageIndex.json @@ -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", From 14e1c9d81ece6b7a60aa29a05968051810f3b2d0 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Mon, 2 Aug 2021 21:15:44 +0200 Subject: [PATCH 2/5] Don't build any of the project references --- .../src/Microsoft.Windows.Compatibility.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/Microsoft.Windows.Compatibility/src/Microsoft.Windows.Compatibility.csproj b/src/libraries/Microsoft.Windows.Compatibility/src/Microsoft.Windows.Compatibility.csproj index 2d1226ec0433e4..c36d174246d163 100644 --- a/src/libraries/Microsoft.Windows.Compatibility/src/Microsoft.Windows.Compatibility.csproj +++ b/src/libraries/Microsoft.Windows.Compatibility/src/Microsoft.Windows.Compatibility.csproj @@ -2,13 +2,13 @@ $(NetCoreAppCurrent);netcoreapp3.1;netstandard2.1;netstandard2.0 - - true true false $(NoWarn);NU5128 + + true 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. From b151617bb1ba39dd771c7be690fe9ee751c9f534 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Mon, 2 Aug 2021 21:32:45 +0200 Subject: [PATCH 3/5] Don't build project references for real --- .../src/Microsoft.Windows.Compatibility.csproj | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/libraries/Microsoft.Windows.Compatibility/src/Microsoft.Windows.Compatibility.csproj b/src/libraries/Microsoft.Windows.Compatibility/src/Microsoft.Windows.Compatibility.csproj index c36d174246d163..b5366b1f1d6e18 100644 --- a/src/libraries/Microsoft.Windows.Compatibility/src/Microsoft.Windows.Compatibility.csproj +++ b/src/libraries/Microsoft.Windows.Compatibility/src/Microsoft.Windows.Compatibility.csproj @@ -7,11 +7,16 @@ false $(NoWarn);NU5128 - - true 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. + + + + false + + + From e1f3ed9ceecb6d06fd25bb27e4ec4ac3088ba36e Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 3 Aug 2021 08:31:41 +0200 Subject: [PATCH 4/5] Fix traversal builds and don't overbuild packages --- ...ft.Extensions.HostFactoryResolver.Sources.csproj | 2 -- .../src/Microsoft.NETCore.Platforms.csproj | 2 -- .../src/Microsoft.Windows.Compatibility.csproj | 13 ++++--------- src/libraries/libraries-packages.proj | 11 +++++++---- .../runtime.native.System.IO.Ports.proj | 2 +- src/libraries/src.proj | 6 ++++++ 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/libraries/Microsoft.Extensions.HostFactoryResolver/src/Microsoft.Extensions.HostFactoryResolver.Sources.csproj b/src/libraries/Microsoft.Extensions.HostFactoryResolver/src/Microsoft.Extensions.HostFactoryResolver.Sources.csproj index dff90383f96cbf..31cd86025ee019 100644 --- a/src/libraries/Microsoft.Extensions.HostFactoryResolver/src/Microsoft.Extensions.HostFactoryResolver.Sources.csproj +++ b/src/libraries/Microsoft.Extensions.HostFactoryResolver/src/Microsoft.Extensions.HostFactoryResolver.Sources.csproj @@ -3,8 +3,6 @@ package infra globs for .cs files. --> netstandard2.0 - - true false true diff --git a/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj b/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj index 299a8b2ceb7342..9aad9681e31f98 100644 --- a/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj +++ b/src/libraries/Microsoft.NETCore.Platforms/src/Microsoft.NETCore.Platforms.csproj @@ -6,8 +6,6 @@ $(MSBuildProjectName) true Microsoft.NETCore.Platforms.BuildTasks - - true false true diff --git a/src/libraries/Microsoft.Windows.Compatibility/src/Microsoft.Windows.Compatibility.csproj b/src/libraries/Microsoft.Windows.Compatibility/src/Microsoft.Windows.Compatibility.csproj index b5366b1f1d6e18..86afb922f869e5 100644 --- a/src/libraries/Microsoft.Windows.Compatibility/src/Microsoft.Windows.Compatibility.csproj +++ b/src/libraries/Microsoft.Windows.Compatibility/src/Microsoft.Windows.Compatibility.csproj @@ -10,20 +10,11 @@ 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. - - - - false - - - - @@ -49,6 +40,10 @@ + + + + + - + + + Exclude="$(MSBuildThisFileDirectory)*\src\**\*.shproj" /> + + diff --git a/src/libraries/pkg/runtime.native.System.IO.Ports/runtime.native.System.IO.Ports.proj b/src/libraries/pkg/runtime.native.System.IO.Ports/runtime.native.System.IO.Ports.proj index a1ec1ea4bd1c98..4cccee8eede3c0 100644 --- a/src/libraries/pkg/runtime.native.System.IO.Ports/runtime.native.System.IO.Ports.proj +++ b/src/libraries/pkg/runtime.native.System.IO.Ports/runtime.native.System.IO.Ports.proj @@ -1,7 +1,7 @@ - + diff --git a/src/libraries/src.proj b/src/libraries/src.proj index 5862082f7e3ef9..0faa26075e2d7d 100644 --- a/src/libraries/src.proj +++ b/src/libraries/src.proj @@ -7,6 +7,12 @@ <_allSrc Include="$(MSBuildThisFileDirectory)*\src\*.csproj" Exclude="@(ProjectExclusions)" /> + + <_allSrc Update="$(MSBuildThisFileDirectory)Microsoft.Windows.Compatibility\src\Microsoft.Windows.Compatibility.csproj" + AdditionalProperties="BuildProjectReferences=false" /> + + <_allSrc Remove="$(MSBuildThisFileDirectory)Microsoft.Windows.Compatibility\src\Microsoft.Windows.Compatibility.csproj" + Condition="'$(BuildAllConfigurations)' != 'true'" /> - -