From 38de3570c22a65c76031de8a54d52d83c77320ad Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 7 Jul 2021 01:10:22 -0700 Subject: [PATCH 001/149] Implement PackageReferences form Folly --- vnext/Directory.Build.props | 4 +++- vnext/Directory.Build.targets | 20 +++++++++++++++++++- vnext/Folly/Folly.vcxproj | 27 ++++++++++++++++++++++----- vnext/PropertySheets/React.Cpp.props | 4 ++++ 4 files changed, 48 insertions(+), 7 deletions(-) diff --git a/vnext/Directory.Build.props b/vnext/Directory.Build.props index 03cd3e5fae5..c392556348d 100644 --- a/vnext/Directory.Build.props +++ b/vnext/Directory.Build.props @@ -13,7 +13,7 @@ true - @@ -59,4 +59,6 @@ $([MSBuild]::NormalizeDirectory($(FmtDir))) + + diff --git a/vnext/Directory.Build.targets b/vnext/Directory.Build.targets index 4fbdd3bd425..c63de270aba 100644 --- a/vnext/Directory.Build.targets +++ b/vnext/Directory.Build.targets @@ -4,6 +4,8 @@ + + @@ -60,5 +62,21 @@ + + + + + + + + + + + + + + + + - \ No newline at end of file + diff --git a/vnext/Folly/Folly.vcxproj b/vnext/Folly/Folly.vcxproj index 16be0f0dd9a..855a92a4ae1 100644 --- a/vnext/Folly/Folly.vcxproj +++ b/vnext/Folly/Folly.vcxproj @@ -6,9 +6,21 @@ Folly Folly en-US - true - Windows Store - 10.0 + + Windows Store + + + + false + uap10.0 + uap10.0 + + @@ -270,13 +282,11 @@ - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - @@ -317,6 +327,9 @@ + + + @@ -325,4 +338,8 @@ + + + + \ No newline at end of file diff --git a/vnext/PropertySheets/React.Cpp.props b/vnext/PropertySheets/React.Cpp.props index 09050ea65a8..03c70994d50 100644 --- a/vnext/PropertySheets/React.Cpp.props +++ b/vnext/PropertySheets/React.Cpp.props @@ -125,4 +125,8 @@ + + From 3f31bc79ea48eca6971fae5a3281901590bba169 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 7 Jul 2021 14:59:52 -0700 Subject: [PATCH 002/149] Set ResolveNuGetPackages to false --- Directory.Build.props | 4 ++++ Directory.Build.targets | 1 - vnext/Directory.Build.props | 2 -- vnext/Directory.Build.targets | 2 -- vnext/Folly/Folly.vcxproj | 15 --------------- vnext/PropertySheets/React.Cpp.props | 9 +++++++-- 6 files changed, 11 insertions(+), 22 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 21fe20d007a..7c108fe91ed 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -13,4 +13,8 @@ $(ReactNativeWindowsDir)\target + + $(RootIntDir)\ProjectExtensions\$(MSBuildProjectName)\ + + \ No newline at end of file diff --git a/Directory.Build.targets b/Directory.Build.targets index a58b8fb0f4b..2dd4dc78314 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -57,5 +57,4 @@ - diff --git a/vnext/Directory.Build.props b/vnext/Directory.Build.props index c392556348d..8f772a034e9 100644 --- a/vnext/Directory.Build.props +++ b/vnext/Directory.Build.props @@ -59,6 +59,4 @@ $([MSBuild]::NormalizeDirectory($(FmtDir))) - - diff --git a/vnext/Directory.Build.targets b/vnext/Directory.Build.targets index c63de270aba..7f48f84a4b7 100644 --- a/vnext/Directory.Build.targets +++ b/vnext/Directory.Build.targets @@ -4,8 +4,6 @@ - - diff --git a/vnext/Folly/Folly.vcxproj b/vnext/Folly/Folly.vcxproj index 855a92a4ae1..e0220f0ed9a 100644 --- a/vnext/Folly/Folly.vcxproj +++ b/vnext/Folly/Folly.vcxproj @@ -6,21 +6,9 @@ Folly Folly en-US - Windows Store - - - - false - uap10.0 - uap10.0 - - @@ -338,8 +326,5 @@ - - - \ No newline at end of file diff --git a/vnext/PropertySheets/React.Cpp.props b/vnext/PropertySheets/React.Cpp.props index 03c70994d50..1de28ff4b1d 100644 --- a/vnext/PropertySheets/React.Cpp.props +++ b/vnext/PropertySheets/React.Cpp.props @@ -16,6 +16,11 @@ true + + + false + + _WIN32_WINNT_WIN8 @@ -125,8 +130,8 @@ - + From 1bac122771e7eb9b042bce8135475c013fb46f3b Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 7 Jul 2021 15:01:11 -0700 Subject: [PATCH 003/149] Remove Folly packages.config --- vnext/Folly/packages.config | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 vnext/Folly/packages.config diff --git a/vnext/Folly/packages.config b/vnext/Folly/packages.config deleted file mode 100644 index 2594c4d075b..00000000000 --- a/vnext/Folly/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file From 746612125abef869615eb3dca0870c96e09e4006 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 7 Jul 2021 15:10:38 -0700 Subject: [PATCH 004/149] Move ReactCommon to PackageReference --- vnext/ReactCommon/ReactCommon.vcxproj | 9 +++------ vnext/ReactCommon/packages.config | 4 ---- 2 files changed, 3 insertions(+), 10 deletions(-) delete mode 100644 vnext/ReactCommon/packages.config diff --git a/vnext/ReactCommon/ReactCommon.vcxproj b/vnext/ReactCommon/ReactCommon.vcxproj index 490570499bb..42b18ca9096 100644 --- a/vnext/ReactCommon/ReactCommon.vcxproj +++ b/vnext/ReactCommon/ReactCommon.vcxproj @@ -193,12 +193,9 @@ {A990658C-CE31-4BCC-976F-0FC6B1AF693D} - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - + + + diff --git a/vnext/ReactCommon/packages.config b/vnext/ReactCommon/packages.config deleted file mode 100644 index 2594c4d075b..00000000000 --- a/vnext/ReactCommon/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file From e728e3d07dadf128c2417a11ccd5a34f47b25f0e Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 7 Jul 2021 15:30:12 -0700 Subject: [PATCH 005/149] Migrated Desktop --- vnext/Desktop/React.Windows.Desktop.vcxproj | 49 +++++---------------- vnext/Desktop/packages.config | 12 ----- vnext/Folly/Folly.vcxproj | 3 -- 3 files changed, 12 insertions(+), 52 deletions(-) delete mode 100644 vnext/Desktop/packages.config diff --git a/vnext/Desktop/React.Windows.Desktop.vcxproj b/vnext/Desktop/React.Windows.Desktop.vcxproj index 2f38c74a47c..23ae6b93a6e 100644 --- a/vnext/Desktop/React.Windows.Desktop.vcxproj +++ b/vnext/Desktop/React.Windows.Desktop.vcxproj @@ -302,11 +302,6 @@ - - - Designer - - {fca38f3c-7c73-4c47-be4e-32f77fa8538d} @@ -321,19 +316,19 @@ {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD} + + + + + + + + + + + + - - - - - - - - - - - - @@ -348,24 +343,4 @@ <_CppWinRTOriginalRootNamespace /> - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vnext/Desktop/packages.config b/vnext/Desktop/packages.config deleted file mode 100644 index 5d6d71d5325..00000000000 --- a/vnext/Desktop/packages.config +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/vnext/Folly/Folly.vcxproj b/vnext/Folly/Folly.vcxproj index e0220f0ed9a..cdccc529873 100644 --- a/vnext/Folly/Folly.vcxproj +++ b/vnext/Folly/Folly.vcxproj @@ -233,9 +233,6 @@ Designer - - - From c6dc800a61825b614783db91c79d1b7c14d82d25 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 7 Jul 2021 15:42:19 -0700 Subject: [PATCH 006/149] Migrate Desktop.DLL --- .../React.Windows.Desktop.DLL.vcxproj | 24 ++++++++++++------- vnext/Desktop.DLL/packages.config | 12 ---------- vnext/Desktop/React.Windows.Desktop.vcxproj | 4 ---- 3 files changed, 16 insertions(+), 24 deletions(-) delete mode 100644 vnext/Desktop.DLL/packages.config diff --git a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj index e8332f16207..8d94a6fa668 100644 --- a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj +++ b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj @@ -1,6 +1,6 @@ - + Debug @@ -35,9 +35,9 @@ win32 - + DynamicLibrary @@ -130,9 +130,6 @@ - - Designer - @@ -154,11 +151,22 @@ + + + + + + + + + + + - + \ No newline at end of file diff --git a/vnext/Desktop.DLL/packages.config b/vnext/Desktop.DLL/packages.config deleted file mode 100644 index 26ef4fc1fc5..00000000000 --- a/vnext/Desktop.DLL/packages.config +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/vnext/Desktop/React.Windows.Desktop.vcxproj b/vnext/Desktop/React.Windows.Desktop.vcxproj index 23ae6b93a6e..76346cccf59 100644 --- a/vnext/Desktop/React.Windows.Desktop.vcxproj +++ b/vnext/Desktop/React.Windows.Desktop.vcxproj @@ -56,10 +56,6 @@ true - - - - StaticLibrary From 256890d37f70565d89af94720c7c59a2da9bd395 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 7 Jul 2021 15:43:28 -0700 Subject: [PATCH 007/149] Clean Desktop.DLL --- .../React.Windows.Desktop.DLL.vcxproj | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj index 8d94a6fa668..c56f57b25cb 100644 --- a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj +++ b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj @@ -1,6 +1,5 @@ - Debug @@ -35,9 +34,6 @@ win32 - DynamicLibrary @@ -166,34 +162,5 @@ - \ No newline at end of file From 9785dae97e306193351ff730846929ad48e17db6 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 7 Jul 2021 15:48:56 -0700 Subject: [PATCH 008/149] Migrate Desktop.ABITests --- .../React.Windows.Desktop.ABITests.vcxproj | 17 ++++------------- vnext/Desktop.ABITests/packages.config | 5 ----- 2 files changed, 4 insertions(+), 18 deletions(-) delete mode 100644 vnext/Desktop.ABITests/packages.config diff --git a/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj b/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj index 40d4c5e3bfa..ae204dd6cab 100644 --- a/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj +++ b/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj @@ -1,6 +1,5 @@ - Debug @@ -165,17 +164,9 @@ + + + + - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - \ No newline at end of file diff --git a/vnext/Desktop.ABITests/packages.config b/vnext/Desktop.ABITests/packages.config deleted file mode 100644 index a8a8be05305..00000000000 --- a/vnext/Desktop.ABITests/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file From 2827453a52666c2763a0c561625d4baa08521aa8 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 7 Jul 2021 15:52:55 -0700 Subject: [PATCH 009/149] Migrated React.Windows.Test --- vnext/Test/React.Windows.Test.vcxproj | 14 ++------------ vnext/Test/packages.config | 5 ----- 2 files changed, 2 insertions(+), 17 deletions(-) delete mode 100644 vnext/Test/packages.config diff --git a/vnext/Test/React.Windows.Test.vcxproj b/vnext/Test/React.Windows.Test.vcxproj index 0ca9c752e7b..7330f560c80 100644 --- a/vnext/Test/React.Windows.Test.vcxproj +++ b/vnext/Test/React.Windows.Test.vcxproj @@ -76,17 +76,7 @@ - + + - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - \ No newline at end of file diff --git a/vnext/Test/packages.config b/vnext/Test/packages.config deleted file mode 100644 index d7a170cd88b..00000000000 --- a/vnext/Test/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file From 77d4488be91d40d2e860f1fa350d21ae24ea6394 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 7 Jul 2021 15:56:49 -0700 Subject: [PATCH 010/149] Migrated Desktop.Test.DLL --- .../React.Windows.Desktop.Test.DLL.vcxproj | 17 ++++------------- vnext/Desktop.Test.DLL/packages.config | 5 ----- 2 files changed, 4 insertions(+), 18 deletions(-) delete mode 100644 vnext/Desktop.Test.DLL/packages.config diff --git a/vnext/Desktop.Test.DLL/React.Windows.Desktop.Test.DLL.vcxproj b/vnext/Desktop.Test.DLL/React.Windows.Desktop.Test.DLL.vcxproj index 74f27792d14..4c23b151245 100644 --- a/vnext/Desktop.Test.DLL/React.Windows.Desktop.Test.DLL.vcxproj +++ b/vnext/Desktop.Test.DLL/React.Windows.Desktop.Test.DLL.vcxproj @@ -1,6 +1,5 @@ - Debug @@ -61,7 +60,6 @@ - @@ -73,17 +71,10 @@ + + + + - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - \ No newline at end of file diff --git a/vnext/Desktop.Test.DLL/packages.config b/vnext/Desktop.Test.DLL/packages.config deleted file mode 100644 index d7a170cd88b..00000000000 --- a/vnext/Desktop.Test.DLL/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file From 65defd8100f49e2af2dd9aa025d2f162ebc7b1c1 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 7 Jul 2021 16:05:31 -0700 Subject: [PATCH 011/149] Migrated Desktop.UnitTests --- .../React.Windows.Desktop.UnitTests.vcxproj | 29 +++++-------------- vnext/Desktop.UnitTests/packages.config | 8 ----- 2 files changed, 7 insertions(+), 30 deletions(-) delete mode 100644 vnext/Desktop.UnitTests/packages.config diff --git a/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj b/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj index 614edbdb334..721fa350fc3 100644 --- a/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj +++ b/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj @@ -29,7 +29,6 @@ React.Windows.Desktop.UnitTests - DynamicLibrary @@ -107,11 +106,6 @@ - - - Designer - - @@ -125,23 +119,14 @@ {95048601-C3DC-475F-ADF8-7C0C764C10D5} + + + + + + + - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - diff --git a/vnext/Desktop.UnitTests/packages.config b/vnext/Desktop.UnitTests/packages.config deleted file mode 100644 index 304dd2aa677..00000000000 --- a/vnext/Desktop.UnitTests/packages.config +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file From 376745777534e8b6875aa9fa1c44ab1d5049c2c4 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 7 Jul 2021 16:19:57 -0700 Subject: [PATCH 012/149] Migrated Desktop.IntegrationTests --- ...t.Windows.Desktop.IntegrationTests.vcxproj | 33 ++++--------------- .../Desktop.IntegrationTests/packages.config | 8 ----- .../React.Windows.IntegrationTests.vcxproj | 13 ++------ vnext/IntegrationTests/packages.config | 4 --- 4 files changed, 10 insertions(+), 48 deletions(-) delete mode 100644 vnext/Desktop.IntegrationTests/packages.config delete mode 100644 vnext/IntegrationTests/packages.config diff --git a/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj b/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj index cc8b4c0f1f5..ff62c8e45de 100644 --- a/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj +++ b/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj @@ -1,6 +1,5 @@ - Debug @@ -95,9 +94,6 @@ - - - {88bab0fa-e1ac-4da7-a30c-f91702a8eadb} @@ -122,29 +118,14 @@ + + + + + + + - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - - diff --git a/vnext/Desktop.IntegrationTests/packages.config b/vnext/Desktop.IntegrationTests/packages.config deleted file mode 100644 index 4bdf7a86fe6..00000000000 --- a/vnext/Desktop.IntegrationTests/packages.config +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/vnext/IntegrationTests/React.Windows.IntegrationTests.vcxproj b/vnext/IntegrationTests/React.Windows.IntegrationTests.vcxproj index 26b1a1d1330..fbcb0cfb60b 100644 --- a/vnext/IntegrationTests/React.Windows.IntegrationTests.vcxproj +++ b/vnext/IntegrationTests/React.Windows.IntegrationTests.vcxproj @@ -83,19 +83,12 @@ - + + + - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - diff --git a/vnext/IntegrationTests/packages.config b/vnext/IntegrationTests/packages.config deleted file mode 100644 index 2594c4d075b..00000000000 --- a/vnext/IntegrationTests/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file From 749ce8fe967ef682183a2f40f8e3fd2af0b78ebf Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 7 Jul 2021 16:25:01 -0700 Subject: [PATCH 013/149] Migrated ReactCommon.UnitTests --- .../ReactCommon.UnitTests.vcxproj | 28 +++++-------------- vnext/ReactCommon.UnitTests/packages.config | 8 ------ 2 files changed, 7 insertions(+), 29 deletions(-) delete mode 100644 vnext/ReactCommon.UnitTests/packages.config diff --git a/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj b/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj index 01dc3d67794..ca9b1363ab5 100644 --- a/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj +++ b/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj @@ -128,9 +128,6 @@ Create - - - @@ -173,22 +170,11 @@ true - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - + + + + + + + \ No newline at end of file diff --git a/vnext/ReactCommon.UnitTests/packages.config b/vnext/ReactCommon.UnitTests/packages.config deleted file mode 100644 index 06bef4a6d80..00000000000 --- a/vnext/ReactCommon.UnitTests/packages.config +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file From f985c82a60a56963228eab6c9fa246ea92a0f883 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 7 Jul 2021 16:28:46 -0700 Subject: [PATCH 014/149] Migrate Mso.UnitTests --- vnext/Mso.UnitTests/Mso.UnitTests.vcxproj | 18 ++++-------------- vnext/Mso.UnitTests/packages.config | 5 ----- 2 files changed, 4 insertions(+), 19 deletions(-) delete mode 100644 vnext/Mso.UnitTests/packages.config diff --git a/vnext/Mso.UnitTests/Mso.UnitTests.vcxproj b/vnext/Mso.UnitTests/Mso.UnitTests.vcxproj index 614a937b600..98ffb8be8c8 100644 --- a/vnext/Mso.UnitTests/Mso.UnitTests.vcxproj +++ b/vnext/Mso.UnitTests/Mso.UnitTests.vcxproj @@ -13,7 +13,6 @@ 2 - @@ -144,19 +143,10 @@ - + + + + - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - \ No newline at end of file diff --git a/vnext/Mso.UnitTests/packages.config b/vnext/Mso.UnitTests/packages.config deleted file mode 100644 index 46a818dd703..00000000000 --- a/vnext/Mso.UnitTests/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file From 92c90115d632b50855b0c5e3c2585e7ad7a317c6 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 7 Jul 2021 16:56:45 -0700 Subject: [PATCH 015/149] Migrate Microsoft.ReactNative --- ...crosoft.ReactNative.ComponentTests.vcxproj | 21 ++------- .../packages.config | 6 --- ...icrosoft.ReactNative.Cxx.UnitTests.vcxproj | 18 ++------ .../packages.config | 5 -- ...osoft.ReactNative.IntegrationTests.vcxproj | 22 ++------- .../Microsoft.ReactNative.vcxproj | 46 ++++++------------- vnext/Microsoft.ReactNative/packages.config | 12 ----- 7 files changed, 27 insertions(+), 103 deletions(-) delete mode 100644 vnext/Microsoft.ReactNative.ComponentTests/packages.config delete mode 100644 vnext/Microsoft.ReactNative.Cxx.UnitTests/packages.config delete mode 100644 vnext/Microsoft.ReactNative/packages.config diff --git a/vnext/Microsoft.ReactNative.ComponentTests/Microsoft.ReactNative.ComponentTests.vcxproj b/vnext/Microsoft.ReactNative.ComponentTests/Microsoft.ReactNative.ComponentTests.vcxproj index 4f71da664ff..8e26829d9e9 100644 --- a/vnext/Microsoft.ReactNative.ComponentTests/Microsoft.ReactNative.ComponentTests.vcxproj +++ b/vnext/Microsoft.ReactNative.ComponentTests/Microsoft.ReactNative.ComponentTests.vcxproj @@ -13,7 +13,6 @@ 2 - @@ -175,7 +174,6 @@ - @@ -225,19 +223,10 @@ {a9d95a91-4db7-4f72-beb6-fe8a5c89bfbd} + + + + + - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - \ No newline at end of file diff --git a/vnext/Microsoft.ReactNative.ComponentTests/packages.config b/vnext/Microsoft.ReactNative.ComponentTests/packages.config deleted file mode 100644 index 3071ca25f0c..00000000000 --- a/vnext/Microsoft.ReactNative.ComponentTests/packages.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/vnext/Microsoft.ReactNative.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.vcxproj b/vnext/Microsoft.ReactNative.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.vcxproj index e74557e5d94..dcc0f0519e9 100644 --- a/vnext/Microsoft.ReactNative.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.vcxproj +++ b/vnext/Microsoft.ReactNative.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.vcxproj @@ -13,7 +13,6 @@ 2 - @@ -129,7 +128,6 @@ - false @@ -153,17 +151,9 @@ + + + + - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - \ No newline at end of file diff --git a/vnext/Microsoft.ReactNative.Cxx.UnitTests/packages.config b/vnext/Microsoft.ReactNative.Cxx.UnitTests/packages.config deleted file mode 100644 index 46a818dd703..00000000000 --- a/vnext/Microsoft.ReactNative.Cxx.UnitTests/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj b/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj index bd4755f3e34..af74e5ba6dd 100644 --- a/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj +++ b/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj @@ -9,7 +9,6 @@ 10.0 - @@ -149,7 +148,6 @@ - @@ -162,20 +160,10 @@ {f7d32bd0-2749-483e-9a0d-1635ef7e3136} + + + + + - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - \ No newline at end of file diff --git a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj index b1aa5293de5..a8bdda38d1b 100644 --- a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +++ b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj @@ -22,10 +22,6 @@ - - - - @@ -82,7 +78,8 @@ - + + $(GeneratedFilesDir);$(IncludePath) @@ -724,7 +721,6 @@ - @@ -765,34 +761,18 @@ Designer + + + + + + + + + + + - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - - - - - - diff --git a/vnext/Microsoft.ReactNative/packages.config b/vnext/Microsoft.ReactNative/packages.config deleted file mode 100644 index 06be3b39049..00000000000 --- a/vnext/Microsoft.ReactNative/packages.config +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file From b02f9b82afa9087e3fac6b87304c4c4fd321c08f Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 7 Jul 2021 17:04:58 -0700 Subject: [PATCH 016/149] Clean up packages.config references --- .../Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj | 1 - .../React.Windows.Desktop.ABITests.vcxproj.filters | 3 --- vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj.filters | 1 - .../React.Windows.Desktop.IntegrationTests.vcxproj.filters | 3 --- .../React.Windows.Desktop.Test.DLL.vcxproj.filters | 1 - .../React.Windows.Desktop.UnitTests.vcxproj.filters | 3 --- vnext/Desktop/React.Windows.Desktop.vcxproj.filters | 3 --- vnext/Folly/Folly.vcxproj | 6 ------ vnext/Folly/Folly.vcxproj.filters | 3 --- .../React.Windows.IntegrationTests.vcxproj.filters | 1 - .../Microsoft.ReactNative.ComponentTests.vcxproj.filters | 1 - .../Microsoft.ReactNative.IntegrationTests.vcxproj.filters | 3 --- .../Microsoft.ReactNative.vcxproj.filters | 1 - vnext/Mso.UnitTests/Mso.UnitTests.vcxproj.filters | 1 - .../ReactCommon.UnitTests.vcxproj.filters | 3 --- vnext/ReactCommon/ReactCommon.vcxproj | 3 --- vnext/ReactCommon/ReactCommon.vcxproj.filters | 3 --- vnext/Test/React.Windows.Test.vcxproj.filters | 3 --- vnext/fmt/fmt.vcxproj | 3 --- vnext/fmt/fmt.vcxproj.filters | 3 --- vnext/fmt/packages.config | 3 --- 21 files changed, 52 deletions(-) delete mode 100644 vnext/fmt/packages.config diff --git a/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj b/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj index ae204dd6cab..47a535fce9b 100644 --- a/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj +++ b/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj @@ -161,7 +161,6 @@ - diff --git a/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj.filters b/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj.filters index f12a16e3251..45d1e071971 100644 --- a/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj.filters +++ b/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj.filters @@ -61,9 +61,6 @@ - - Other files - \ No newline at end of file diff --git a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj.filters b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj.filters index 5dc322bea57..63b72b207d4 100644 --- a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj.filters +++ b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj.filters @@ -8,7 +8,6 @@ - diff --git a/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj.filters b/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj.filters index 587b87cbe41..f5deaf0fb7d 100644 --- a/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj.filters +++ b/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj.filters @@ -17,9 +17,6 @@ {893336b8-ce9c-433b-ba3c-aa4697609ec0} - - - Integration Tests diff --git a/vnext/Desktop.Test.DLL/React.Windows.Desktop.Test.DLL.vcxproj.filters b/vnext/Desktop.Test.DLL/React.Windows.Desktop.Test.DLL.vcxproj.filters index bce55f6a7f5..90c78d70e42 100644 --- a/vnext/Desktop.Test.DLL/React.Windows.Desktop.Test.DLL.vcxproj.filters +++ b/vnext/Desktop.Test.DLL/React.Windows.Desktop.Test.DLL.vcxproj.filters @@ -3,7 +3,6 @@ - diff --git a/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj.filters b/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj.filters index 0e69132c245..50001cfeade 100644 --- a/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj.filters +++ b/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj.filters @@ -59,9 +59,6 @@ Unit Tests - - - {5b1c3733-0130-4c1f-95a2-f833b71340e8} diff --git a/vnext/Desktop/React.Windows.Desktop.vcxproj.filters b/vnext/Desktop/React.Windows.Desktop.vcxproj.filters index 41c1ae9b6f8..597cf70e5ee 100644 --- a/vnext/Desktop/React.Windows.Desktop.vcxproj.filters +++ b/vnext/Desktop/React.Windows.Desktop.vcxproj.filters @@ -209,7 +209,4 @@ ABI - - - \ No newline at end of file diff --git a/vnext/Folly/Folly.vcxproj b/vnext/Folly/Folly.vcxproj index cdccc529873..bcd946399fe 100644 --- a/vnext/Folly/Folly.vcxproj +++ b/vnext/Folly/Folly.vcxproj @@ -268,11 +268,6 @@ - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - \ No newline at end of file diff --git a/vnext/Folly/Folly.vcxproj.filters b/vnext/Folly/Folly.vcxproj.filters index 0c1f54abdbf..8840b22f021 100644 --- a/vnext/Folly/Folly.vcxproj.filters +++ b/vnext/Folly/Folly.vcxproj.filters @@ -539,7 +539,4 @@ - - - \ No newline at end of file diff --git a/vnext/IntegrationTests/React.Windows.IntegrationTests.vcxproj.filters b/vnext/IntegrationTests/React.Windows.IntegrationTests.vcxproj.filters index 11fd15b1d00..27ddaec151d 100644 --- a/vnext/IntegrationTests/React.Windows.IntegrationTests.vcxproj.filters +++ b/vnext/IntegrationTests/React.Windows.IntegrationTests.vcxproj.filters @@ -49,7 +49,6 @@ - Resource Files diff --git a/vnext/Microsoft.ReactNative.ComponentTests/Microsoft.ReactNative.ComponentTests.vcxproj.filters b/vnext/Microsoft.ReactNative.ComponentTests/Microsoft.ReactNative.ComponentTests.vcxproj.filters index 65737647b18..541161f2339 100644 --- a/vnext/Microsoft.ReactNative.ComponentTests/Microsoft.ReactNative.ComponentTests.vcxproj.filters +++ b/vnext/Microsoft.ReactNative.ComponentTests/Microsoft.ReactNative.ComponentTests.vcxproj.filters @@ -73,7 +73,6 @@ - diff --git a/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj.filters b/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj.filters index 870f772bf90..cea05b7279e 100644 --- a/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj.filters +++ b/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj.filters @@ -45,9 +45,6 @@ - - Other Files - diff --git a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters index 25655293523..0af8b7e20cd 100644 --- a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters +++ b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters @@ -715,7 +715,6 @@ - diff --git a/vnext/Mso.UnitTests/Mso.UnitTests.vcxproj.filters b/vnext/Mso.UnitTests/Mso.UnitTests.vcxproj.filters index b52c7ea2c3f..7a55b6155f0 100644 --- a/vnext/Mso.UnitTests/Mso.UnitTests.vcxproj.filters +++ b/vnext/Mso.UnitTests/Mso.UnitTests.vcxproj.filters @@ -140,6 +140,5 @@ future - \ No newline at end of file diff --git a/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj.filters b/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj.filters index db3eb578d28..d28c4706ee8 100644 --- a/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj.filters +++ b/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj.filters @@ -115,9 +115,6 @@ jsi\jsi\test - - - {cb6089d5-c5db-4090-93b4-2454ca9411bc} diff --git a/vnext/ReactCommon/ReactCommon.vcxproj b/vnext/ReactCommon/ReactCommon.vcxproj index 42b18ca9096..69278884da5 100644 --- a/vnext/ReactCommon/ReactCommon.vcxproj +++ b/vnext/ReactCommon/ReactCommon.vcxproj @@ -185,9 +185,6 @@ - - - {A990658C-CE31-4BCC-976F-0FC6B1AF693D} diff --git a/vnext/ReactCommon/ReactCommon.vcxproj.filters b/vnext/ReactCommon/ReactCommon.vcxproj.filters index 6387413706a..18379fe2a1a 100644 --- a/vnext/ReactCommon/ReactCommon.vcxproj.filters +++ b/vnext/ReactCommon/ReactCommon.vcxproj.filters @@ -294,7 +294,4 @@ - - - \ No newline at end of file diff --git a/vnext/Test/React.Windows.Test.vcxproj.filters b/vnext/Test/React.Windows.Test.vcxproj.filters index 5c99e2343ad..49f5456f640 100644 --- a/vnext/Test/React.Windows.Test.vcxproj.filters +++ b/vnext/Test/React.Windows.Test.vcxproj.filters @@ -27,7 +27,4 @@ Source Files - - - \ No newline at end of file diff --git a/vnext/fmt/fmt.vcxproj b/vnext/fmt/fmt.vcxproj index ff46f019a79..ff3864ffe79 100644 --- a/vnext/fmt/fmt.vcxproj +++ b/vnext/fmt/fmt.vcxproj @@ -63,9 +63,6 @@ - - - diff --git a/vnext/fmt/fmt.vcxproj.filters b/vnext/fmt/fmt.vcxproj.filters index 6e3719cd7e9..8cc617a390f 100644 --- a/vnext/fmt/fmt.vcxproj.filters +++ b/vnext/fmt/fmt.vcxproj.filters @@ -56,7 +56,4 @@ Header Files - - - \ No newline at end of file diff --git a/vnext/fmt/packages.config b/vnext/fmt/packages.config deleted file mode 100644 index 6b8deb9c96d..00000000000 --- a/vnext/fmt/packages.config +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file From ef480e10851e1996be584d866829e18af85e3464 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 7 Jul 2021 17:05:54 -0700 Subject: [PATCH 017/149] Change files --- ...ative-windows-c9ee2e0d-b03e-4c92-8335-36e12d4e2465.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/react-native-windows-c9ee2e0d-b03e-4c92-8335-36e12d4e2465.json diff --git a/change/react-native-windows-c9ee2e0d-b03e-4c92-8335-36e12d4e2465.json b/change/react-native-windows-c9ee2e0d-b03e-4c92-8335-36e12d4e2465.json new file mode 100644 index 00000000000..f9fbb42edb7 --- /dev/null +++ b/change/react-native-windows-c9ee2e0d-b03e-4c92-8335-36e12d4e2465.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Use PackageReference for NuGet Dependencies", + "packageName": "react-native-windows", + "email": "julio.rocha@microsoft.com", + "dependentChangeType": "patch" +} From 77cb4b46799d96f926211f067c2d1cff6dbea8f2 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 7 Jul 2021 17:58:13 -0700 Subject: [PATCH 018/149] Clean React.Cpp.props --- vnext/PropertySheets/React.Cpp.props | 1 - 1 file changed, 1 deletion(-) diff --git a/vnext/PropertySheets/React.Cpp.props b/vnext/PropertySheets/React.Cpp.props index 1de28ff4b1d..47a9a134b26 100644 --- a/vnext/PropertySheets/React.Cpp.props +++ b/vnext/PropertySheets/React.Cpp.props @@ -16,7 +16,6 @@ true - false From 27c384db156c4c1636a686f78747704a75f48a8a Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 7 Jul 2021 18:23:57 -0700 Subject: [PATCH 019/149] Start-TestServers: Do not start Node WS server by default --- vnext/Scripts/Tfs/Start-TestServers.ps1 | 30 ++++++++++++++++--------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/vnext/Scripts/Tfs/Start-TestServers.ps1 b/vnext/Scripts/Tfs/Start-TestServers.ps1 index 2146139542d..2915a59ee0a 100644 --- a/vnext/Scripts/Tfs/Start-TestServers.ps1 +++ b/vnext/Scripts/Tfs/Start-TestServers.ps1 @@ -5,11 +5,13 @@ # Start-TestServers.ps1 # param ( - [System.IO.DirectoryInfo] $SourcesDirectory = ($PSScriptRoot | Split-Path | Split-Path | Split-Path), + [System.IO.DirectoryInfo] $SourcesDirectory = ($PSScriptRoot | Split-Path | Split-Path), [switch] $Preload, - [int] $SleepSeconds = 10 + [int] $SleepSeconds = 10, + + [switch] $UseNodeWsServer ) Write-Host "Starting packager" @@ -24,14 +26,16 @@ Start-Process npm -PassThru ` Write-Host 'Started packager' -Write-Host 'Starting WebSocket server' - -Start-Process -PassThru ` - -FilePath (Get-Command node.exe).Definition ` - -ArgumentList "${SourcesDirectory}\IntegrationTests\websocket_integration_test_server.js" ` - -OutVariable wsProc +if ($UseNodeWsServer.IsPresent) { + Write-Host 'Starting WebSocket server' -Write-Host 'Started WebSocket server' + Start-Process -PassThru ` + -FilePath (Get-Command node.exe).Definition ` + -ArgumentList "${SourcesDirectory}\IntegrationTests\websocket_integration_test_server.js" ` + -OutVariable wsProc + + Write-Host 'Started WebSocket server' +} if ($Preload) { Write-Host 'Preloading bundles' @@ -46,6 +50,10 @@ if ($Preload) { # Use the environment variables input below to pass secret variables to this script. Write-Host "##vso[task.setvariable variable=PackagerId;]$($packagerProc.Id)" -Write-Host "##vso[task.setvariable variable=WebSocketServerId;]$($wsProc.Id)" -return ($packagerProc, $wsProc) +if ($UseNodeWsServer.IsPresent) { + Write-Host "##vso[task.setvariable variable=WebSocketServerId;]$($wsProc.Id)" + return ($packagerProc, $wsProc) +} else { + return ($packagerProc) +} From 8c8b5cbf88a29c57899b7fc9cf1677038bb20ba9 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 7 Jul 2021 18:37:43 -0700 Subject: [PATCH 020/149] Use msbuild /t:restore in CI --- .ado/jobs/playground.yml | 12 +++++++----- .ado/jobs/sample-apps.yml | 13 +++++++------ .ado/jobs/universal.yml | 17 ++++++++--------- .ado/templates/build-rnw.yml | 16 +++++++--------- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/.ado/jobs/playground.yml b/.ado/jobs/playground.yml index ad7beda88c3..312c5be5006 100644 --- a/.ado/jobs/playground.yml +++ b/.ado/jobs/playground.yml @@ -64,12 +64,14 @@ jobs: script: | echo ##vso[task.setvariable variable=BuildWinUI3Properties]/p:AppxPackageSigningEnabled=false /p:UseWinUI3=true - - task: NuGetCommand@2 - displayName: NuGet restore - Playground + - task: MSBuild@1 + displayName: Restore NuGet packages inputs: - command: restore - restoreSolution: packages/playground/windows/$(SolutionFile) - verbosityRestore: Detailed # Options: quiet, normal, detailed + solution: packages/playground/windows/$(SolutionFile) + msbuildArchitecture: x64 + platform: $(BuildPlatform) + configuration: $(BuildConfiguration) + msbuildArguments: /t:Restore - template: ../templates/setup-certificate.yml parameters: diff --git a/.ado/jobs/sample-apps.yml b/.ado/jobs/sample-apps.yml index 09a5a7ca491..545acf0c7cf 100644 --- a/.ado/jobs/sample-apps.yml +++ b/.ado/jobs/sample-apps.yml @@ -56,13 +56,14 @@ jobs: - template: ../templates/prepare-env.yml - - task: NuGetCommand@2 - displayName: NuGet restore - SampleApps + - task: MSBuild@1 + displayName: Restore NuGet packages inputs: - command: restore - restoreSolution: packages/sample-apps/windows/SampleApps.sln - verbosityRestore: Detailed # Options: quiet, normal, detailed - condition: succeeded() + solution: packages/sample-apps/windows/SampleApps.sln + msbuildArchitecture: x64 + platform: $(BuildPlatform) + configuration: $(BuildConfiguration) + msbuildArguments: /t:Restore - template: ../templates/run-windows-with-certificates.yml parameters: diff --git a/.ado/jobs/universal.yml b/.ado/jobs/universal.yml index 062b2e4141e..e61f535ad53 100644 --- a/.ado/jobs/universal.yml +++ b/.ado/jobs/universal.yml @@ -127,16 +127,15 @@ - template: ../templates/prepare-env.yml - - task: NuGetCommand@2 - displayName: NuGet restore + - task: MSBuild@1 + displayName: Restore NuGet packages inputs: - command: restore - restoreSolution: vnext/Microsoft.ReactNative.sln - feedsToUse: config - nugetConfigPath: $(Build.SourcesDirectory)/vnext/NuGet.config - restoreDirectory: packages/ - verbosityRestore: Detailed # Options: quiet, normal, detailed - + solution: vnext/Microsoft.ReactNative.sln + msbuildArchitecture: x64 + platform: $(BuildPlatform) + configuration: $(BuildConfiguration) + msbuildArguments: /t:Restore + - task: DownloadPipelineArtifact@1 displayName: "Download binaries for testing" inputs: diff --git a/.ado/templates/build-rnw.yml b/.ado/templates/build-rnw.yml index dcb2c858391..3c09d1a4f9d 100644 --- a/.ado/templates/build-rnw.yml +++ b/.ado/templates/build-rnw.yml @@ -31,16 +31,14 @@ steps: installVsComponents: ${{ parameters.installVsComponents }} debug: ${{ parameters.debug }} - # NuGetCommand@2 workaround: https://developercommunity.visualstudio.com/content/problem/288534/vsts-yaml-build-failure-the-task-name-nugetcommand.html - - task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2 - displayName: NuGet restore + - task: MSBuild@1 + displayName: Restore NuGet packages inputs: - command: restore - restoreSolution: ${{parameters.project }} - feedsToUse: config - nugetConfigPath: $(Build.SourcesDirectory)/vnext/NuGet.config - restoreDirectory: packages/ - verbosityRestore: Detailed # Options: quiet, normal, detailed + solution: ${{parameters.project}} + msbuildArchitecture: x64 + platform: $(BuildPlatform) + configuration: $(BuildConfiguration) + msbuildArguments: /t:Restore - task: VSBuild@1 displayName: VSBuild ${{parameters.project}} From 19216b2e3b50c508204624ed2722e1e68d3c81dd Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 7 Jul 2021 22:22:21 -0700 Subject: [PATCH 021/149] Use matrix for plaf/config on Universal --- .ado/jobs/universal.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ado/jobs/universal.yml b/.ado/jobs/universal.yml index e61f535ad53..d99b76a0e75 100644 --- a/.ado/jobs/universal.yml +++ b/.ado/jobs/universal.yml @@ -132,8 +132,8 @@ inputs: solution: vnext/Microsoft.ReactNative.sln msbuildArchitecture: x64 - platform: $(BuildPlatform) - configuration: $(BuildConfiguration) + platform: ${{ matrix.BuildPlatform }} + configuration: ${{ matrix.BuildConfiguration }} msbuildArguments: /t:Restore - task: DownloadPipelineArtifact@1 From 6bc8547873001e83fc8f723cc8650001116bf116 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 7 Jul 2021 23:20:30 -0700 Subject: [PATCH 022/149] Sort Reunion SLN platforms --- vnext/Microsoft.ReactNative.ProjectReunion.sln | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vnext/Microsoft.ReactNative.ProjectReunion.sln b/vnext/Microsoft.ReactNative.ProjectReunion.sln index 4feaac2635c..c2a35e2f987 100644 --- a/vnext/Microsoft.ReactNative.ProjectReunion.sln +++ b/vnext/Microsoft.ReactNative.ProjectReunion.sln @@ -37,12 +37,12 @@ Global Shared\Shared.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4 EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|ARM64 = Debug|ARM64 Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 - Release|ARM64 = Release|ARM64 + Debug|ARM64 = Debug|ARM64 Release|x64 = Release|x64 Release|x86 = Release|x86 + Release|ARM64 = Release|ARM64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {FB80EBB0-1E51-465D-953C-72829AE0E9EF}.Debug|ARM64.ActiveCfg = Debug|x64 From 0e1ca519e137508a6ef4e6bac5fc08128676d00e Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Thu, 8 Jul 2021 01:45:31 -0700 Subject: [PATCH 023/149] Use parameters plaf/config --- .ado/templates/build-rnw.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ado/templates/build-rnw.yml b/.ado/templates/build-rnw.yml index 3c09d1a4f9d..52215e56d2f 100644 --- a/.ado/templates/build-rnw.yml +++ b/.ado/templates/build-rnw.yml @@ -36,8 +36,8 @@ steps: inputs: solution: ${{parameters.project}} msbuildArchitecture: x64 - platform: $(BuildPlatform) - configuration: $(BuildConfiguration) + platform: ${{ parameters.buildPlatform }} + configuration: ${{ parameters.buildConfiguration }} msbuildArguments: /t:Restore - task: VSBuild@1 From 0e9ed90588f626b2d3a7b98e2032a438c06b6b51 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Thu, 8 Jul 2021 02:30:34 -0700 Subject: [PATCH 024/149] Add native to AssetTargetFallback --- Directory.Build.props | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 7c108fe91ed..36331f290c2 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ - @@ -15,6 +15,9 @@ $(RootIntDir)\ProjectExtensions\$(MSBuildProjectName)\ + + + $(AssetTargetFallback);native - \ No newline at end of file + From 4392c69cfa205e736286758c1df209cf58be50dd Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Thu, 8 Jul 2021 15:47:58 -0700 Subject: [PATCH 025/149] Remove Microsoft.ReactNative.IntegrationTests\packages.config --- .../Microsoft.ReactNative.IntegrationTests/packages.config | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 vnext/Microsoft.ReactNative.IntegrationTests/packages.config diff --git a/vnext/Microsoft.ReactNative.IntegrationTests/packages.config b/vnext/Microsoft.ReactNative.IntegrationTests/packages.config deleted file mode 100644 index f85216a0393..00000000000 --- a/vnext/Microsoft.ReactNative.IntegrationTests/packages.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From 4702de6b659d1806312122b64600ca97c2b57258 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Thu, 8 Jul 2021 16:05:59 -0700 Subject: [PATCH 026/149] Upgrade to Microsoft.Windows.CppWinRT 2.0.210708.4 --- vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj | 2 +- vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj | 2 +- vnext/Desktop/React.Windows.Desktop.vcxproj | 2 +- .../Microsoft.ReactNative.ComponentTests.vcxproj | 2 +- .../Microsoft.ReactNative.Cxx.UnitTests.vcxproj | 2 +- .../Microsoft.ReactNative.IntegrationTests.vcxproj | 2 +- vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj | 2 +- vnext/Mso.UnitTests/Mso.UnitTests.vcxproj | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj b/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj index 47a535fce9b..af800e33b1a 100644 --- a/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj +++ b/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj @@ -165,7 +165,7 @@ - + \ No newline at end of file diff --git a/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj b/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj index 721fa350fc3..68ddd9ba56d 100644 --- a/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj +++ b/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj @@ -123,7 +123,7 @@ - + diff --git a/vnext/Desktop/React.Windows.Desktop.vcxproj b/vnext/Desktop/React.Windows.Desktop.vcxproj index f086d0349e7..2fc56a4dd8a 100644 --- a/vnext/Desktop/React.Windows.Desktop.vcxproj +++ b/vnext/Desktop/React.Windows.Desktop.vcxproj @@ -333,7 +333,7 @@ - + diff --git a/vnext/Microsoft.ReactNative.ComponentTests/Microsoft.ReactNative.ComponentTests.vcxproj b/vnext/Microsoft.ReactNative.ComponentTests/Microsoft.ReactNative.ComponentTests.vcxproj index 8e26829d9e9..d46efe4e6c3 100644 --- a/vnext/Microsoft.ReactNative.ComponentTests/Microsoft.ReactNative.ComponentTests.vcxproj +++ b/vnext/Microsoft.ReactNative.ComponentTests/Microsoft.ReactNative.ComponentTests.vcxproj @@ -225,7 +225,7 @@ - + diff --git a/vnext/Microsoft.ReactNative.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.vcxproj b/vnext/Microsoft.ReactNative.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.vcxproj index dcc0f0519e9..2fa5a288ce6 100644 --- a/vnext/Microsoft.ReactNative.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.vcxproj +++ b/vnext/Microsoft.ReactNative.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.vcxproj @@ -153,7 +153,7 @@ - + \ No newline at end of file diff --git a/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj b/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj index af74e5ba6dd..c1c14be0307 100644 --- a/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj +++ b/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj @@ -163,7 +163,7 @@ - + \ No newline at end of file diff --git a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj index 9d1868c4774..2b3bb451789 100644 --- a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +++ b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj @@ -778,7 +778,7 @@ - + diff --git a/vnext/Mso.UnitTests/Mso.UnitTests.vcxproj b/vnext/Mso.UnitTests/Mso.UnitTests.vcxproj index 98ffb8be8c8..612e7d9ccca 100644 --- a/vnext/Mso.UnitTests/Mso.UnitTests.vcxproj +++ b/vnext/Mso.UnitTests/Mso.UnitTests.vcxproj @@ -146,7 +146,7 @@ - + \ No newline at end of file From 833ec37f4c3ef841f42a263a64658fd0ffad52bf Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Thu, 8 Jul 2021 17:30:49 -0700 Subject: [PATCH 027/149] Conditionally reference Hermes and V8 --- vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj index 2b3bb451789..37610c8aa2f 100644 --- a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +++ b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj @@ -777,11 +777,10 @@ - + + - - From 32ff08e2240dccfc22ccd0b62b4c007b9cb7de80 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Thu, 8 Jul 2021 18:50:13 -0700 Subject: [PATCH 028/149] Set AssetTargetFallback for ProjectReunion --- .../Microsoft.ReactNative.ProjectReunion.csproj | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/vnext/Microsoft.ReactNative.ProjectReunion/Microsoft.ReactNative.ProjectReunion.csproj b/vnext/Microsoft.ReactNative.ProjectReunion/Microsoft.ReactNative.ProjectReunion.csproj index e06fa2fae23..11c82939a76 100644 --- a/vnext/Microsoft.ReactNative.ProjectReunion/Microsoft.ReactNative.ProjectReunion.csproj +++ b/vnext/Microsoft.ReactNative.ProjectReunion/Microsoft.ReactNative.ProjectReunion.csproj @@ -1,6 +1,6 @@  - net5.0-windows10.0.18362.0 x64 @@ -11,6 +11,11 @@ $(OutDir) + + + $(AssetTargetFallback);native + + @@ -33,7 +38,7 @@ - From 8bb278a29eb92358eb4c6a38a703a0d518d983a1 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Fri, 9 Jul 2021 00:21:16 -0700 Subject: [PATCH 029/149] Add missing conditions for V8Jsi and SourceLink --- vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj | 8 ++++---- vnext/Desktop/React.Windows.Desktop.vcxproj | 8 ++++---- vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj index c56f57b25cb..6849c29c71c 100644 --- a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj +++ b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj @@ -150,11 +150,11 @@ - + - - - + + + diff --git a/vnext/Desktop/React.Windows.Desktop.vcxproj b/vnext/Desktop/React.Windows.Desktop.vcxproj index 2fc56a4dd8a..12e07ed7d67 100644 --- a/vnext/Desktop/React.Windows.Desktop.vcxproj +++ b/vnext/Desktop/React.Windows.Desktop.vcxproj @@ -329,14 +329,14 @@ - + - - + + + - diff --git a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj index 37610c8aa2f..42cbfcecbd7 100644 --- a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +++ b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj @@ -774,9 +774,9 @@ - - - + + + From 3841826d8cbe757a5ceef231b57ba1d9be7ba9d2 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sat, 10 Jul 2021 00:34:43 -0700 Subject: [PATCH 030/149] Set ToolsVersion to Current --- vnext/Chakra/Chakra.vcxitems.filters | 4 ++-- vnext/Common/Common.vcxproj | 2 +- vnext/Common/Common.vcxproj.filters | 2 +- .../React.Windows.Desktop.ABITests.vcxproj | 2 +- .../React.Windows.Desktop.ABITests.vcxproj.filters | 2 +- vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj | 2 +- .../Desktop.DLL/React.Windows.Desktop.DLL.vcxproj.filters | 2 +- .../React.Windows.Desktop.IntegrationTests.vcxproj | 2 +- ...React.Windows.Desktop.IntegrationTests.vcxproj.filters | 2 +- .../React.Windows.Desktop.Test.DLL.vcxproj | 2 +- .../React.Windows.Desktop.Test.DLL.vcxproj.filters | 2 +- .../React.Windows.Desktop.UnitTests.vcxproj | 2 +- .../React.Windows.Desktop.UnitTests.vcxproj.filters | 2 +- vnext/Desktop/React.Windows.Desktop.vcxproj | 2 +- vnext/Desktop/React.Windows.Desktop.vcxproj.filters | 2 +- vnext/Folly/Folly.vcxproj | 2 +- vnext/Folly/Folly.vcxproj.filters | 2 +- vnext/FollyWin32/FollyWin32.vcxproj | 2 +- vnext/FollyWin32/FollyWin32.vcxproj.filters | 2 +- .../React.Windows.IntegrationTests.vcxproj | 2 +- .../React.Windows.IntegrationTests.vcxproj.filters | 2 +- .../Microsoft.ReactNative.ComponentTests.vcxproj | 2 +- .../Microsoft.ReactNative.ComponentTests.vcxproj.filters | 2 +- .../PropertySheet.props | 6 +++--- .../Microsoft.ReactNative.Cxx.UnitTests.vcxproj | 2 +- .../PropertySheet.props | 6 +++--- .../Microsoft.ReactNative.Cxx.vcxitems.filters | 4 ++-- .../Microsoft.ReactNative.IntegrationTests.vcxproj | 2 +- ...Microsoft.ReactNative.IntegrationTests.vcxproj.filters | 2 +- .../Properties/PublishProfiles/DeployAsTool-Debug.pubxml | 6 +++--- .../PublishProfiles/DeployAsTool-Release.pubxml | 6 +++--- .../Microsoft.ReactNative.Managed.UnitTests.csproj | 4 ++-- .../Microsoft.ReactNative.Managed.csproj | 2 +- vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj | 2 +- .../Microsoft.ReactNative.vcxproj.filters | 2 +- vnext/Microsoft.ReactNative/PropertySheet.props | 2 +- vnext/Mso.UnitTests/Mso.UnitTests.vcxproj | 2 +- vnext/Mso.UnitTests/Mso.UnitTests.vcxproj.filters | 2 +- vnext/Mso.UnitTests/PropertySheet.props | 6 +++--- vnext/Mso/Mso.vcxitems.filters | 4 ++-- vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj | 2 +- .../ReactCommon.UnitTests.vcxproj.filters | 2 +- vnext/ReactCommon/ReactCommon.vcxproj | 2 +- vnext/ReactCommon/ReactCommon.vcxproj.filters | 2 +- vnext/Scripts/OpenSSL.targets | 2 +- vnext/Shared/Shared.vcxitems.filters | 4 ++-- vnext/Test/React.Windows.Test.vcxproj | 2 +- vnext/Test/React.Windows.Test.vcxproj.filters | 2 +- vnext/fmt/fmt.vcxproj | 8 ++++---- vnext/fmt/fmt.vcxproj.filters | 2 +- vnext/include/Include.vcxitems.filters | 2 +- vnext/template/cpp-app/proj/MyApp.vcxproj | 2 +- vnext/template/cpp-app/proj/MyApp.vcxproj.filters | 2 +- vnext/template/cpp-app/src/PropertySheet.props | 6 +++--- vnext/template/cpp-lib/proj/MyLib.vcxproj | 2 +- vnext/template/cpp-lib/proj/MyLib.vcxproj.filters | 2 +- vnext/template/cpp-lib/src/PropertySheet.props | 6 +++--- vnext/template/cs-app/proj/MyApp.csproj | 2 +- vnext/template/cs-lib/proj/MyLib.csproj | 2 +- 59 files changed, 81 insertions(+), 81 deletions(-) diff --git a/vnext/Chakra/Chakra.vcxitems.filters b/vnext/Chakra/Chakra.vcxitems.filters index 973b49ea227..162b2fed478 100644 --- a/vnext/Chakra/Chakra.vcxitems.filters +++ b/vnext/Chakra/Chakra.vcxitems.filters @@ -1,5 +1,5 @@  - + Source Files @@ -54,4 +54,4 @@ {0dfeba50-d70d-48b9-aae9-cc2583d59b72} - \ No newline at end of file + diff --git a/vnext/Common/Common.vcxproj b/vnext/Common/Common.vcxproj index 099bec61d8c..f706af5b3ba 100644 --- a/vnext/Common/Common.vcxproj +++ b/vnext/Common/Common.vcxproj @@ -1,5 +1,5 @@ - + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D} Common diff --git a/vnext/Common/Common.vcxproj.filters b/vnext/Common/Common.vcxproj.filters index a0e4d13c565..44f7804c4ec 100644 --- a/vnext/Common/Common.vcxproj.filters +++ b/vnext/Common/Common.vcxproj.filters @@ -1,5 +1,5 @@  - + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} diff --git a/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj b/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj index af800e33b1a..507a41d92f0 100644 --- a/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj +++ b/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj @@ -1,5 +1,5 @@ - + Debug diff --git a/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj.filters b/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj.filters index 45d1e071971..80b4c97066e 100644 --- a/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj.filters +++ b/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj.filters @@ -1,5 +1,5 @@  - + {dd007ef2-0241-4f4c-bac8-916c537375a3} diff --git a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj index 6849c29c71c..2755a557610 100644 --- a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj +++ b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj @@ -1,5 +1,5 @@ - + Debug diff --git a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj.filters b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj.filters index 63b72b207d4..eaeba891315 100644 --- a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj.filters +++ b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj.filters @@ -1,5 +1,5 @@ - + diff --git a/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj b/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj index ff62c8e45de..89106eeed87 100644 --- a/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj +++ b/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj @@ -1,5 +1,5 @@ - + Debug diff --git a/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj.filters b/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj.filters index f5deaf0fb7d..329b7487af9 100644 --- a/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj.filters +++ b/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj.filters @@ -1,5 +1,5 @@  - + {858e83fd-2806-4740-83f5-cecd131aaf54} diff --git a/vnext/Desktop.Test.DLL/React.Windows.Desktop.Test.DLL.vcxproj b/vnext/Desktop.Test.DLL/React.Windows.Desktop.Test.DLL.vcxproj index 4c23b151245..ac9b27f34b1 100644 --- a/vnext/Desktop.Test.DLL/React.Windows.Desktop.Test.DLL.vcxproj +++ b/vnext/Desktop.Test.DLL/React.Windows.Desktop.Test.DLL.vcxproj @@ -1,5 +1,5 @@ - + Debug diff --git a/vnext/Desktop.Test.DLL/React.Windows.Desktop.Test.DLL.vcxproj.filters b/vnext/Desktop.Test.DLL/React.Windows.Desktop.Test.DLL.vcxproj.filters index 90c78d70e42..bac21ab293f 100644 --- a/vnext/Desktop.Test.DLL/React.Windows.Desktop.Test.DLL.vcxproj.filters +++ b/vnext/Desktop.Test.DLL/React.Windows.Desktop.Test.DLL.vcxproj.filters @@ -1,5 +1,5 @@ - + diff --git a/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj b/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj index 68ddd9ba56d..6aaa67bcb05 100644 --- a/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj +++ b/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj @@ -1,5 +1,5 @@ - + diff --git a/vnext/Microsoft.ReactNative.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.vcxproj b/vnext/Microsoft.ReactNative.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.vcxproj index 2fa5a288ce6..da58dfaba73 100644 --- a/vnext/Microsoft.ReactNative.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.vcxproj +++ b/vnext/Microsoft.ReactNative.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.vcxproj @@ -1,5 +1,5 @@ - + true true diff --git a/vnext/Microsoft.ReactNative.Cxx.UnitTests/PropertySheet.props b/vnext/Microsoft.ReactNative.Cxx.UnitTests/PropertySheet.props index c6b0691ddda..a88ff47dd56 100644 --- a/vnext/Microsoft.ReactNative.Cxx.UnitTests/PropertySheet.props +++ b/vnext/Microsoft.ReactNative.Cxx.UnitTests/PropertySheet.props @@ -1,15 +1,15 @@ - + diff --git a/vnext/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems.filters b/vnext/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems.filters index d434610c3b6..5c9104f0fd4 100644 --- a/vnext/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems.filters +++ b/vnext/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems.filters @@ -1,5 +1,5 @@  - + @@ -161,4 +161,4 @@ - \ No newline at end of file + diff --git a/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj b/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj index c1c14be0307..4e028c37b32 100644 --- a/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj +++ b/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj @@ -1,5 +1,5 @@ - + true 16.0 diff --git a/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj.filters b/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj.filters index cea05b7279e..ad4030aaada 100644 --- a/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj.filters +++ b/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj.filters @@ -1,5 +1,5 @@  - + diff --git a/vnext/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Debug.pubxml b/vnext/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Debug.pubxml index 1dcec77ce7d..edd908c1043 100644 --- a/vnext/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Debug.pubxml +++ b/vnext/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Debug.pubxml @@ -1,7 +1,7 @@ - - + FileSystem Debug @@ -11,4 +11,4 @@ win-x64 true - \ No newline at end of file + diff --git a/vnext/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Release.pubxml b/vnext/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Release.pubxml index 8054eeac3b9..c7aec33e722 100644 --- a/vnext/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Release.pubxml +++ b/vnext/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Release.pubxml @@ -1,7 +1,7 @@ - - + FileSystem Release @@ -11,4 +11,4 @@ win-x64 true - \ No newline at end of file + diff --git a/vnext/Microsoft.ReactNative.Managed.UnitTests/Microsoft.ReactNative.Managed.UnitTests.csproj b/vnext/Microsoft.ReactNative.Managed.UnitTests/Microsoft.ReactNative.Managed.UnitTests.csproj index 5df4dc7deed..28f2aa95d60 100644 --- a/vnext/Microsoft.ReactNative.Managed.UnitTests/Microsoft.ReactNative.Managed.UnitTests.csproj +++ b/vnext/Microsoft.ReactNative.Managed.UnitTests/Microsoft.ReactNative.Managed.UnitTests.csproj @@ -1,5 +1,5 @@  - + Debug @@ -154,7 +154,7 @@ - - + true true diff --git a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters index 0af8b7e20cd..f9fae9cbab7 100644 --- a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters +++ b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters @@ -1,5 +1,5 @@  - + diff --git a/vnext/Microsoft.ReactNative/PropertySheet.props b/vnext/Microsoft.ReactNative/PropertySheet.props index 064dec08100..5b718b12519 100644 --- a/vnext/Microsoft.ReactNative/PropertySheet.props +++ b/vnext/Microsoft.ReactNative/PropertySheet.props @@ -1,5 +1,5 @@ - + diff --git a/vnext/Mso/Mso.vcxitems.filters b/vnext/Mso/Mso.vcxitems.filters index 4c26330395f..b95544ef0aa 100644 --- a/vnext/Mso/Mso.vcxitems.filters +++ b/vnext/Mso/Mso.vcxitems.filters @@ -1,5 +1,5 @@  - + {4a2ca748-edd3-4161-a833-233130d84d4e} @@ -422,4 +422,4 @@ dispatchQueue - \ No newline at end of file + diff --git a/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj b/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj index ca9b1363ab5..84266af6fb5 100644 --- a/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj +++ b/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj @@ -1,5 +1,5 @@  - + Debug diff --git a/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj.filters b/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj.filters index d28c4706ee8..e588628c0e6 100644 --- a/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj.filters +++ b/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj.filters @@ -1,5 +1,5 @@  - + diff --git a/vnext/ReactCommon/ReactCommon.vcxproj b/vnext/ReactCommon/ReactCommon.vcxproj index 69278884da5..9a0e48c9e89 100644 --- a/vnext/ReactCommon/ReactCommon.vcxproj +++ b/vnext/ReactCommon/ReactCommon.vcxproj @@ -1,5 +1,5 @@ - + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD} StaticLibrary diff --git a/vnext/ReactCommon/ReactCommon.vcxproj.filters b/vnext/ReactCommon/ReactCommon.vcxproj.filters index 18379fe2a1a..a84e741aac6 100644 --- a/vnext/ReactCommon/ReactCommon.vcxproj.filters +++ b/vnext/ReactCommon/ReactCommon.vcxproj.filters @@ -1,5 +1,5 @@ - + {7f5b0b9a-6a9b-4927-b92e-b796d8722357} diff --git a/vnext/Scripts/OpenSSL.targets b/vnext/Scripts/OpenSSL.targets index 80725f18b35..444fe3b9bf6 100644 --- a/vnext/Scripts/OpenSSL.targets +++ b/vnext/Scripts/OpenSSL.targets @@ -1,5 +1,5 @@ - + diff --git a/vnext/Shared/Shared.vcxitems.filters b/vnext/Shared/Shared.vcxitems.filters index 4bc0d9eceb3..63619570aa3 100644 --- a/vnext/Shared/Shared.vcxitems.filters +++ b/vnext/Shared/Shared.vcxitems.filters @@ -1,5 +1,5 @@  - + Source Files\AsyncStorage @@ -378,4 +378,4 @@ Source Files\tracing - \ No newline at end of file + diff --git a/vnext/Test/React.Windows.Test.vcxproj b/vnext/Test/React.Windows.Test.vcxproj index 7330f560c80..4265eecb2a3 100644 --- a/vnext/Test/React.Windows.Test.vcxproj +++ b/vnext/Test/React.Windows.Test.vcxproj @@ -1,5 +1,5 @@  - + {CD0415C6-D908-4212-9481-49BE41F58D27} StaticLibrary diff --git a/vnext/Test/React.Windows.Test.vcxproj.filters b/vnext/Test/React.Windows.Test.vcxproj.filters index 49f5456f640..8b6094b9506 100644 --- a/vnext/Test/React.Windows.Test.vcxproj.filters +++ b/vnext/Test/React.Windows.Test.vcxproj.filters @@ -1,5 +1,5 @@  - + {bdc1e148-e9fb-46a5-83c5-8d7436c3ad0c} diff --git a/vnext/fmt/fmt.vcxproj b/vnext/fmt/fmt.vcxproj index ff3864ffe79..c8562ee29e4 100644 --- a/vnext/fmt/fmt.vcxproj +++ b/vnext/fmt/fmt.vcxproj @@ -1,5 +1,5 @@  - + {14b93dc8-fd93-4a6d-81cb-8bc96644501c} StaticLibrary @@ -108,10 +108,10 @@ { - "Registrations": [ + "Registrations": [ { - "Component": { - "Type": "other", + "Component": { + "Type": "other", "Other": { "Name": "fmt", "Version": "$(FmtVersion)", diff --git a/vnext/fmt/fmt.vcxproj.filters b/vnext/fmt/fmt.vcxproj.filters index 8cc617a390f..fcee29200c4 100644 --- a/vnext/fmt/fmt.vcxproj.filters +++ b/vnext/fmt/fmt.vcxproj.filters @@ -1,5 +1,5 @@  - + {8df08a42-4d9d-4736-abe2-f47e12084103} diff --git a/vnext/include/Include.vcxitems.filters b/vnext/include/Include.vcxitems.filters index ab89d510b82..50f84993403 100644 --- a/vnext/include/Include.vcxitems.filters +++ b/vnext/include/Include.vcxitems.filters @@ -1,5 +1,5 @@  - + Shared diff --git a/vnext/template/cpp-app/proj/MyApp.vcxproj b/vnext/template/cpp-app/proj/MyApp.vcxproj index 2d12bf43136..54fb4d67d02 100644 --- a/vnext/template/cpp-app/proj/MyApp.vcxproj +++ b/vnext/template/cpp-app/proj/MyApp.vcxproj @@ -1,5 +1,5 @@ - + {{#cppNugetPackages}} {{#propsTopOfFile}} diff --git a/vnext/template/cpp-app/proj/MyApp.vcxproj.filters b/vnext/template/cpp-app/proj/MyApp.vcxproj.filters index 2aa08b712a1..ac1d0479836 100644 --- a/vnext/template/cpp-app/proj/MyApp.vcxproj.filters +++ b/vnext/template/cpp-app/proj/MyApp.vcxproj.filters @@ -1,5 +1,5 @@  - + diff --git a/vnext/template/cpp-app/src/PropertySheet.props b/vnext/template/cpp-app/src/PropertySheet.props index 5942ba395bb..ae89ceead8e 100644 --- a/vnext/template/cpp-app/src/PropertySheet.props +++ b/vnext/template/cpp-app/src/PropertySheet.props @@ -1,15 +1,15 @@ - + diff --git a/vnext/template/cpp-lib/proj/MyLib.vcxproj b/vnext/template/cpp-lib/proj/MyLib.vcxproj index ed290578a6c..8bed339394a 100644 --- a/vnext/template/cpp-lib/proj/MyLib.vcxproj +++ b/vnext/template/cpp-lib/proj/MyLib.vcxproj @@ -1,5 +1,5 @@ - + {{#cppNugetPackages}} {{#propsTopOfFile}} diff --git a/vnext/template/cpp-lib/proj/MyLib.vcxproj.filters b/vnext/template/cpp-lib/proj/MyLib.vcxproj.filters index 84e1f4f0c99..53959d16ba4 100644 --- a/vnext/template/cpp-lib/proj/MyLib.vcxproj.filters +++ b/vnext/template/cpp-lib/proj/MyLib.vcxproj.filters @@ -1,5 +1,5 @@  - + diff --git a/vnext/template/cpp-lib/src/PropertySheet.props b/vnext/template/cpp-lib/src/PropertySheet.props index 5942ba395bb..ae89ceead8e 100644 --- a/vnext/template/cpp-lib/src/PropertySheet.props +++ b/vnext/template/cpp-lib/src/PropertySheet.props @@ -1,15 +1,15 @@ - + diff --git a/vnext/template/cs-app/proj/MyApp.csproj b/vnext/template/cs-app/proj/MyApp.csproj index a524765874f..89160998e94 100644 --- a/vnext/template/cs-app/proj/MyApp.csproj +++ b/vnext/template/cs-app/proj/MyApp.csproj @@ -1,5 +1,5 @@  - + diff --git a/vnext/template/cs-lib/proj/MyLib.csproj b/vnext/template/cs-lib/proj/MyLib.csproj index e074ffec0ff..fcc5a6ea3e2 100644 --- a/vnext/template/cs-lib/proj/MyLib.csproj +++ b/vnext/template/cs-lib/proj/MyLib.csproj @@ -1,5 +1,5 @@  - + $([MSBuild]::GetDirectoryNameOfFileAbove($(SolutionDir), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\ From cc3a2e849fa53bb7967cde95d4ae9f3ecc14bee2 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sat, 10 Jul 2021 16:36:25 -0700 Subject: [PATCH 031/149] Debugging change. Revert --- .ado/jobs/universal.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.ado/jobs/universal.yml b/.ado/jobs/universal.yml index d99b76a0e75..106bc2c5eb5 100644 --- a/.ado/jobs/universal.yml +++ b/.ado/jobs/universal.yml @@ -2,9 +2,9 @@ - name: buildEnvironment type: string default : PullRequest - values: - - PullRequest - - Continuous + values: + - PullRequest + - Continuous - name: buildMatrix type: object default: @@ -99,7 +99,7 @@ Microsoft.ReactNative\** Microsoft.ReactNative.Managed\** Microsoft.ReactNative.Managed.CodeGen\** - + - template: ../templates/component-governance.yml - job: UniversalTest${{ matrix.Name }} @@ -124,7 +124,7 @@ targetType: filePath filePath: $(Build.SourcesDirectory)\vnext\Scripts\rnw-dependencies.ps1 arguments: -NoPrompt -Tags buildLab - + - template: ../templates/prepare-env.yml - task: MSBuild@1 @@ -136,6 +136,15 @@ configuration: ${{ matrix.BuildConfiguration }} msbuildArguments: /t:Restore + - pwsh: | + echo 'checking MSTest packages after restore' + echo "USR: ${env:USERNAME}" + echo 'Checking C:\Users\AzDevOps\.nuget\packages\mstest.*' + Get-ChildItem -Name -Recurse C:\Users\AzDevOps\.nuget\packages\mstest.* + echo 'Checked C:\Users\AzDevOps\.nuget\packages\mstest.*' + echo "GPF: $(nuget config GlobalPackagesFolder)" + displayName: TODO - Delete + - task: DownloadPipelineArtifact@1 displayName: "Download binaries for testing" inputs: @@ -215,7 +224,7 @@ displayName: Universal Build 🏗 variables: - template: ../variables/vs2019.yml - dependsOn: + dependsOn: - ${{ each config in parameters.buildMatrix }}: - ${{ if eq(config.BuildEnvironment, parameters.buildEnvironment) }}: - ${{ each matrix in config.Matrix }}: From bf202d89ff5a5e8448b4e7977e5397cb1e14f51d Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sat, 10 Jul 2021 17:48:40 -0700 Subject: [PATCH 032/149] Revert --- .ado/jobs/universal.yml | 2 +- .ado/templates/prepare-env.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.ado/jobs/universal.yml b/.ado/jobs/universal.yml index 106bc2c5eb5..272b0793a78 100644 --- a/.ado/jobs/universal.yml +++ b/.ado/jobs/universal.yml @@ -140,7 +140,7 @@ echo 'checking MSTest packages after restore' echo "USR: ${env:USERNAME}" echo 'Checking C:\Users\AzDevOps\.nuget\packages\mstest.*' - Get-ChildItem -Name -Recurse C:\Users\AzDevOps\.nuget\packages\mstest.* + Get-ChildItem -Name -Recurse C:\Users\AzDevOps\.nuget\packages\mstest.* -ErrorAction Continue echo 'Checked C:\Users\AzDevOps\.nuget\packages\mstest.*' echo "GPF: $(nuget config GlobalPackagesFolder)" displayName: TODO - Delete diff --git a/.ado/templates/prepare-env.yml b/.ado/templates/prepare-env.yml index 17b25ab03ce..d58a79abb70 100644 --- a/.ado/templates/prepare-env.yml +++ b/.ado/templates/prepare-env.yml @@ -31,7 +31,7 @@ steps: - task: NodeTool@0 displayName: Installing Node inputs: - versionSpec: '14.x' + versionSpec: '14.x' - task: CmdLine@2 displayName: Installing Yarm From 3fd5a9503df635adde7d1709e012147245882791 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sat, 10 Jul 2021 18:51:50 -0700 Subject: [PATCH 033/149] Revert --- .ado/windows-vs-pr.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.ado/windows-vs-pr.yml b/.ado/windows-vs-pr.yml index cfec6a8c79e..99c583fa9b2 100644 --- a/.ado/windows-vs-pr.yml +++ b/.ado/windows-vs-pr.yml @@ -10,6 +10,8 @@ pr: variables: - template: variables/msbuild.yml - group: platform-override-zero-permission-token + - name: system.debug + value: true stages: - stage: Setup @@ -41,7 +43,7 @@ stages: buildEnvironment: Continuous - template: templates/publish-version-vars.yml - + - template: stages.yml parameters: buildEnvironment: PullRequest From 78bae0da7e0fecd8b4c5d84fe200a91fe426c297 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sat, 10 Jul 2021 21:07:39 -0700 Subject: [PATCH 034/149] Revert --- .ado/jobs/universal.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.ado/jobs/universal.yml b/.ado/jobs/universal.yml index 272b0793a78..387861eb99d 100644 --- a/.ado/jobs/universal.yml +++ b/.ado/jobs/universal.yml @@ -143,6 +143,7 @@ Get-ChildItem -Name -Recurse C:\Users\AzDevOps\.nuget\packages\mstest.* -ErrorAction Continue echo 'Checked C:\Users\AzDevOps\.nuget\packages\mstest.*' echo "GPF: $(nuget config GlobalPackagesFolder)" + Get-Item Env:\ displayName: TODO - Delete - task: DownloadPipelineArtifact@1 From ab427d8a0843bab90d08f722062b50224bbc3b5a Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sat, 10 Jul 2021 22:06:02 -0700 Subject: [PATCH 035/149] Set fixed NuGet GlobalPackagesFolder --- .ado/jobs/universal.yml | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/.ado/jobs/universal.yml b/.ado/jobs/universal.yml index 387861eb99d..1e23cf55066 100644 --- a/.ado/jobs/universal.yml +++ b/.ado/jobs/universal.yml @@ -127,15 +127,6 @@ - template: ../templates/prepare-env.yml - - task: MSBuild@1 - displayName: Restore NuGet packages - inputs: - solution: vnext/Microsoft.ReactNative.sln - msbuildArchitecture: x64 - platform: ${{ matrix.BuildPlatform }} - configuration: ${{ matrix.BuildConfiguration }} - msbuildArguments: /t:Restore - - pwsh: | echo 'checking MSTest packages after restore' echo "USR: ${env:USERNAME}" @@ -144,7 +135,23 @@ echo 'Checked C:\Users\AzDevOps\.nuget\packages\mstest.*' echo "GPF: $(nuget config GlobalPackagesFolder)" Get-Item Env:\ - displayName: TODO - Delete + displayName: Set NuGet globalPackagesFolder + + # Some tasks run on a different user (VssAdministrator) instead of the default user (AzDevOps). + # Keep NuGet cache independent from the user directory. + - task: NuGetCommand@2 + inputs: + command: custom + arguments: config -Set globalPackagesFolder=D:\NugetPackages + + - task: MSBuild@1 + displayName: Restore NuGet packages + inputs: + solution: vnext/Microsoft.ReactNative.sln + msbuildArchitecture: x64 + platform: ${{ matrix.BuildPlatform }} + configuration: ${{ matrix.BuildConfiguration }} + msbuildArguments: /t:Restore - task: DownloadPipelineArtifact@1 displayName: "Download binaries for testing" From 94fdcefa4a04a2ebcaf8fe542077d51eaf184297 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sat, 10 Jul 2021 22:06:44 -0700 Subject: [PATCH 036/149] Set fixed NuGet GlobalPackagesFolder --- .ado/jobs/universal.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.ado/jobs/universal.yml b/.ado/jobs/universal.yml index 1e23cf55066..86eff512cd9 100644 --- a/.ado/jobs/universal.yml +++ b/.ado/jobs/universal.yml @@ -127,19 +127,10 @@ - template: ../templates/prepare-env.yml - - pwsh: | - echo 'checking MSTest packages after restore' - echo "USR: ${env:USERNAME}" - echo 'Checking C:\Users\AzDevOps\.nuget\packages\mstest.*' - Get-ChildItem -Name -Recurse C:\Users\AzDevOps\.nuget\packages\mstest.* -ErrorAction Continue - echo 'Checked C:\Users\AzDevOps\.nuget\packages\mstest.*' - echo "GPF: $(nuget config GlobalPackagesFolder)" - Get-Item Env:\ - displayName: Set NuGet globalPackagesFolder - # Some tasks run on a different user (VssAdministrator) instead of the default user (AzDevOps). # Keep NuGet cache independent from the user directory. - task: NuGetCommand@2 + displayName: Set NuGet globalPackagesFolder inputs: command: custom arguments: config -Set globalPackagesFolder=D:\NugetPackages From 8fdc508686d64767115ed993c400a1ea6dfd88f6 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sat, 10 Jul 2021 22:48:01 -0700 Subject: [PATCH 037/149] Use Pipelines variable to set NUGET_PACKAGES --- .ado/jobs/universal.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.ado/jobs/universal.yml b/.ado/jobs/universal.yml index 86eff512cd9..861fb2cee6e 100644 --- a/.ado/jobs/universal.yml +++ b/.ado/jobs/universal.yml @@ -105,6 +105,12 @@ - job: UniversalTest${{ matrix.Name }} variables: - template: ../variables/vs2019.yml + + # Some tasks run on a different user (VssAdministrator) instead of the default user (AzDevOps). + # Keep NuGet cache independent from the user directory. + - name: NUGET_PACKAGES + value: D:\NugetPackages + displayName: Universal Test ${{ matrix.Name }} dependsOn: - UniversalBuild${{ matrix.Name }} @@ -127,13 +133,9 @@ - template: ../templates/prepare-env.yml - # Some tasks run on a different user (VssAdministrator) instead of the default user (AzDevOps). - # Keep NuGet cache independent from the user directory. - - task: NuGetCommand@2 - displayName: Set NuGet globalPackagesFolder - inputs: - command: custom - arguments: config -Set globalPackagesFolder=D:\NugetPackages + - pwsh: | + Get-Item Env:\ + displayName: TODO - DELETE BEFORE MERGING - task: MSBuild@1 displayName: Restore NuGet packages From 1626cb81478c715154d6863d8679ebde298b052e Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sat, 10 Jul 2021 23:34:22 -0700 Subject: [PATCH 038/149] Try setting globalPkgFolder in the repo NuGet.Config --- .ado/jobs/universal.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.ado/jobs/universal.yml b/.ado/jobs/universal.yml index 861fb2cee6e..2a4c9463cb3 100644 --- a/.ado/jobs/universal.yml +++ b/.ado/jobs/universal.yml @@ -133,6 +133,14 @@ - template: ../templates/prepare-env.yml + # Some tasks run on a different user (VssAdministrator) instead of the default user (AzDevOps). + # Keep NuGet cache independent from the user directory. + - task: NuGetCommand@2 + inputs: + command: Custom + #nugetConfigPath: $(Build.SourcesDirectory)/vnext/NuGet.Config + arguments: config -Set globalPackagesFolder=D:\NugetPackages -ConfigFile $(Build.SourcesDirectory)/vnext/NuGet.Config + - pwsh: | Get-Item Env:\ displayName: TODO - DELETE BEFORE MERGING From d4b31518ebd93f0896b815bf7e2422751658823e Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sun, 11 Jul 2021 00:09:27 -0700 Subject: [PATCH 039/149] Move Vars target to roon Directory.Build.targets --- Directory.Build.targets | 89 ++++++++++++++++++++++++++++++++--- vnext/Directory.Build.targets | 73 ---------------------------- 2 files changed, 82 insertions(+), 80 deletions(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index 2dd4dc78314..bbe5988181a 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -12,8 +12,8 @@ - @@ -27,7 +27,7 @@ > - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vnext/Directory.Build.targets b/vnext/Directory.Build.targets index 7f48f84a4b7..87e1d213833 100644 --- a/vnext/Directory.Build.targets +++ b/vnext/Directory.Build.targets @@ -4,77 +4,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 55662247f36bebe33284c8a4d338894d32901278 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sun, 11 Jul 2021 00:12:50 -0700 Subject: [PATCH 040/149] Fix NuGetCommand typo --- .ado/jobs/universal.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ado/jobs/universal.yml b/.ado/jobs/universal.yml index 2a4c9463cb3..d41dcb25e2b 100644 --- a/.ado/jobs/universal.yml +++ b/.ado/jobs/universal.yml @@ -137,7 +137,7 @@ # Keep NuGet cache independent from the user directory. - task: NuGetCommand@2 inputs: - command: Custom + command: custom #nugetConfigPath: $(Build.SourcesDirectory)/vnext/NuGet.Config arguments: config -Set globalPackagesFolder=D:\NugetPackages -ConfigFile $(Build.SourcesDirectory)/vnext/NuGet.Config From d263c9ad899f1bac52ce290b43440b6e87b2ac52 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sun, 11 Jul 2021 00:17:27 -0700 Subject: [PATCH 041/149] Dont insert newline on MSBuild project files --- .editorconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 02798447647..d119f75b7e7 100644 --- a/.editorconfig +++ b/.editorconfig @@ -22,9 +22,10 @@ indent_size = 4 end_of_line = crlf # Xml project files -[*.{csproj}] +[*.{config,csproj,njsproj,props,targets,vcxitems,vcxproj,vcxproj.filters}] indent_size = 2 end_of_line = crlf +insert_final_newline = false # Xml files [*.{xml,stylecop,resx,ruleset}] From 99da255b8510acbd9c7a0e5f58ccc8e215399180 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sun, 11 Jul 2021 02:00:10 -0700 Subject: [PATCH 042/149] Refactor Playground projects --- Directory.Build.props | 4 +++ .../playground-win32/Playground-win32.vcxproj | 31 ++++++------------- packages/playground/windows/playground.sln | 4 +-- .../windows/playground/Playground.vcxproj | 24 ++++++-------- vnext/PropertySheets/JSEngine.props | 6 ++-- vnext/PropertySheets/React.Cpp.props | 4 --- 6 files changed, 29 insertions(+), 44 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 36331f290c2..bc631685e60 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -20,4 +20,8 @@ $(AssetTargetFallback);native + + + + diff --git a/packages/playground/windows/playground-win32/Playground-win32.vcxproj b/packages/playground/windows/playground-win32/Playground-win32.vcxproj index 3003e895621..55565100a47 100644 --- a/packages/playground/windows/playground-win32/Playground-win32.vcxproj +++ b/packages/playground/windows/playground-win32/Playground-win32.vcxproj @@ -1,6 +1,5 @@ - {8B88FFAE-4DBC-49A2-AFA5-D2477D4AD189} @@ -22,6 +21,9 @@ 10.0 10.0 + + false + $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\ @@ -66,7 +68,8 @@ - + + False 867D41FE5091AED426000143497EA4DFC29A8097 @@ -127,6 +130,11 @@ + + + + + This project references targets in your node_modules\react-native-windows folder. The missing file is {0}. @@ -134,23 +142,4 @@ - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - diff --git a/packages/playground/windows/playground.sln b/packages/playground/windows/playground.sln index 07078cf42b1..c731032e67f 100644 --- a/packages/playground/windows/playground.sln +++ b/packages/playground/windows/playground.sln @@ -43,12 +43,12 @@ Global ..\..\..\vnext\Shared\Shared.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4 EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|ARM64 = Debug|ARM64 Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 - Release|ARM64 = Release|ARM64 + Debug|ARM64 = Debug|ARM64 Release|x64 = Release|x64 Release|x86 = Release|x86 + Release|ARM64 = Release|ARM64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {6B6AA847-B32F-41AC-9D3B-48A8CDFA8ADE}.Debug|ARM64.ActiveCfg = Debug|ARM64 diff --git a/packages/playground/windows/playground/Playground.vcxproj b/packages/playground/windows/playground/Playground.vcxproj index 382d328f2d4..78ee85fdd3c 100644 --- a/packages/playground/windows/playground/Playground.vcxproj +++ b/packages/playground/windows/playground/Playground.vcxproj @@ -1,6 +1,5 @@ - true @@ -19,6 +18,9 @@ False false + + false + $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\ @@ -72,7 +74,8 @@ - + + @@ -183,6 +186,11 @@ + + + + + This project references targets in your node_modules\react-native-windows folder. The missing file is {0}. @@ -191,17 +199,5 @@ - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - \ No newline at end of file diff --git a/vnext/PropertySheets/JSEngine.props b/vnext/PropertySheets/JSEngine.props index d22006f4208..2221a2d4541 100644 --- a/vnext/PropertySheets/JSEngine.props +++ b/vnext/PropertySheets/JSEngine.props @@ -4,15 +4,15 @@ false 0.8.0-staging3 - $(SolutionDir)packages\ReactNative.Hermes.Windows.$(HermesVersion) + $(NuGetPackageRoot)\ReactNative.Hermes.Windows\$(HermesVersion) uwp false false 0.64.17 - $(SolutionDir)packages\ReactNative.V8Jsi.Windows.$(V8Version) - $(SolutionDir)packages\ReactNative.V8Jsi.Windows.UWP.$(V8Version) + $(NuGetPackageRoot)\ReactNative.V8Jsi.Windows.$(V8Version) + $(NuGetPackageRoot)\ReactNative.V8Jsi.Windows.UWP.$(V8Version) diff --git a/vnext/PropertySheets/React.Cpp.props b/vnext/PropertySheets/React.Cpp.props index 47a9a134b26..9e7bcee7d66 100644 --- a/vnext/PropertySheets/React.Cpp.props +++ b/vnext/PropertySheets/React.Cpp.props @@ -129,8 +129,4 @@ - - - - From 5ca670393ea9ee4ec2cab60fc36bd762c005218b Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sun, 11 Jul 2021 02:19:25 -0700 Subject: [PATCH 043/149] Revert --- .ado/jobs/universal.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.ado/jobs/universal.yml b/.ado/jobs/universal.yml index d41dcb25e2b..1ddacfe809f 100644 --- a/.ado/jobs/universal.yml +++ b/.ado/jobs/universal.yml @@ -105,12 +105,6 @@ - job: UniversalTest${{ matrix.Name }} variables: - template: ../variables/vs2019.yml - - # Some tasks run on a different user (VssAdministrator) instead of the default user (AzDevOps). - # Keep NuGet cache independent from the user directory. - - name: NUGET_PACKAGES - value: D:\NugetPackages - displayName: Universal Test ${{ matrix.Name }} dependsOn: - UniversalBuild${{ matrix.Name }} @@ -143,6 +137,9 @@ - pwsh: | Get-Item Env:\ + ls $(Build.SourcesDirectory)/vnext/NuGet.Config -ErrorAction Continue + Get-Content $(Build.SourcesDirectory)/vnext/NuGet.Config -ErrorAction Continue + echo "$(nuget.exe config globalPackagesFolder)" displayName: TODO - DELETE BEFORE MERGING - task: MSBuild@1 From ca003b22ba1cc2f5d590f95b8829b8431ce66dba Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sun, 11 Jul 2021 02:40:54 -0700 Subject: [PATCH 044/149] Remove packages.config from playground --- packages/playground/packages.config | 6 ------ .../windows/playground-win32/Playground-win32.vcxproj | 1 - .../playground/windows/playground-win32/packages.config | 6 ------ packages/playground/windows/playground/Playground.vcxproj | 1 - .../windows/playground/Playground.vcxproj.filters | 1 - packages/playground/windows/playground/packages.config | 6 ------ 6 files changed, 21 deletions(-) delete mode 100644 packages/playground/packages.config delete mode 100644 packages/playground/windows/playground-win32/packages.config delete mode 100644 packages/playground/windows/playground/packages.config diff --git a/packages/playground/packages.config b/packages/playground/packages.config deleted file mode 100644 index 75e1a720e92..00000000000 --- a/packages/playground/packages.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/packages/playground/windows/playground-win32/Playground-win32.vcxproj b/packages/playground/windows/playground-win32/Playground-win32.vcxproj index 55565100a47..a53402919f8 100644 --- a/packages/playground/windows/playground-win32/Playground-win32.vcxproj +++ b/packages/playground/windows/playground-win32/Playground-win32.vcxproj @@ -108,7 +108,6 @@ - diff --git a/packages/playground/windows/playground-win32/packages.config b/packages/playground/windows/playground-win32/packages.config deleted file mode 100644 index 9a77cb41407..00000000000 --- a/packages/playground/windows/playground-win32/packages.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/packages/playground/windows/playground/Playground.vcxproj b/packages/playground/windows/playground/Playground.vcxproj index 78ee85fdd3c..f3412e02806 100644 --- a/packages/playground/windows/playground/Playground.vcxproj +++ b/packages/playground/windows/playground/Playground.vcxproj @@ -153,7 +153,6 @@ - diff --git a/packages/playground/windows/playground/Playground.vcxproj.filters b/packages/playground/windows/playground/Playground.vcxproj.filters index 52c1ce6bbf9..303c1bff758 100644 --- a/packages/playground/windows/playground/Playground.vcxproj.filters +++ b/packages/playground/windows/playground/Playground.vcxproj.filters @@ -53,7 +53,6 @@ - diff --git a/packages/playground/windows/playground/packages.config b/packages/playground/windows/playground/packages.config deleted file mode 100644 index d933808f534..00000000000 --- a/packages/playground/windows/playground/packages.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From 9753d3e3ca52ac8801909db8d6e0fb54ea26c5e8 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sun, 11 Jul 2021 02:43:43 -0700 Subject: [PATCH 045/149] Revert "Set ToolsVersion to Current" This reverts commit 3841826d8cbe757a5ceef231b57ba1d9be7ba9d2. --- vnext/Chakra/Chakra.vcxitems.filters | 4 ++-- vnext/Common/Common.vcxproj | 2 +- vnext/Common/Common.vcxproj.filters | 2 +- .../React.Windows.Desktop.ABITests.vcxproj | 2 +- .../React.Windows.Desktop.ABITests.vcxproj.filters | 2 +- vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj | 2 +- .../Desktop.DLL/React.Windows.Desktop.DLL.vcxproj.filters | 2 +- .../React.Windows.Desktop.IntegrationTests.vcxproj | 2 +- ...React.Windows.Desktop.IntegrationTests.vcxproj.filters | 2 +- .../React.Windows.Desktop.Test.DLL.vcxproj | 2 +- .../React.Windows.Desktop.Test.DLL.vcxproj.filters | 2 +- .../React.Windows.Desktop.UnitTests.vcxproj | 2 +- .../React.Windows.Desktop.UnitTests.vcxproj.filters | 2 +- vnext/Desktop/React.Windows.Desktop.vcxproj | 2 +- vnext/Desktop/React.Windows.Desktop.vcxproj.filters | 2 +- vnext/Folly/Folly.vcxproj | 2 +- vnext/Folly/Folly.vcxproj.filters | 2 +- vnext/FollyWin32/FollyWin32.vcxproj | 2 +- vnext/FollyWin32/FollyWin32.vcxproj.filters | 2 +- .../React.Windows.IntegrationTests.vcxproj | 2 +- .../React.Windows.IntegrationTests.vcxproj.filters | 2 +- .../Microsoft.ReactNative.ComponentTests.vcxproj | 2 +- .../Microsoft.ReactNative.ComponentTests.vcxproj.filters | 2 +- .../PropertySheet.props | 6 +++--- .../Microsoft.ReactNative.Cxx.UnitTests.vcxproj | 2 +- .../PropertySheet.props | 6 +++--- .../Microsoft.ReactNative.Cxx.vcxitems.filters | 4 ++-- .../Microsoft.ReactNative.IntegrationTests.vcxproj | 2 +- ...Microsoft.ReactNative.IntegrationTests.vcxproj.filters | 2 +- .../Properties/PublishProfiles/DeployAsTool-Debug.pubxml | 6 +++--- .../PublishProfiles/DeployAsTool-Release.pubxml | 6 +++--- .../Microsoft.ReactNative.Managed.UnitTests.csproj | 4 ++-- .../Microsoft.ReactNative.Managed.csproj | 2 +- vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj | 2 +- .../Microsoft.ReactNative.vcxproj.filters | 2 +- vnext/Microsoft.ReactNative/PropertySheet.props | 2 +- vnext/Mso.UnitTests/Mso.UnitTests.vcxproj | 2 +- vnext/Mso.UnitTests/Mso.UnitTests.vcxproj.filters | 2 +- vnext/Mso.UnitTests/PropertySheet.props | 6 +++--- vnext/Mso/Mso.vcxitems.filters | 4 ++-- vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj | 2 +- .../ReactCommon.UnitTests.vcxproj.filters | 2 +- vnext/ReactCommon/ReactCommon.vcxproj | 2 +- vnext/ReactCommon/ReactCommon.vcxproj.filters | 2 +- vnext/Scripts/OpenSSL.targets | 2 +- vnext/Shared/Shared.vcxitems.filters | 4 ++-- vnext/Test/React.Windows.Test.vcxproj | 2 +- vnext/Test/React.Windows.Test.vcxproj.filters | 2 +- vnext/fmt/fmt.vcxproj | 8 ++++---- vnext/fmt/fmt.vcxproj.filters | 2 +- vnext/include/Include.vcxitems.filters | 2 +- vnext/template/cpp-app/proj/MyApp.vcxproj | 2 +- vnext/template/cpp-app/proj/MyApp.vcxproj.filters | 2 +- vnext/template/cpp-app/src/PropertySheet.props | 6 +++--- vnext/template/cpp-lib/proj/MyLib.vcxproj | 2 +- vnext/template/cpp-lib/proj/MyLib.vcxproj.filters | 2 +- vnext/template/cpp-lib/src/PropertySheet.props | 6 +++--- vnext/template/cs-app/proj/MyApp.csproj | 2 +- vnext/template/cs-lib/proj/MyLib.csproj | 2 +- 59 files changed, 81 insertions(+), 81 deletions(-) diff --git a/vnext/Chakra/Chakra.vcxitems.filters b/vnext/Chakra/Chakra.vcxitems.filters index 162b2fed478..973b49ea227 100644 --- a/vnext/Chakra/Chakra.vcxitems.filters +++ b/vnext/Chakra/Chakra.vcxitems.filters @@ -1,5 +1,5 @@  - + Source Files @@ -54,4 +54,4 @@ {0dfeba50-d70d-48b9-aae9-cc2583d59b72} - + \ No newline at end of file diff --git a/vnext/Common/Common.vcxproj b/vnext/Common/Common.vcxproj index f706af5b3ba..099bec61d8c 100644 --- a/vnext/Common/Common.vcxproj +++ b/vnext/Common/Common.vcxproj @@ -1,5 +1,5 @@ - + {FCA38F3C-7C73-4C47-BE4E-32F77FA8538D} Common diff --git a/vnext/Common/Common.vcxproj.filters b/vnext/Common/Common.vcxproj.filters index 44f7804c4ec..a0e4d13c565 100644 --- a/vnext/Common/Common.vcxproj.filters +++ b/vnext/Common/Common.vcxproj.filters @@ -1,5 +1,5 @@  - + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} diff --git a/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj b/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj index 507a41d92f0..af800e33b1a 100644 --- a/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj +++ b/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj @@ -1,5 +1,5 @@ - + Debug diff --git a/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj.filters b/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj.filters index 80b4c97066e..45d1e071971 100644 --- a/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj.filters +++ b/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj.filters @@ -1,5 +1,5 @@  - + {dd007ef2-0241-4f4c-bac8-916c537375a3} diff --git a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj index 2755a557610..6849c29c71c 100644 --- a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj +++ b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj @@ -1,5 +1,5 @@ - + Debug diff --git a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj.filters b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj.filters index eaeba891315..63b72b207d4 100644 --- a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj.filters +++ b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj.filters @@ -1,5 +1,5 @@ - + diff --git a/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj b/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj index 89106eeed87..ff62c8e45de 100644 --- a/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj +++ b/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj @@ -1,5 +1,5 @@ - + Debug diff --git a/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj.filters b/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj.filters index 329b7487af9..f5deaf0fb7d 100644 --- a/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj.filters +++ b/vnext/Desktop.IntegrationTests/React.Windows.Desktop.IntegrationTests.vcxproj.filters @@ -1,5 +1,5 @@  - + {858e83fd-2806-4740-83f5-cecd131aaf54} diff --git a/vnext/Desktop.Test.DLL/React.Windows.Desktop.Test.DLL.vcxproj b/vnext/Desktop.Test.DLL/React.Windows.Desktop.Test.DLL.vcxproj index ac9b27f34b1..4c23b151245 100644 --- a/vnext/Desktop.Test.DLL/React.Windows.Desktop.Test.DLL.vcxproj +++ b/vnext/Desktop.Test.DLL/React.Windows.Desktop.Test.DLL.vcxproj @@ -1,5 +1,5 @@ - + Debug diff --git a/vnext/Desktop.Test.DLL/React.Windows.Desktop.Test.DLL.vcxproj.filters b/vnext/Desktop.Test.DLL/React.Windows.Desktop.Test.DLL.vcxproj.filters index bac21ab293f..90c78d70e42 100644 --- a/vnext/Desktop.Test.DLL/React.Windows.Desktop.Test.DLL.vcxproj.filters +++ b/vnext/Desktop.Test.DLL/React.Windows.Desktop.Test.DLL.vcxproj.filters @@ -1,5 +1,5 @@ - + diff --git a/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj b/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj index 6aaa67bcb05..68ddd9ba56d 100644 --- a/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj +++ b/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj @@ -1,5 +1,5 @@ - + diff --git a/vnext/Microsoft.ReactNative.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.vcxproj b/vnext/Microsoft.ReactNative.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.vcxproj index da58dfaba73..2fa5a288ce6 100644 --- a/vnext/Microsoft.ReactNative.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.vcxproj +++ b/vnext/Microsoft.ReactNative.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.vcxproj @@ -1,5 +1,5 @@ - + true true diff --git a/vnext/Microsoft.ReactNative.Cxx.UnitTests/PropertySheet.props b/vnext/Microsoft.ReactNative.Cxx.UnitTests/PropertySheet.props index a88ff47dd56..c6b0691ddda 100644 --- a/vnext/Microsoft.ReactNative.Cxx.UnitTests/PropertySheet.props +++ b/vnext/Microsoft.ReactNative.Cxx.UnitTests/PropertySheet.props @@ -1,15 +1,15 @@ - + diff --git a/vnext/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems.filters b/vnext/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems.filters index 5c9104f0fd4..d434610c3b6 100644 --- a/vnext/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems.filters +++ b/vnext/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems.filters @@ -1,5 +1,5 @@  - + @@ -161,4 +161,4 @@ - + \ No newline at end of file diff --git a/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj b/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj index 4e028c37b32..c1c14be0307 100644 --- a/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj +++ b/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj @@ -1,5 +1,5 @@ - + true 16.0 diff --git a/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj.filters b/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj.filters index ad4030aaada..cea05b7279e 100644 --- a/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj.filters +++ b/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj.filters @@ -1,5 +1,5 @@  - + diff --git a/vnext/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Debug.pubxml b/vnext/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Debug.pubxml index edd908c1043..1dcec77ce7d 100644 --- a/vnext/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Debug.pubxml +++ b/vnext/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Debug.pubxml @@ -1,7 +1,7 @@ - - + FileSystem Debug @@ -11,4 +11,4 @@ win-x64 true - + \ No newline at end of file diff --git a/vnext/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Release.pubxml b/vnext/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Release.pubxml index c7aec33e722..8054eeac3b9 100644 --- a/vnext/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Release.pubxml +++ b/vnext/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Release.pubxml @@ -1,7 +1,7 @@ - - + FileSystem Release @@ -11,4 +11,4 @@ win-x64 true - + \ No newline at end of file diff --git a/vnext/Microsoft.ReactNative.Managed.UnitTests/Microsoft.ReactNative.Managed.UnitTests.csproj b/vnext/Microsoft.ReactNative.Managed.UnitTests/Microsoft.ReactNative.Managed.UnitTests.csproj index 28f2aa95d60..5df4dc7deed 100644 --- a/vnext/Microsoft.ReactNative.Managed.UnitTests/Microsoft.ReactNative.Managed.UnitTests.csproj +++ b/vnext/Microsoft.ReactNative.Managed.UnitTests/Microsoft.ReactNative.Managed.UnitTests.csproj @@ -1,5 +1,5 @@  - + Debug @@ -154,7 +154,7 @@ - - + true true diff --git a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters index f9fae9cbab7..0af8b7e20cd 100644 --- a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters +++ b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters @@ -1,5 +1,5 @@  - + diff --git a/vnext/Microsoft.ReactNative/PropertySheet.props b/vnext/Microsoft.ReactNative/PropertySheet.props index 5b718b12519..064dec08100 100644 --- a/vnext/Microsoft.ReactNative/PropertySheet.props +++ b/vnext/Microsoft.ReactNative/PropertySheet.props @@ -1,5 +1,5 @@ - + diff --git a/vnext/Mso/Mso.vcxitems.filters b/vnext/Mso/Mso.vcxitems.filters index b95544ef0aa..4c26330395f 100644 --- a/vnext/Mso/Mso.vcxitems.filters +++ b/vnext/Mso/Mso.vcxitems.filters @@ -1,5 +1,5 @@  - + {4a2ca748-edd3-4161-a833-233130d84d4e} @@ -422,4 +422,4 @@ dispatchQueue - + \ No newline at end of file diff --git a/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj b/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj index 84266af6fb5..ca9b1363ab5 100644 --- a/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj +++ b/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj @@ -1,5 +1,5 @@  - + Debug diff --git a/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj.filters b/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj.filters index e588628c0e6..d28c4706ee8 100644 --- a/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj.filters +++ b/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj.filters @@ -1,5 +1,5 @@  - + diff --git a/vnext/ReactCommon/ReactCommon.vcxproj b/vnext/ReactCommon/ReactCommon.vcxproj index 9a0e48c9e89..69278884da5 100644 --- a/vnext/ReactCommon/ReactCommon.vcxproj +++ b/vnext/ReactCommon/ReactCommon.vcxproj @@ -1,5 +1,5 @@ - + {A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD} StaticLibrary diff --git a/vnext/ReactCommon/ReactCommon.vcxproj.filters b/vnext/ReactCommon/ReactCommon.vcxproj.filters index a84e741aac6..18379fe2a1a 100644 --- a/vnext/ReactCommon/ReactCommon.vcxproj.filters +++ b/vnext/ReactCommon/ReactCommon.vcxproj.filters @@ -1,5 +1,5 @@ - + {7f5b0b9a-6a9b-4927-b92e-b796d8722357} diff --git a/vnext/Scripts/OpenSSL.targets b/vnext/Scripts/OpenSSL.targets index 444fe3b9bf6..80725f18b35 100644 --- a/vnext/Scripts/OpenSSL.targets +++ b/vnext/Scripts/OpenSSL.targets @@ -1,5 +1,5 @@ - + diff --git a/vnext/Shared/Shared.vcxitems.filters b/vnext/Shared/Shared.vcxitems.filters index 63619570aa3..4bc0d9eceb3 100644 --- a/vnext/Shared/Shared.vcxitems.filters +++ b/vnext/Shared/Shared.vcxitems.filters @@ -1,5 +1,5 @@  - + Source Files\AsyncStorage @@ -378,4 +378,4 @@ Source Files\tracing - + \ No newline at end of file diff --git a/vnext/Test/React.Windows.Test.vcxproj b/vnext/Test/React.Windows.Test.vcxproj index 4265eecb2a3..7330f560c80 100644 --- a/vnext/Test/React.Windows.Test.vcxproj +++ b/vnext/Test/React.Windows.Test.vcxproj @@ -1,5 +1,5 @@  - + {CD0415C6-D908-4212-9481-49BE41F58D27} StaticLibrary diff --git a/vnext/Test/React.Windows.Test.vcxproj.filters b/vnext/Test/React.Windows.Test.vcxproj.filters index 8b6094b9506..49f5456f640 100644 --- a/vnext/Test/React.Windows.Test.vcxproj.filters +++ b/vnext/Test/React.Windows.Test.vcxproj.filters @@ -1,5 +1,5 @@  - + {bdc1e148-e9fb-46a5-83c5-8d7436c3ad0c} diff --git a/vnext/fmt/fmt.vcxproj b/vnext/fmt/fmt.vcxproj index c8562ee29e4..ff3864ffe79 100644 --- a/vnext/fmt/fmt.vcxproj +++ b/vnext/fmt/fmt.vcxproj @@ -1,5 +1,5 @@  - + {14b93dc8-fd93-4a6d-81cb-8bc96644501c} StaticLibrary @@ -108,10 +108,10 @@ { - "Registrations": [ + "Registrations": [ { - "Component": { - "Type": "other", + "Component": { + "Type": "other", "Other": { "Name": "fmt", "Version": "$(FmtVersion)", diff --git a/vnext/fmt/fmt.vcxproj.filters b/vnext/fmt/fmt.vcxproj.filters index fcee29200c4..8cc617a390f 100644 --- a/vnext/fmt/fmt.vcxproj.filters +++ b/vnext/fmt/fmt.vcxproj.filters @@ -1,5 +1,5 @@  - + {8df08a42-4d9d-4736-abe2-f47e12084103} diff --git a/vnext/include/Include.vcxitems.filters b/vnext/include/Include.vcxitems.filters index 50f84993403..ab89d510b82 100644 --- a/vnext/include/Include.vcxitems.filters +++ b/vnext/include/Include.vcxitems.filters @@ -1,5 +1,5 @@  - + Shared diff --git a/vnext/template/cpp-app/proj/MyApp.vcxproj b/vnext/template/cpp-app/proj/MyApp.vcxproj index 54fb4d67d02..2d12bf43136 100644 --- a/vnext/template/cpp-app/proj/MyApp.vcxproj +++ b/vnext/template/cpp-app/proj/MyApp.vcxproj @@ -1,5 +1,5 @@ - + {{#cppNugetPackages}} {{#propsTopOfFile}} diff --git a/vnext/template/cpp-app/proj/MyApp.vcxproj.filters b/vnext/template/cpp-app/proj/MyApp.vcxproj.filters index ac1d0479836..2aa08b712a1 100644 --- a/vnext/template/cpp-app/proj/MyApp.vcxproj.filters +++ b/vnext/template/cpp-app/proj/MyApp.vcxproj.filters @@ -1,5 +1,5 @@  - + diff --git a/vnext/template/cpp-app/src/PropertySheet.props b/vnext/template/cpp-app/src/PropertySheet.props index ae89ceead8e..5942ba395bb 100644 --- a/vnext/template/cpp-app/src/PropertySheet.props +++ b/vnext/template/cpp-app/src/PropertySheet.props @@ -1,15 +1,15 @@ - + diff --git a/vnext/template/cpp-lib/proj/MyLib.vcxproj b/vnext/template/cpp-lib/proj/MyLib.vcxproj index 8bed339394a..ed290578a6c 100644 --- a/vnext/template/cpp-lib/proj/MyLib.vcxproj +++ b/vnext/template/cpp-lib/proj/MyLib.vcxproj @@ -1,5 +1,5 @@ - + {{#cppNugetPackages}} {{#propsTopOfFile}} diff --git a/vnext/template/cpp-lib/proj/MyLib.vcxproj.filters b/vnext/template/cpp-lib/proj/MyLib.vcxproj.filters index 53959d16ba4..84e1f4f0c99 100644 --- a/vnext/template/cpp-lib/proj/MyLib.vcxproj.filters +++ b/vnext/template/cpp-lib/proj/MyLib.vcxproj.filters @@ -1,5 +1,5 @@  - + diff --git a/vnext/template/cpp-lib/src/PropertySheet.props b/vnext/template/cpp-lib/src/PropertySheet.props index ae89ceead8e..5942ba395bb 100644 --- a/vnext/template/cpp-lib/src/PropertySheet.props +++ b/vnext/template/cpp-lib/src/PropertySheet.props @@ -1,15 +1,15 @@ - + diff --git a/vnext/template/cs-app/proj/MyApp.csproj b/vnext/template/cs-app/proj/MyApp.csproj index 89160998e94..a524765874f 100644 --- a/vnext/template/cs-app/proj/MyApp.csproj +++ b/vnext/template/cs-app/proj/MyApp.csproj @@ -1,5 +1,5 @@  - + diff --git a/vnext/template/cs-lib/proj/MyLib.csproj b/vnext/template/cs-lib/proj/MyLib.csproj index fcc5a6ea3e2..e074ffec0ff 100644 --- a/vnext/template/cs-lib/proj/MyLib.csproj +++ b/vnext/template/cs-lib/proj/MyLib.csproj @@ -1,5 +1,5 @@  - + $([MSBuild]::GetDirectoryNameOfFileAbove($(SolutionDir), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\ From 3b7ac9a04e50c25253fd0bd6679d2e15e6655cf1 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sun, 11 Jul 2021 03:11:06 -0700 Subject: [PATCH 046/149] Set cache path in repo root NuGet.config --- .ado/jobs/universal.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.ado/jobs/universal.yml b/.ado/jobs/universal.yml index 1ddacfe809f..e4110b18f87 100644 --- a/.ado/jobs/universal.yml +++ b/.ado/jobs/universal.yml @@ -73,6 +73,21 @@ clean: false submodules: false + #TODO: DELETE BEFORE MERGING + # Some tasks run on a different user (VssAdministrator) instead of the default user (AzDevOps). + # Keep NuGet cache independent from the user directory. + - task: NuGetCommand@2 + displayName: Set fixed NuGet cache + inputs: + command: custom + nugetConfigPath: $(Build.SourcesDirectory)/NuGet.Config + arguments: config -Set globalPackagesFolder=D:\NugetPackages + - pwsh: | + Get-Item Env:\ + Get-Content $(Build.SourcesDirectory)/NuGet.Config -ErrorAction Continue + echo "$(nuget.exe config globalPackagesFolder)" + displayName: TODO - DELETE BEFORE MERGING + - template: ../templates/apply-published-version-vars.yml - template: ../templates/build-rnw.yml @@ -130,15 +145,15 @@ # Some tasks run on a different user (VssAdministrator) instead of the default user (AzDevOps). # Keep NuGet cache independent from the user directory. - task: NuGetCommand@2 + displayName: Set fixed NuGet cache inputs: command: custom #nugetConfigPath: $(Build.SourcesDirectory)/vnext/NuGet.Config - arguments: config -Set globalPackagesFolder=D:\NugetPackages -ConfigFile $(Build.SourcesDirectory)/vnext/NuGet.Config + arguments: config -Set globalPackagesFolder=D:\NugetPackages -ConfigFile $(Build.SourcesDirectory)/NuGet.Config - pwsh: | Get-Item Env:\ - ls $(Build.SourcesDirectory)/vnext/NuGet.Config -ErrorAction Continue - Get-Content $(Build.SourcesDirectory)/vnext/NuGet.Config -ErrorAction Continue + Get-Content $(Build.SourcesDirectory)/NuGet.Config -ErrorAction Continue echo "$(nuget.exe config globalPackagesFolder)" displayName: TODO - DELETE BEFORE MERGING From a02c3e75c210ccee2e40bb9da37bac2ad471f898 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sun, 11 Jul 2021 03:17:33 -0700 Subject: [PATCH 047/149] Fix Folly.vcxproj indentation --- .ado/windows-vs-pr.yml | 1 + vnext/Folly/Folly.vcxproj | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.ado/windows-vs-pr.yml b/.ado/windows-vs-pr.yml index 99c583fa9b2..ac2ce17d530 100644 --- a/.ado/windows-vs-pr.yml +++ b/.ado/windows-vs-pr.yml @@ -10,6 +10,7 @@ pr: variables: - template: variables/msbuild.yml - group: platform-override-zero-permission-token + #TODO: DELETE BEFORE MERGING - name: system.debug value: true diff --git a/vnext/Folly/Folly.vcxproj b/vnext/Folly/Folly.vcxproj index bcd946399fe..374ebb48ce8 100644 --- a/vnext/Folly/Folly.vcxproj +++ b/vnext/Folly/Folly.vcxproj @@ -6,9 +6,9 @@ Folly Folly en-US - Windows Store - 10.0 - true + Windows Store + 10.0 + true From 07af898f55bbc119f0dc6b82004deadeeb3bdfe9 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sun, 11 Jul 2021 03:32:57 -0700 Subject: [PATCH 048/149] Use Windows PowerShell for custom agent pool --- .ado/jobs/universal.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ado/jobs/universal.yml b/.ado/jobs/universal.yml index e4110b18f87..7e2d6306b68 100644 --- a/.ado/jobs/universal.yml +++ b/.ado/jobs/universal.yml @@ -82,7 +82,7 @@ command: custom nugetConfigPath: $(Build.SourcesDirectory)/NuGet.Config arguments: config -Set globalPackagesFolder=D:\NugetPackages - - pwsh: | + - powershell: | Get-Item Env:\ Get-Content $(Build.SourcesDirectory)/NuGet.Config -ErrorAction Continue echo "$(nuget.exe config globalPackagesFolder)" From 9ef1abf0c4ffd71daac4144e891d411bb70783da Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sun, 11 Jul 2021 03:42:34 -0700 Subject: [PATCH 049/149] Install NuGet --- .ado/jobs/universal.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.ado/jobs/universal.yml b/.ado/jobs/universal.yml index 7e2d6306b68..666f0c003ce 100644 --- a/.ado/jobs/universal.yml +++ b/.ado/jobs/universal.yml @@ -76,6 +76,9 @@ #TODO: DELETE BEFORE MERGING # Some tasks run on a different user (VssAdministrator) instead of the default user (AzDevOps). # Keep NuGet cache independent from the user directory. + - task: NuGetToolInstaller@0 + inputs: + versionSpec: ">=5.8.0" - task: NuGetCommand@2 displayName: Set fixed NuGet cache inputs: From 887993b22881e2522efc46d9eb16c09d19d54d9f Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sun, 11 Jul 2021 04:21:09 -0700 Subject: [PATCH 050/149] Increase test timeout to 10 min --- .ado/jobs/universal.yml | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/.ado/jobs/universal.yml b/.ado/jobs/universal.yml index 666f0c003ce..84cb48c3531 100644 --- a/.ado/jobs/universal.yml +++ b/.ado/jobs/universal.yml @@ -73,24 +73,6 @@ clean: false submodules: false - #TODO: DELETE BEFORE MERGING - # Some tasks run on a different user (VssAdministrator) instead of the default user (AzDevOps). - # Keep NuGet cache independent from the user directory. - - task: NuGetToolInstaller@0 - inputs: - versionSpec: ">=5.8.0" - - task: NuGetCommand@2 - displayName: Set fixed NuGet cache - inputs: - command: custom - nugetConfigPath: $(Build.SourcesDirectory)/NuGet.Config - arguments: config -Set globalPackagesFolder=D:\NugetPackages - - powershell: | - Get-Item Env:\ - Get-Content $(Build.SourcesDirectory)/NuGet.Config -ErrorAction Continue - echo "$(nuget.exe config globalPackagesFolder)" - displayName: TODO - DELETE BEFORE MERGING - - template: ../templates/apply-published-version-vars.yml - template: ../templates/build-rnw.yml @@ -151,8 +133,8 @@ displayName: Set fixed NuGet cache inputs: command: custom - #nugetConfigPath: $(Build.SourcesDirectory)/vnext/NuGet.Config - arguments: config -Set globalPackagesFolder=D:\NugetPackages -ConfigFile $(Build.SourcesDirectory)/NuGet.Config + nugetConfigPath: $(Build.SourcesDirectory)/NuGet.Config + arguments: config -Set globalPackagesFolder=D:\NugetPackages - pwsh: | Get-Item Env:\ @@ -187,7 +169,8 @@ - task: VSTest@2 displayName: Run Universal Unit Tests (Native) - timeoutInMinutes: 5 # Set smaller timeout , due to hangs + #TODO: REVERT BEFORE MERGE + timeoutInMinutes: 10 # Set smaller timeout , due to hangs inputs: testSelector: testAssemblies testAssemblyVer2: | From 83c4ab00f6b7fa8929c0e9eed64014375d06c35c Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sun, 11 Jul 2021 05:08:55 -0700 Subject: [PATCH 051/149] Migrate integrationtest.vcxproj --- .../cli/src/runWindows/utils/msbuildtools.ts | 2 +- .../windows/integrationtest.sln | 4 ++-- .../integrationtest/integrationtest.vcxproj | 23 ++++++------------- .../windows/integrationtest/packages.config | 6 ----- 4 files changed, 10 insertions(+), 25 deletions(-) delete mode 100644 packages/integration-test-app/windows/integrationtest/packages.config diff --git a/packages/@react-native-windows/cli/src/runWindows/utils/msbuildtools.ts b/packages/@react-native-windows/cli/src/runWindows/utils/msbuildtools.ts index c4a49592386..4a1aaa913dd 100644 --- a/packages/@react-native-windows/cli/src/runWindows/utils/msbuildtools.ts +++ b/packages/@react-native-windows/cli/src/runWindows/utils/msbuildtools.ts @@ -104,7 +104,7 @@ export default class MSBuildTools { } if (target === 'build') { - args.push('/restore', '/p:RestorePackagesConfig=true'); + args.push('/restore'); } else { args.push(`/t:Deploy`); } diff --git a/packages/integration-test-app/windows/integrationtest.sln b/packages/integration-test-app/windows/integrationtest.sln index 73ba1a1a7bc..1980af7b54f 100644 --- a/packages/integration-test-app/windows/integrationtest.sln +++ b/packages/integration-test-app/windows/integrationtest.sln @@ -54,12 +54,12 @@ Global ..\..\..\vnext\Shared\Shared.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4 EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|ARM64 = Debug|ARM64 Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 - Release|ARM64 = Release|ARM64 + Debug|ARM64 = Debug|ARM64 Release|x64 = Release|x64 Release|x86 = Release|x86 + Release|ARM64 = Release|ARM64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {A24C443D-B107-4594-9F15-2CD83732B6CE}.Debug|ARM64.ActiveCfg = Debug|ARM64 diff --git a/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj b/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj index 17098c9d055..3a26b6994e8 100644 --- a/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj +++ b/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj @@ -1,6 +1,5 @@ - true true @@ -73,7 +72,8 @@ - + + @@ -178,6 +178,11 @@ Designer + + + + + @@ -189,18 +194,4 @@ - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - \ No newline at end of file diff --git a/packages/integration-test-app/windows/integrationtest/packages.config b/packages/integration-test-app/windows/integrationtest/packages.config deleted file mode 100644 index dbde6239c81..00000000000 --- a/packages/integration-test-app/windows/integrationtest/packages.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From c6064c382543e3cac99d68ce0fd66f8cc07f6455 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sun, 11 Jul 2021 05:46:27 -0700 Subject: [PATCH 052/149] Migrate NodeRpc --- Directory.Build.targets | 1 + .../integrationtest/integrationtest.vcxproj | 5 +++++ .../windows/NodeRpc/NodeRpc.vcxproj | 22 +++++++------------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index bbe5988181a..395a8277ff3 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -116,6 +116,7 @@ + diff --git a/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj b/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj index 3a26b6994e8..4bda5c107b7 100644 --- a/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj +++ b/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj @@ -16,6 +16,11 @@ 10.0.16299.0 false + + false + + $(AssetTargetFallback);uap10.0.16299 + $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\ diff --git a/packages/node-rnw-rpc/windows/NodeRpc/NodeRpc.vcxproj b/packages/node-rnw-rpc/windows/NodeRpc/NodeRpc.vcxproj index a1079427c13..0fe711f0bbf 100644 --- a/packages/node-rnw-rpc/windows/NodeRpc/NodeRpc.vcxproj +++ b/packages/node-rnw-rpc/windows/NodeRpc/NodeRpc.vcxproj @@ -1,6 +1,5 @@ - true true @@ -16,6 +15,9 @@ 10.0.19041.0 10.0.16299.0 + + false + $([MSBuild]::GetDirectoryNameOfFileAbove($(SolutionDir), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\ @@ -71,7 +73,8 @@ - + + @@ -141,6 +144,9 @@ + + + @@ -152,16 +158,4 @@ - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - \ No newline at end of file From 155e11836bde570eaf55e7ecdf4ac4ab02c3fdfb Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sun, 11 Jul 2021 14:06:32 -0700 Subject: [PATCH 053/149] Change files --- ...e-windows-cli-ac509dc6-adc1-4fc7-bb5d-2715683316a0.json | 7 +++++++ .../node-rnw-rpc-6fae19ab-7d3e-488e-83c6-cb979474aebb.json | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 change/@react-native-windows-cli-ac509dc6-adc1-4fc7-bb5d-2715683316a0.json create mode 100644 change/node-rnw-rpc-6fae19ab-7d3e-488e-83c6-cb979474aebb.json diff --git a/change/@react-native-windows-cli-ac509dc6-adc1-4fc7-bb5d-2715683316a0.json b/change/@react-native-windows-cli-ac509dc6-adc1-4fc7-bb5d-2715683316a0.json new file mode 100644 index 00000000000..4988f7a49f6 --- /dev/null +++ b/change/@react-native-windows-cli-ac509dc6-adc1-4fc7-bb5d-2715683316a0.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Use PackageReference for C++ dependencies", + "packageName": "@react-native-windows/cli", + "email": "julio.rocha@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/node-rnw-rpc-6fae19ab-7d3e-488e-83c6-cb979474aebb.json b/change/node-rnw-rpc-6fae19ab-7d3e-488e-83c6-cb979474aebb.json new file mode 100644 index 00000000000..ee88b95f095 --- /dev/null +++ b/change/node-rnw-rpc-6fae19ab-7d3e-488e-83c6-cb979474aebb.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Use PackageReference for C++ dependencies", + "packageName": "node-rnw-rpc", + "email": "julio.rocha@microsoft.com", + "dependentChangeType": "patch" +} From 716eb7da190e460f7d0ff05bc73f1e9fd8a3a22d Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sun, 11 Jul 2021 14:53:27 -0700 Subject: [PATCH 054/149] Set NUGET_PACKAGES in both Universal build and test jobs --- .ado/jobs/universal.yml | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/.ado/jobs/universal.yml b/.ado/jobs/universal.yml index 84cb48c3531..266e70b1d50 100644 --- a/.ado/jobs/universal.yml +++ b/.ado/jobs/universal.yml @@ -63,6 +63,11 @@ - job: UniversalBuild${{ matrix.Name }} variables: - template: ../variables/vs2019.yml + + # Some tasks run on a different user (VssAdministrator) instead of the default user (AzDevOps). + # Keep NuGet cache independent from the user directory. + - name: NUGET_PACKAGES + value: D:\NugetPackages displayName: Universal Build ${{ matrix.Name }} pool: $(AgentPool.Large) timeoutInMinutes: 60 @@ -73,6 +78,16 @@ clean: false submodules: false + #TODO: DELETE BEFORE MERGING + # The commit tag in the nuspec requires that we use at least nuget 5.8 (because things break with nuget versions before and Vs 16.8 or later) + - task: NuGetToolInstaller@0 + inputs: + versionSpec: ">=5.8.0" + - powershell: | + Get-Item Env:\ + Get-Content $(Build.SourcesDirectory)/NuGet.Config -ErrorAction Continue + echo "$(nuget.exe config globalPackagesFolder)" + displayName: TODO - DELETE BEFORE MERGING - template: ../templates/apply-published-version-vars.yml - template: ../templates/build-rnw.yml @@ -105,6 +120,12 @@ - job: UniversalTest${{ matrix.Name }} variables: - template: ../variables/vs2019.yml + + # Some tasks run on a different user (VssAdministrator) instead of the default user (AzDevOps). + # Keep NuGet cache independent from the user directory. + - name: NUGET_PACKAGES + value: D:\NugetPackages + displayName: Universal Test ${{ matrix.Name }} dependsOn: - UniversalBuild${{ matrix.Name }} @@ -127,14 +148,14 @@ - template: ../templates/prepare-env.yml - # Some tasks run on a different user (VssAdministrator) instead of the default user (AzDevOps). - # Keep NuGet cache independent from the user directory. - - task: NuGetCommand@2 - displayName: Set fixed NuGet cache - inputs: - command: custom - nugetConfigPath: $(Build.SourcesDirectory)/NuGet.Config - arguments: config -Set globalPackagesFolder=D:\NugetPackages + # # Some tasks run on a different user (VssAdministrator) instead of the default user (AzDevOps). + # # Keep NuGet cache independent from the user directory. + # - task: NuGetCommand@2 + # displayName: Set fixed NuGet cache + # inputs: + # command: custom + # nugetConfigPath: $(Build.SourcesDirectory)/NuGet.Config + # arguments: config -Set globalPackagesFolder=D:\NugetPackages - pwsh: | Get-Item Env:\ From 59f1c4a9790d2fc5fc173357fcc70d8291ffc8b0 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sun, 11 Jul 2021 15:47:04 -0700 Subject: [PATCH 055/149] Remove monitoring steps from Universal --- .ado/jobs/universal.yml | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/.ado/jobs/universal.yml b/.ado/jobs/universal.yml index 266e70b1d50..53c04c79909 100644 --- a/.ado/jobs/universal.yml +++ b/.ado/jobs/universal.yml @@ -78,16 +78,6 @@ clean: false submodules: false - #TODO: DELETE BEFORE MERGING - # The commit tag in the nuspec requires that we use at least nuget 5.8 (because things break with nuget versions before and Vs 16.8 or later) - - task: NuGetToolInstaller@0 - inputs: - versionSpec: ">=5.8.0" - - powershell: | - Get-Item Env:\ - Get-Content $(Build.SourcesDirectory)/NuGet.Config -ErrorAction Continue - echo "$(nuget.exe config globalPackagesFolder)" - displayName: TODO - DELETE BEFORE MERGING - template: ../templates/apply-published-version-vars.yml - template: ../templates/build-rnw.yml @@ -148,21 +138,6 @@ - template: ../templates/prepare-env.yml - # # Some tasks run on a different user (VssAdministrator) instead of the default user (AzDevOps). - # # Keep NuGet cache independent from the user directory. - # - task: NuGetCommand@2 - # displayName: Set fixed NuGet cache - # inputs: - # command: custom - # nugetConfigPath: $(Build.SourcesDirectory)/NuGet.Config - # arguments: config -Set globalPackagesFolder=D:\NugetPackages - - - pwsh: | - Get-Item Env:\ - Get-Content $(Build.SourcesDirectory)/NuGet.Config -ErrorAction Continue - echo "$(nuget.exe config globalPackagesFolder)" - displayName: TODO - DELETE BEFORE MERGING - - task: MSBuild@1 displayName: Restore NuGet packages inputs: From dc89edf28b3c21a23027039d3a4e4b60e3f4884e Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sun, 11 Jul 2021 16:58:09 -0700 Subject: [PATCH 056/149] Migrate sample-apps --- packages/sample-apps/packages.config | 4 ---- .../windows/SampleAppCPP/SampleAppCpp.vcxproj | 23 ++++++++----------- packages/sample-apps/windows/SampleApps.sln | 4 ++-- .../SampleLibraryCPP/SampleLibraryCPP.vcxproj | 17 +++++--------- 4 files changed, 18 insertions(+), 30 deletions(-) delete mode 100644 packages/sample-apps/packages.config diff --git a/packages/sample-apps/packages.config b/packages/sample-apps/packages.config deleted file mode 100644 index ec800fea9cd..00000000000 --- a/packages/sample-apps/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/packages/sample-apps/windows/SampleAppCPP/SampleAppCpp.vcxproj b/packages/sample-apps/windows/SampleAppCPP/SampleAppCpp.vcxproj index 1ab5ab20af4..53a357df98d 100644 --- a/packages/sample-apps/windows/SampleAppCPP/SampleAppCpp.vcxproj +++ b/packages/sample-apps/windows/SampleAppCPP/SampleAppCpp.vcxproj @@ -16,8 +16,12 @@ 10.0.16299.0 True + + false + + $(AssetTargetFallback);uap10.0.16299 + - $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\ true @@ -176,6 +180,11 @@ Designer + + + + + @@ -187,16 +196,4 @@ - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - diff --git a/packages/sample-apps/windows/SampleApps.sln b/packages/sample-apps/windows/SampleApps.sln index d9ffb080da5..e61df7627fd 100644 --- a/packages/sample-apps/windows/SampleApps.sln +++ b/packages/sample-apps/windows/SampleApps.sln @@ -55,12 +55,12 @@ Global ..\..\..\vnext\Shared\Shared.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4 EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|ARM64 = Debug|ARM64 Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 - Release|ARM64 = Release|ARM64 + Debug|ARM64 = Debug|ARM64 Release|x64 = Release|x64 Release|x86 = Release|x86 + Release|ARM64 = Release|ARM64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {09F4E6C1-2D12-4059-AA96-0B190861FD6A}.Debug|ARM64.ActiveCfg = Debug|ARM64 diff --git a/packages/sample-apps/windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj b/packages/sample-apps/windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj index d6285623f20..46515fa71f1 100644 --- a/packages/sample-apps/windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj +++ b/packages/sample-apps/windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj @@ -15,8 +15,10 @@ 10.0.19041.0 10.0.16299.0 + + false + - $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\ @@ -148,6 +150,9 @@ true + + + @@ -159,14 +164,4 @@ - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - From 9b9aa0019a70820e6308dea96c62d3363970091e Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Mon, 12 Jul 2021 00:06:33 -0700 Subject: [PATCH 057/149] Update cpp templates --- vnext/template/cpp-app/proj/MyApp.vcxproj | 27 ++++++++++++++++------- vnext/template/cpp-lib/proj/MyLib.vcxproj | 23 +++++++++++-------- 2 files changed, 33 insertions(+), 17 deletions(-) diff --git a/vnext/template/cpp-app/proj/MyApp.vcxproj b/vnext/template/cpp-app/proj/MyApp.vcxproj index 2d12bf43136..67a5ac12275 100644 --- a/vnext/template/cpp-app/proj/MyApp.vcxproj +++ b/vnext/template/cpp-app/proj/MyApp.vcxproj @@ -1,11 +1,11 @@ - {{#cppNugetPackages}} + true true @@ -26,6 +26,11 @@ {{/certificateThumbprint}} password + + false + + + $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\ @@ -72,11 +77,11 @@ true false - {{#cppNugetPackages}} + @@ -87,7 +92,7 @@ - + @@ -166,7 +171,7 @@ - + false @@ -177,6 +182,12 @@ Designer + + {{#cppNugetPackages}} + + {{/cppNugetPackages}} + + @@ -188,7 +199,7 @@ - + diff --git a/vnext/template/cpp-lib/proj/MyLib.vcxproj b/vnext/template/cpp-lib/proj/MyLib.vcxproj index ed290578a6c..ceabe3b4ffa 100644 --- a/vnext/template/cpp-lib/proj/MyLib.vcxproj +++ b/vnext/template/cpp-lib/proj/MyLib.vcxproj @@ -1,11 +1,11 @@ - {{#cppNugetPackages}} + true true @@ -68,11 +68,11 @@ true false - {{#cppNugetPackages}} + @@ -83,9 +83,8 @@ - + - @@ -134,9 +133,15 @@ - + + + {{#cppNugetPackages}} + + {{/cppNugetPackages}} + + @@ -148,7 +153,7 @@ - + From f8289e4634d6fccdc0a5dc83a532e3eb8bbca1ae Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Mon, 12 Jul 2021 02:27:04 -0700 Subject: [PATCH 058/149] Clear vnext/templates package.config references --- vnext/template/cpp-app/proj/MyApp.vcxproj | 34 ------------------- .../cpp-app/proj/MyApp.vcxproj.filters | 1 - vnext/template/cpp-app/proj/packages.config | 6 ---- vnext/template/cpp-lib/proj/MyLib.vcxproj | 33 ------------------ .../cpp-lib/proj/MyLib.vcxproj.filters | 1 - vnext/template/cpp-lib/proj/packages.config | 6 ---- 6 files changed, 81 deletions(-) delete mode 100644 vnext/template/cpp-app/proj/packages.config delete mode 100644 vnext/template/cpp-lib/proj/packages.config diff --git a/vnext/template/cpp-app/proj/MyApp.vcxproj b/vnext/template/cpp-app/proj/MyApp.vcxproj index 67a5ac12275..e466c2c596e 100644 --- a/vnext/template/cpp-app/proj/MyApp.vcxproj +++ b/vnext/template/cpp-app/proj/MyApp.vcxproj @@ -1,11 +1,6 @@ - true true @@ -77,11 +72,6 @@ true false - @@ -92,7 +82,6 @@ - @@ -171,7 +160,6 @@ - false @@ -199,26 +187,4 @@ - diff --git a/vnext/template/cpp-app/proj/MyApp.vcxproj.filters b/vnext/template/cpp-app/proj/MyApp.vcxproj.filters index 2aa08b712a1..879b3fea1e8 100644 --- a/vnext/template/cpp-app/proj/MyApp.vcxproj.filters +++ b/vnext/template/cpp-app/proj/MyApp.vcxproj.filters @@ -52,7 +52,6 @@ - diff --git a/vnext/template/cpp-app/proj/packages.config b/vnext/template/cpp-app/proj/packages.config deleted file mode 100644 index 8d7c1f27ca8..00000000000 --- a/vnext/template/cpp-app/proj/packages.config +++ /dev/null @@ -1,6 +0,0 @@ - - - {{#packagesConfigCppNugetPackages}} - - {{/packagesConfigCppNugetPackages}} - \ No newline at end of file diff --git a/vnext/template/cpp-lib/proj/MyLib.vcxproj b/vnext/template/cpp-lib/proj/MyLib.vcxproj index ceabe3b4ffa..67bfab798f1 100644 --- a/vnext/template/cpp-lib/proj/MyLib.vcxproj +++ b/vnext/template/cpp-lib/proj/MyLib.vcxproj @@ -1,11 +1,6 @@ - true true @@ -68,11 +63,6 @@ true false - @@ -133,7 +123,6 @@ - @@ -153,26 +142,4 @@ - diff --git a/vnext/template/cpp-lib/proj/MyLib.vcxproj.filters b/vnext/template/cpp-lib/proj/MyLib.vcxproj.filters index 84e1f4f0c99..64aaa16ee13 100644 --- a/vnext/template/cpp-lib/proj/MyLib.vcxproj.filters +++ b/vnext/template/cpp-lib/proj/MyLib.vcxproj.filters @@ -15,6 +15,5 @@ - \ No newline at end of file diff --git a/vnext/template/cpp-lib/proj/packages.config b/vnext/template/cpp-lib/proj/packages.config deleted file mode 100644 index 8d7c1f27ca8..00000000000 --- a/vnext/template/cpp-lib/proj/packages.config +++ /dev/null @@ -1,6 +0,0 @@ - - - {{#packagesConfigCppNugetPackages}} - - {{/packagesConfigCppNugetPackages}} - \ No newline at end of file From 5f2f077eac0ec6496e1f4568bf23af4acf793178 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Mon, 12 Jul 2021 03:34:20 -0700 Subject: [PATCH 059/149] Remove most cli references to packages.config --- .../cli/src/e2etest/projectConfig.utils.ts | 7 ------- .../cli/src/generator-windows/index.ts | 8 -------- .../windows/integrationtest/integrationtest.vcxproj | 1 - .../integrationtest/integrationtest.vcxproj.filters | 1 - packages/node-rnw-rpc/windows/NodeRpc/NodeRpc.vcxproj | 1 - .../node-rnw-rpc/windows/NodeRpc/NodeRpc.vcxproj.filters | 1 - packages/playground/OpenWinUI3Win32PG.ps1 | 4 +--- .../sample-apps/windows/SampleAppCPP/SampleAppCpp.vcxproj | 1 - .../windows/SampleAppCPP/SampleAppCpp.vcxproj.filters | 1 - .../windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj | 1 - .../SampleLibraryCPP/SampleLibraryCPP.vcxproj.filters | 1 - 11 files changed, 1 insertion(+), 26 deletions(-) diff --git a/packages/@react-native-windows/cli/src/e2etest/projectConfig.utils.ts b/packages/@react-native-windows/cli/src/e2etest/projectConfig.utils.ts index 3df4f4daacd..3237753b35c 100644 --- a/packages/@react-native-windows/cli/src/e2etest/projectConfig.utils.ts +++ b/packages/@react-native-windows/cli/src/e2etest/projectConfig.utils.ts @@ -66,13 +66,6 @@ export async function ensureWinUI3Project(folder: string) { null ); - await copyAndReplace( - path.join(templateRoot, 'cpp-app/proj/packages.config'), - path.join(projDir, 'packages.config'), - replacements, - null - ); - await copyAndReplace( path.join(templateRoot, 'shared-app/proj/ExperimentalFeatures.props'), path.join(windowsDir, 'ExperimentalFeatures.props'), diff --git a/packages/@react-native-windows/cli/src/generator-windows/index.ts b/packages/@react-native-windows/cli/src/generator-windows/index.ts index e26dfe8c98d..913ded80314 100644 --- a/packages/@react-native-windows/cli/src/generator-windows/index.ts +++ b/packages/@react-native-windows/cli/src/generator-windows/index.ts @@ -439,10 +439,6 @@ export async function copyProjectTemplateAndReplace( newProjectName + '.vcxproj.filters', ), }, - { - from: path.join(srcPath, projDir, 'packages.config'), - to: path.join(windowsDir, newProjectName, 'packages.config'), - }, ] : [ // cpp lib mappings @@ -470,10 +466,6 @@ export async function copyProjectTemplateAndReplace( newProjectName + '.def', ), }, - { - from: path.join(srcPath, projDir, 'packages.config'), - to: path.join(windowsDir, newProjectName, 'packages.config'), - }, ]; for (const mapping of cppMappings) { diff --git a/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj b/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj index 4bda5c107b7..e0b9e5aeb28 100644 --- a/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj +++ b/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj @@ -172,7 +172,6 @@ - false diff --git a/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj.filters b/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj.filters index 926d47d139d..405b8557476 100644 --- a/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj.filters +++ b/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj.filters @@ -62,7 +62,6 @@ - diff --git a/packages/node-rnw-rpc/windows/NodeRpc/NodeRpc.vcxproj b/packages/node-rnw-rpc/windows/NodeRpc/NodeRpc.vcxproj index 0fe711f0bbf..100b5659a3d 100644 --- a/packages/node-rnw-rpc/windows/NodeRpc/NodeRpc.vcxproj +++ b/packages/node-rnw-rpc/windows/NodeRpc/NodeRpc.vcxproj @@ -141,7 +141,6 @@ - diff --git a/packages/node-rnw-rpc/windows/NodeRpc/NodeRpc.vcxproj.filters b/packages/node-rnw-rpc/windows/NodeRpc/NodeRpc.vcxproj.filters index a8ce44833ae..33defd77bb1 100644 --- a/packages/node-rnw-rpc/windows/NodeRpc/NodeRpc.vcxproj.filters +++ b/packages/node-rnw-rpc/windows/NodeRpc/NodeRpc.vcxproj.filters @@ -12,7 +12,6 @@ - diff --git a/packages/playground/OpenWinUI3Win32PG.ps1 b/packages/playground/OpenWinUI3Win32PG.ps1 index ba8d7d57e46..edca2b8e09d 100644 --- a/packages/playground/OpenWinUI3Win32PG.ps1 +++ b/packages/playground/OpenWinUI3Win32PG.ps1 @@ -5,7 +5,7 @@ param(# Parameter help description # First, you have to download the nuget package from the internal CI here (or use a newer one) # pipeline: https://microsoft.visualstudio.com/WinUI/_build?definitionId=38157 # package link: https://microsoft.visualstudio.com/_apis/resources/Containers/38370988/packaging?itemPath=packaging%2FMicrosoft.WinUI.3.0.0-development.200707.1-CI.nupkg -# (only works for authenticated Microsoft users) +# (only works for authenticated Microsoft users) # if (!((Test-Path $PackagePath) -and $PackagePath.EndsWith('.nupkg'))) { @@ -31,8 +31,6 @@ $to = (Split-Path $PackagePath -Leaf).Replace('Microsoft.WinUI.', '').Replace('. # Convert WinUI from 3.0.0-preview2.200713.0 to 3.0.0-development.200706.1-CI $filesToUpdate = @( "$rnwDir\vnext\PropertySheets\WinUI.props", - "$rnwDir\vnext\Microsoft.ReactNative\packages.config", - "$rnwDir\packages\playground\windows\playground\packages.config" ); foreach ($filePath in $filesToUpdate) { diff --git a/packages/sample-apps/windows/SampleAppCPP/SampleAppCpp.vcxproj b/packages/sample-apps/windows/SampleAppCPP/SampleAppCpp.vcxproj index 53a357df98d..0404325c503 100644 --- a/packages/sample-apps/windows/SampleAppCPP/SampleAppCpp.vcxproj +++ b/packages/sample-apps/windows/SampleAppCPP/SampleAppCpp.vcxproj @@ -125,7 +125,6 @@ Designer - diff --git a/packages/sample-apps/windows/SampleAppCPP/SampleAppCpp.vcxproj.filters b/packages/sample-apps/windows/SampleAppCPP/SampleAppCpp.vcxproj.filters index 37d6ce40caa..d85218185bb 100644 --- a/packages/sample-apps/windows/SampleAppCPP/SampleAppCpp.vcxproj.filters +++ b/packages/sample-apps/windows/SampleAppCPP/SampleAppCpp.vcxproj.filters @@ -53,7 +53,6 @@ - diff --git a/packages/sample-apps/windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj b/packages/sample-apps/windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj index 46515fa71f1..b145ed4fece 100644 --- a/packages/sample-apps/windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj +++ b/packages/sample-apps/windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj @@ -136,7 +136,6 @@ - diff --git a/packages/sample-apps/windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj.filters b/packages/sample-apps/windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj.filters index a3d6dd54524..f6d99672856 100644 --- a/packages/sample-apps/windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj.filters +++ b/packages/sample-apps/windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj.filters @@ -31,7 +31,6 @@ - From a3d411c7b71bf8ca362b3a8e5df65bf6ed818d2e Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Mon, 12 Jul 2021 04:07:58 -0700 Subject: [PATCH 060/149] Revert timeout --- .ado/jobs/universal.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.ado/jobs/universal.yml b/.ado/jobs/universal.yml index 53c04c79909..200fe1b7bcc 100644 --- a/.ado/jobs/universal.yml +++ b/.ado/jobs/universal.yml @@ -165,8 +165,7 @@ - task: VSTest@2 displayName: Run Universal Unit Tests (Native) - #TODO: REVERT BEFORE MERGE - timeoutInMinutes: 10 # Set smaller timeout , due to hangs + timeoutInMinutes: 5 # Set smaller timeout , due to hangs inputs: testSelector: testAssemblies testAssemblyVer2: | From 8fe709b09f7ebef71dc5a9e133c3f7817bbe7fef Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Mon, 12 Jul 2021 19:21:06 -0700 Subject: [PATCH 061/149] Use the correct CppWinRT version in the TS generator --- .../cli/src/generator-windows/index.ts | 2 +- .../node-rnw-rpc/windows/NodeRpc/packages.config | 4 ---- .../windows/SampleAppCPP/packages.config | 5 ----- .../windows/SampleLibraryCPP/packages.config | 4 ---- ....ReactNative.Managed.CodeGen.UnitTests.csproj | 16 ++++++++-------- vnext/template/cpp-app/proj/MyApp.sln | 4 ++-- vnext/template/cpp-lib/proj/MyLib.sln | 4 ++-- vnext/template/cs-app/proj/MyApp.sln | 4 ++-- vnext/template/cs-lib/proj/MyLib.sln | 4 ++-- 9 files changed, 17 insertions(+), 30 deletions(-) delete mode 100644 packages/node-rnw-rpc/windows/NodeRpc/packages.config delete mode 100644 packages/sample-apps/windows/SampleAppCPP/packages.config delete mode 100644 packages/sample-apps/windows/SampleLibraryCPP/packages.config diff --git a/packages/@react-native-windows/cli/src/generator-windows/index.ts b/packages/@react-native-windows/cli/src/generator-windows/index.ts index 913ded80314..f242ed2fac9 100644 --- a/packages/@react-native-windows/cli/src/generator-windows/index.ts +++ b/packages/@react-native-windows/cli/src/generator-windows/index.ts @@ -236,7 +236,7 @@ export async function copyProjectTemplateAndReplace( const cppNugetPackages: CppNugetPackage[] = [ { id: 'Microsoft.Windows.CppWinRT', - version: '2.0.210312.4', + version: '2.0.210708.4', propsTopOfFile: true, hasProps: true, hasTargets: true, diff --git a/packages/node-rnw-rpc/windows/NodeRpc/packages.config b/packages/node-rnw-rpc/windows/NodeRpc/packages.config deleted file mode 100644 index 3c3b8f6cfd9..00000000000 --- a/packages/node-rnw-rpc/windows/NodeRpc/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/packages/sample-apps/windows/SampleAppCPP/packages.config b/packages/sample-apps/windows/SampleAppCPP/packages.config deleted file mode 100644 index db511d2079c..00000000000 --- a/packages/sample-apps/windows/SampleAppCPP/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/packages/sample-apps/windows/SampleLibraryCPP/packages.config b/packages/sample-apps/windows/SampleLibraryCPP/packages.config deleted file mode 100644 index 6c97f38a2e5..00000000000 --- a/packages/sample-apps/windows/SampleLibraryCPP/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/vnext/Microsoft.ReactNative.Managed.CodeGen.UnitTests/Microsoft.ReactNative.Managed.CodeGen.UnitTests.csproj b/vnext/Microsoft.ReactNative.Managed.CodeGen.UnitTests/Microsoft.ReactNative.Managed.CodeGen.UnitTests.csproj index 9fce3f8da06..c1a98887365 100644 --- a/vnext/Microsoft.ReactNative.Managed.CodeGen.UnitTests/Microsoft.ReactNative.Managed.CodeGen.UnitTests.csproj +++ b/vnext/Microsoft.ReactNative.Managed.CodeGen.UnitTests/Microsoft.ReactNative.Managed.CodeGen.UnitTests.csproj @@ -21,8 +21,8 @@ - diff --git a/vnext/template/cpp-app/proj/MyApp.sln b/vnext/template/cpp-app/proj/MyApp.sln index d66cc5f02d2..19a0828c26b 100644 --- a/vnext/template/cpp-app/proj/MyApp.sln +++ b/vnext/template/cpp-app/proj/MyApp.sln @@ -52,12 +52,12 @@ Global EndGlobalSection {{/useExperimentalNuget}} GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|ARM64 = Debug|ARM64 Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 - Release|ARM64 = Release|ARM64 + Debug|ARM64 = Debug|ARM64 Release|x64 = Release|x64 Release|x86 = Release|x86 + Release|ARM64 = Release|ARM64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {{ projectGuidUpper }}.Debug|ARM64.ActiveCfg = Debug|ARM64 diff --git a/vnext/template/cpp-lib/proj/MyLib.sln b/vnext/template/cpp-lib/proj/MyLib.sln index d66cc5f02d2..19a0828c26b 100644 --- a/vnext/template/cpp-lib/proj/MyLib.sln +++ b/vnext/template/cpp-lib/proj/MyLib.sln @@ -52,12 +52,12 @@ Global EndGlobalSection {{/useExperimentalNuget}} GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|ARM64 = Debug|ARM64 Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 - Release|ARM64 = Release|ARM64 + Debug|ARM64 = Debug|ARM64 Release|x64 = Release|x64 Release|x86 = Release|x86 + Release|ARM64 = Release|ARM64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {{ projectGuidUpper }}.Debug|ARM64.ActiveCfg = Debug|ARM64 diff --git a/vnext/template/cs-app/proj/MyApp.sln b/vnext/template/cs-app/proj/MyApp.sln index e51e891d687..ac487d903b2 100644 --- a/vnext/template/cs-app/proj/MyApp.sln +++ b/vnext/template/cs-app/proj/MyApp.sln @@ -51,12 +51,12 @@ Global EndGlobalSection {{/useExperimentalNuget}} GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|ARM64 = Debug|ARM64 Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 - Release|ARM64 = Release|ARM64 + Debug|ARM64 = Debug|ARM64 Release|x64 = Release|x64 Release|x86 = Release|x86 + Release|ARM64 = Release|ARM64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {{ projectGuidUpper }}.Debug|ARM64.ActiveCfg = Debug|ARM64 diff --git a/vnext/template/cs-lib/proj/MyLib.sln b/vnext/template/cs-lib/proj/MyLib.sln index e51e891d687..ac487d903b2 100644 --- a/vnext/template/cs-lib/proj/MyLib.sln +++ b/vnext/template/cs-lib/proj/MyLib.sln @@ -51,12 +51,12 @@ Global EndGlobalSection {{/useExperimentalNuget}} GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|ARM64 = Debug|ARM64 Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 - Release|ARM64 = Release|ARM64 + Debug|ARM64 = Debug|ARM64 Release|x64 = Release|x64 Release|x86 = Release|x86 + Release|ARM64 = Release|ARM64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {{ projectGuidUpper }}.Debug|ARM64.ActiveCfg = Debug|ARM64 From 63f5d1a4d68b6620ba6b3115c0a9f56a8b861fae Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Tue, 13 Jul 2021 01:02:33 -0700 Subject: [PATCH 062/149] Set ResolveNuGetPackages to false in VC Lib template --- vnext/template/cpp-lib/proj/MyLib.vcxproj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vnext/template/cpp-lib/proj/MyLib.vcxproj b/vnext/template/cpp-lib/proj/MyLib.vcxproj index 67bfab798f1..49efd05dd2a 100644 --- a/vnext/template/cpp-lib/proj/MyLib.vcxproj +++ b/vnext/template/cpp-lib/proj/MyLib.vcxproj @@ -17,6 +17,9 @@ 10.0.16299.0 + + false + $([MSBuild]::GetDirectoryNameOfFileAbove($(SolutionDir), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\ {{#useExperimentalNuget}} From 02bb0e9c8516330240ffd70687f154ade28a826d Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Tue, 13 Jul 2021 02:12:19 -0700 Subject: [PATCH 063/149] Update Hermes version references --- .../windows/integrationtest/integrationtest.vcxproj | 2 +- .../windows/playground-win32/Playground-win32.vcxproj | 2 +- packages/playground/windows/playground/Playground.vcxproj | 2 +- vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj b/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj index e0b9e5aeb28..29f288f839d 100644 --- a/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj +++ b/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj @@ -184,7 +184,7 @@ - + diff --git a/packages/playground/windows/playground-win32/Playground-win32.vcxproj b/packages/playground/windows/playground-win32/Playground-win32.vcxproj index a53402919f8..e7fa9133ed2 100644 --- a/packages/playground/windows/playground-win32/Playground-win32.vcxproj +++ b/packages/playground/windows/playground-win32/Playground-win32.vcxproj @@ -132,7 +132,7 @@ - + diff --git a/packages/playground/windows/playground/Playground.vcxproj b/packages/playground/windows/playground/Playground.vcxproj index f3412e02806..018b5856143 100644 --- a/packages/playground/windows/playground/Playground.vcxproj +++ b/packages/playground/windows/playground/Playground.vcxproj @@ -187,7 +187,7 @@ - + diff --git a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj index 42cbfcecbd7..3e955dbf26c 100644 --- a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +++ b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj @@ -778,7 +778,7 @@ - + From ec9487acacbfa84d28085b6a096728163cba4adb Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Tue, 13 Jul 2021 03:10:25 -0700 Subject: [PATCH 064/149] Pass BuildWinUI3Properties to playground CI restore step --- .ado/jobs/playground.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.ado/jobs/playground.yml b/.ado/jobs/playground.yml index 312c5be5006..8ec4687082f 100644 --- a/.ado/jobs/playground.yml +++ b/.ado/jobs/playground.yml @@ -2,9 +2,9 @@ parameters: - name: buildEnvironment type: string default : PullRequest - values: - - PullRequest - - Continuous + values: + - PullRequest + - Continuous jobs: - job: Playground @@ -71,7 +71,9 @@ jobs: msbuildArchitecture: x64 platform: $(BuildPlatform) configuration: $(BuildConfiguration) - msbuildArguments: /t:Restore + msbuildArguments: + /t:Restore + $(BuildWinUI3Properties) - template: ../templates/setup-certificate.yml parameters: From 59e2d0f487d33aecc899bae6a31d99ac2dc834ac Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Tue, 13 Jul 2021 16:29:55 -0700 Subject: [PATCH 065/149] Update vars --- Directory.Build.targets | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index 395a8277ff3..956720c2fc6 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -111,8 +111,18 @@ - + + + + + + + + + + + @@ -131,6 +141,16 @@ + + + + + + + + + + From af601c589b1a60cee64a74099f1862205c30d484 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Tue, 13 Jul 2021 23:04:12 -0700 Subject: [PATCH 066/149] Remove WinUIPackageProps --- Directory.Build.targets | 1 - .../windows/integrationtest/integrationtest.vcxproj | 2 -- packages/node-rnw-rpc/windows/NodeRpc/NodeRpc.vcxproj | 2 -- .../windows/playground-win32/Playground-win32.vcxproj | 2 -- packages/playground/windows/playground/Playground.vcxproj | 2 -- vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj | 2 -- vnext/PropertySheets/WinUI.props | 3 --- vnext/template/cpp-lib/proj/MyLib.vcxproj | 1 - 8 files changed, 15 deletions(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index 956720c2fc6..f35d5b10004 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -148,7 +148,6 @@ - diff --git a/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj b/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj index 005db323e1c..10d5bcf1eb4 100644 --- a/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj +++ b/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj @@ -77,8 +77,6 @@ - - diff --git a/packages/node-rnw-rpc/windows/NodeRpc/NodeRpc.vcxproj b/packages/node-rnw-rpc/windows/NodeRpc/NodeRpc.vcxproj index 7abb86af838..7253ff2d189 100644 --- a/packages/node-rnw-rpc/windows/NodeRpc/NodeRpc.vcxproj +++ b/packages/node-rnw-rpc/windows/NodeRpc/NodeRpc.vcxproj @@ -73,8 +73,6 @@ - - diff --git a/packages/playground/windows/playground-win32/Playground-win32.vcxproj b/packages/playground/windows/playground-win32/Playground-win32.vcxproj index 57e01c7f5c8..8a555822664 100644 --- a/packages/playground/windows/playground-win32/Playground-win32.vcxproj +++ b/packages/playground/windows/playground-win32/Playground-win32.vcxproj @@ -68,8 +68,6 @@ - - False 867D41FE5091AED426000143497EA4DFC29A8097 diff --git a/packages/playground/windows/playground/Playground.vcxproj b/packages/playground/windows/playground/Playground.vcxproj index c4c3f600a39..f0166f3390c 100644 --- a/packages/playground/windows/playground/Playground.vcxproj +++ b/packages/playground/windows/playground/Playground.vcxproj @@ -74,8 +74,6 @@ - - diff --git a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj index 107857e9482..6b316881fe0 100644 --- a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +++ b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj @@ -78,8 +78,6 @@ - - $(GeneratedFilesDir);$(IncludePath) diff --git a/vnext/PropertySheets/WinUI.props b/vnext/PropertySheets/WinUI.props index 23d8ccbbeb6..5b362349f96 100644 --- a/vnext/PropertySheets/WinUI.props +++ b/vnext/PropertySheets/WinUI.props @@ -13,7 +13,6 @@ Microsoft.WinUI $(WinUI3Version) - $(WinUIPackageName).$(WinUIPackageVersion)\build\native\$(WinUIPackageName).props USE_WINUI3;$(DefineConstants) @@ -25,8 +24,6 @@ Microsoft.UI.Xaml $(WinUI2xVersion) - - diff --git a/vnext/template/cpp-lib/proj/MyLib.vcxproj b/vnext/template/cpp-lib/proj/MyLib.vcxproj index d4ec61817b9..3d801bde720 100644 --- a/vnext/template/cpp-lib/proj/MyLib.vcxproj +++ b/vnext/template/cpp-lib/proj/MyLib.vcxproj @@ -76,7 +76,6 @@ - From 99d1e2bed046b74c3b0dda605fa93936c72e2706 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 14 Jul 2021 00:10:39 -0700 Subject: [PATCH 067/149] Remove interface CppNugetPackage. --- Directory.Build.targets | 1 + .../cli/src/e2etest/projectConfig.utils.ts | 6 ----- .../cli/src/generator-windows/index.ts | 23 +------------------ 3 files changed, 2 insertions(+), 28 deletions(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index f35d5b10004..546b901a1bf 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -144,6 +144,7 @@ + diff --git a/packages/@react-native-windows/cli/src/e2etest/projectConfig.utils.ts b/packages/@react-native-windows/cli/src/e2etest/projectConfig.utils.ts index 3237753b35c..bd8dabe6355 100644 --- a/packages/@react-native-windows/cli/src/e2etest/projectConfig.utils.ts +++ b/packages/@react-native-windows/cli/src/e2etest/projectConfig.utils.ts @@ -31,20 +31,14 @@ export async function ensureWinUI3Project(folder: string) { { id: 'Microsoft.ReactNative.Cxx', version: '1.0.0', - hasProps: false, - hasTargets: true, }, { id: 'Microsoft.UI.Xaml', version: '2.3.4.5', - hasProps: false, - hasTargets: false, }, { id: 'Microsoft.WinUI', version: '3.2.1.0', - hasProps: false, - hasTargets: false, }, ], }; diff --git a/packages/@react-native-windows/cli/src/generator-windows/index.ts b/packages/@react-native-windows/cli/src/generator-windows/index.ts index 3713795a686..3108a89c59c 100644 --- a/packages/@react-native-windows/cli/src/generator-windows/index.ts +++ b/packages/@react-native-windows/cli/src/generator-windows/index.ts @@ -88,16 +88,6 @@ interface NugetPackage { version: string; } -/** - * This represents the data to insert nuget packages with Cpp specific information - */ -interface CppNugetPackage extends NugetPackage { - propsTopOfFile?: boolean; - propsMiddleOfFile?: boolean; - hasProps: boolean; - hasTargets: boolean; -} - function pascalCase(str: string) { const camelCase = _.camelCase(str); return camelCase[0].toUpperCase() + camelCase.substr(1); @@ -232,19 +222,14 @@ export async function copyProjectTemplateAndReplace( }, ]; - const cppNugetPackages: CppNugetPackage[] = [ + const cppNugetPackages: NugetPackage[] = [ { id: 'Microsoft.Windows.CppWinRT', version: '2.0.210708.4', - propsTopOfFile: true, - hasProps: true, - hasTargets: true, }, { id: 'ReactNative.Hermes.Windows', version: hermesVersion, - hasProps: false, - hasTargets: true, }, ]; @@ -257,15 +242,11 @@ export async function copyProjectTemplateAndReplace( cppNugetPackages.push({ id: 'Microsoft.ReactNative', version: nugetVersion, - hasProps: false, - hasTargets: true, }); cppNugetPackages.push({ id: 'Microsoft.ReactNative.Cxx', version: nugetVersion, - hasProps: false, - hasTargets: true, }); } @@ -274,8 +255,6 @@ export async function copyProjectTemplateAndReplace( { id: options.useWinUI3 ? 'Microsoft.WinUI' : 'Microsoft.UI.Xaml', version: options.useWinUI3 ? winui3Version : winui2xVersion, - hasProps: false, // WinUI/MUX props and targets get handled by RNW's WinUI.props. - hasTargets: false, }, ]; From cfa58d04e5fcebe52b267f0feafca789c413556c Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Thu, 15 Jul 2021 01:28:04 -0700 Subject: [PATCH 068/149] Set missing TargetFrameworkMoniker instances --- Directory.Build.targets | 1 + vnext/Common/Common.vcxproj | 10 ++++++++++ vnext/Folly/Folly.vcxproj | 10 ++++++++++ .../Microsoft.ReactNative.vcxproj | 10 ++++++++++ vnext/ReactCommon/ReactCommon.vcxproj | 10 ++++++++++ vnext/fmt/fmt.vcxproj | 10 ++++++++++ 6 files changed, 51 insertions(+) diff --git a/Directory.Build.targets b/Directory.Build.targets index 546b901a1bf..67e9b50a0b2 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -82,6 +82,7 @@ + diff --git a/vnext/Common/Common.vcxproj b/vnext/Common/Common.vcxproj index f706af5b3ba..c72c970ab3a 100644 --- a/vnext/Common/Common.vcxproj +++ b/vnext/Common/Common.vcxproj @@ -39,6 +39,16 @@ StaticLibrary + + + Native,Version=v0.0 + diff --git a/vnext/Folly/Folly.vcxproj b/vnext/Folly/Folly.vcxproj index b4a918550fa..999464496f5 100644 --- a/vnext/Folly/Folly.vcxproj +++ b/vnext/Folly/Folly.vcxproj @@ -10,6 +10,16 @@ 10.0 true + + + Native,Version=v0.0 + diff --git a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj index 6b316881fe0..cb97ca6643f 100644 --- a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +++ b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj @@ -20,6 +20,16 @@ true false + + + UAP,Version=v10.0.17134 + diff --git a/vnext/ReactCommon/ReactCommon.vcxproj b/vnext/ReactCommon/ReactCommon.vcxproj index 9a0e48c9e89..eeb0fb87102 100644 --- a/vnext/ReactCommon/ReactCommon.vcxproj +++ b/vnext/ReactCommon/ReactCommon.vcxproj @@ -9,6 +9,16 @@ Windows Store 10.0 + + + Native,Version=v0.0 + diff --git a/vnext/fmt/fmt.vcxproj b/vnext/fmt/fmt.vcxproj index c8562ee29e4..74486276624 100644 --- a/vnext/fmt/fmt.vcxproj +++ b/vnext/fmt/fmt.vcxproj @@ -10,6 +10,16 @@ Windows Store 10.0 + + + Native,Version=v0.0 + From 1db8c767fb630d062cf0bfc693dd0b5e9a1362c4 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Thu, 15 Jul 2021 22:32:14 -0700 Subject: [PATCH 069/149] Fix typo --- .ado/templates/prepare-env.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ado/templates/prepare-env.yml b/.ado/templates/prepare-env.yml index d58a79abb70..b710407881a 100644 --- a/.ado/templates/prepare-env.yml +++ b/.ado/templates/prepare-env.yml @@ -34,7 +34,7 @@ steps: versionSpec: '14.x' - task: CmdLine@2 - displayName: Installing Yarm + displayName: Installing Yarn inputs: script: npm install -g yarn From 7836ec4ca9cc25a3297f933fcaabd1d5012fe089 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Fri, 16 Jul 2021 00:11:06 -0700 Subject: [PATCH 070/149] Re-insert missing TestBundle.targets import --- .../Microsoft.ReactNative.IntegrationTests.vcxproj | 1 + 1 file changed, 1 insertion(+) diff --git a/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj b/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj index 4e028c37b32..6a24630dd4b 100644 --- a/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj +++ b/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj @@ -166,4 +166,5 @@ + \ No newline at end of file From 59d289640ceda8c6bf29f57a4c02b8cc82896b28 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Fri, 16 Jul 2021 00:57:20 -0700 Subject: [PATCH 071/149] Update projectConfig.test --- .../src/e2etest/__snapshots__/projectConfig.test.ts.snap | 8 -------- .../cli/src/e2etest/projectConfig.test.ts | 8 -------- 2 files changed, 16 deletions(-) diff --git a/packages/@react-native-windows/cli/src/e2etest/__snapshots__/projectConfig.test.ts.snap b/packages/@react-native-windows/cli/src/e2etest/__snapshots__/projectConfig.test.ts.snap index a60d7f90b1b..afea5dbcdd9 100644 --- a/packages/@react-native-windows/cli/src/e2etest/__snapshots__/projectConfig.test.ts.snap +++ b/packages/@react-native-windows/cli/src/e2etest/__snapshots__/projectConfig.test.ts.snap @@ -139,14 +139,6 @@ Object { exports[`useWinUI3=true in react-native.config.js, useWinUI3=false in ExperimentalFeatures.props 1`] = ` " - - - -" -`; - -exports[`useWinUI3=true in react-native.config.js, useWinUI3=false in ExperimentalFeatures.props 2`] = ` -" diff --git a/packages/@react-native-windows/cli/src/e2etest/projectConfig.test.ts b/packages/@react-native-windows/cli/src/e2etest/projectConfig.test.ts index 9aab5d6db1a..bf0669f3389 100644 --- a/packages/@react-native-windows/cli/src/e2etest/projectConfig.test.ts +++ b/packages/@react-native-windows/cli/src/e2etest/projectConfig.test.ts @@ -184,19 +184,11 @@ test('useWinUI3=true in react-native.config.js, useWinUI3=false in ExperimentalF const exd = await al.ensureXAMLDialect(); expect(exd).toBeTruthy(); - const packagesConfig = ( - await fs.promises.readFile( - path.join(folder, 'windows/WithWinUI3/packages.config'), - ) - ).toString(); - const experimentalFeatures = ( await fs.promises.readFile( path.join(folder, 'windows/ExperimentalFeatures.props'), ) ).toString(); - expect(packagesConfig.replace(/\r/g, '')).toMatchSnapshot(); - expect(experimentalFeatures.replace(/\r/g, '')).toMatchSnapshot(); }); From 83e7a010072d24367300ab3996b570d0514b5621 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Fri, 16 Jul 2021 01:17:24 -0700 Subject: [PATCH 072/149] Remove commented props --- vnext/template/cpp-app/proj/MyApp.vcxproj | 2 -- 1 file changed, 2 deletions(-) diff --git a/vnext/template/cpp-app/proj/MyApp.vcxproj b/vnext/template/cpp-app/proj/MyApp.vcxproj index 96fc0a18676..2cdc2325588 100644 --- a/vnext/template/cpp-app/proj/MyApp.vcxproj +++ b/vnext/template/cpp-app/proj/MyApp.vcxproj @@ -23,8 +23,6 @@ false - - From 20618bc619dcd0df69bbde1cb9df2d9856f96cb6 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sat, 17 Jul 2021 01:01:14 -0700 Subject: [PATCH 073/149] Conditionally set AssetTargetFallback and TargetFrameworkMoniker --- .ado/templates/react-native-init.yml | 14 ++++++++------ Directory.Build.props | 17 ++++++++++++++--- vnext/Common/Common.vcxproj | 10 ---------- vnext/Folly/Folly.vcxproj | 10 ---------- ...crosoft.ReactNative.Managed.UnitTests.csproj | 3 +++ .../Microsoft.ReactNative.Managed.csproj | 3 +++ .../Microsoft.ReactNative.vcxproj | 10 ---------- vnext/ReactCommon/ReactCommon.vcxproj | 10 ---------- vnext/fmt/fmt.vcxproj | 10 ---------- 9 files changed, 28 insertions(+), 59 deletions(-) diff --git a/.ado/templates/react-native-init.yml b/.ado/templates/react-native-init.yml index c39f4618af8..e6bef1d0f62 100644 --- a/.ado/templates/react-native-init.yml +++ b/.ado/templates/react-native-init.yml @@ -32,9 +32,9 @@ parameters: - name: buildEnvironment type: string default: PullRequest - values: - - PullRequest - - Continuous + values: + - PullRequest + - Continuous steps: - checkout: self # self represents the repo where the initial Pipelines YAML file was found @@ -88,10 +88,11 @@ steps: npmVersion: $(npmVersion) packDesktop: false slices: '("${{ parameters.platform }}.${{ parameters.configuration }}")' - + # Work around issue of parameters not getting expanded in conditions properly - powershell: | Write-Host "##vso[task.setvariable variable=localProjectType]${{ parameters.projectType}}" + displayName: Set project type # We force the usage of npm instead of yarn because yarn has fragility issues when redirected to a different server (such as verdaccio) # We use --no-install and symlink the node_modules from the source tree to avoid having npx download react-native and all it dependencies @@ -104,14 +105,14 @@ steps: npx --no-install react-native init testcli --npm --template react-native@$(reactNativeDevDependency) workingDirectory: $(Agent.BuildDirectory) condition: and(succeeded(), eq(variables['localProjectType'], 'app')) - + - task: CmdLine@2 displayName: Init new lib project inputs: script: npx create-react-native-module --package-name "testcli" testcli workingDirectory: $(Agent.BuildDirectory) condition: and(succeeded(), eq(variables['localProjectType'], 'lib')) - + - task: CmdLine@2 displayName: Update lib project react and react-native dev versions inputs: @@ -188,6 +189,7 @@ steps: - powershell: | Write-Host "##vso[task.setvariable variable=localConfig]${{ parameters.configuration}}" Write-Host "##vso[task.setvariable variable=MSBUILDDEBUGPATH]$(Build.StagingDirectory)\CrashDumps" + displayName: Set crash dumps location # Useful info to have in the log, but also a necessary workaround to make sure the cli is cached by npx - task: CmdLine@2 diff --git a/Directory.Build.props b/Directory.Build.props index bc631685e60..cfa393e3c2a 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -11,16 +11,27 @@ $(MSBuildThisFileDirectory)\node_modules\react-native\ $(ReactNativeWindowsDir)\build $(ReactNativeWindowsDir)\target + $(RootIntDir)\ProjectExtensions\$(MSBuildProjectName)\ - - $(RootIntDir)\ProjectExtensions\$(MSBuildProjectName)\ + $(AssetTargetFallback);native + + + native,Version=v0.0 + + - + diff --git a/vnext/Common/Common.vcxproj b/vnext/Common/Common.vcxproj index c72c970ab3a..f706af5b3ba 100644 --- a/vnext/Common/Common.vcxproj +++ b/vnext/Common/Common.vcxproj @@ -39,16 +39,6 @@ StaticLibrary - - - Native,Version=v0.0 - diff --git a/vnext/Folly/Folly.vcxproj b/vnext/Folly/Folly.vcxproj index 999464496f5..b4a918550fa 100644 --- a/vnext/Folly/Folly.vcxproj +++ b/vnext/Folly/Folly.vcxproj @@ -10,16 +10,6 @@ 10.0 true - - - Native,Version=v0.0 - diff --git a/vnext/Microsoft.ReactNative.Managed.UnitTests/Microsoft.ReactNative.Managed.UnitTests.csproj b/vnext/Microsoft.ReactNative.Managed.UnitTests/Microsoft.ReactNative.Managed.UnitTests.csproj index 28f2aa95d60..c2946ce0576 100644 --- a/vnext/Microsoft.ReactNative.Managed.UnitTests/Microsoft.ReactNative.Managed.UnitTests.csproj +++ b/vnext/Microsoft.ReactNative.Managed.UnitTests/Microsoft.ReactNative.Managed.UnitTests.csproj @@ -19,6 +19,9 @@ false false + + $(AssetTargetFallback);native + true $(OutDir)bin\x86\Debug\ diff --git a/vnext/Microsoft.ReactNative.Managed/Microsoft.ReactNative.Managed.csproj b/vnext/Microsoft.ReactNative.Managed/Microsoft.ReactNative.Managed.csproj index a779fc2c100..7427487dd5b 100644 --- a/vnext/Microsoft.ReactNative.Managed/Microsoft.ReactNative.Managed.csproj +++ b/vnext/Microsoft.ReactNative.Managed/Microsoft.ReactNative.Managed.csproj @@ -24,6 +24,9 @@ $(NoWarn);1591 + + $(AssetTargetFallback);native + x86 true diff --git a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj index 0d8d6ecbaa9..ee5964751e3 100644 --- a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +++ b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj @@ -20,16 +20,6 @@ true false - - - UAP,Version=v10.0.17134 - diff --git a/vnext/ReactCommon/ReactCommon.vcxproj b/vnext/ReactCommon/ReactCommon.vcxproj index 13f713acc77..9e56816b4a0 100644 --- a/vnext/ReactCommon/ReactCommon.vcxproj +++ b/vnext/ReactCommon/ReactCommon.vcxproj @@ -9,16 +9,6 @@ Windows Store 10.0 - - - Native,Version=v0.0 - diff --git a/vnext/fmt/fmt.vcxproj b/vnext/fmt/fmt.vcxproj index 74486276624..c8562ee29e4 100644 --- a/vnext/fmt/fmt.vcxproj +++ b/vnext/fmt/fmt.vcxproj @@ -10,16 +10,6 @@ Windows Store 10.0 - - - Native,Version=v0.0 - From d73b7d6108d6e23233f52dc09951c9080ef722f6 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sat, 17 Jul 2021 01:49:13 -0700 Subject: [PATCH 074/149] Patch C# lib and app templates --- .../cli/src/generator-windows/index.ts | 5 +++++ vnext/template/cs-app/proj/Directory.Build.props | 13 +++++++++++++ vnext/template/cs-app/proj/MyApp.csproj | 3 +++ vnext/template/cs-lib/proj/Directory.Build.props | 13 +++++++++++++ vnext/template/cs-lib/proj/MyLib.csproj | 3 +++ 5 files changed, 37 insertions(+) create mode 100644 vnext/template/cs-app/proj/Directory.Build.props create mode 100644 vnext/template/cs-lib/proj/Directory.Build.props diff --git a/packages/@react-native-windows/cli/src/generator-windows/index.ts b/packages/@react-native-windows/cli/src/generator-windows/index.ts index 3108a89c59c..bf3c9066358 100644 --- a/packages/@react-native-windows/cli/src/generator-windows/index.ts +++ b/packages/@react-native-windows/cli/src/generator-windows/index.ts @@ -387,6 +387,11 @@ export async function copyProjectTemplateAndReplace( }, ]; + csMappings.push({ + from: path.join(srcPath, projDir, 'Directory.Build.props'), + to: path.join(windowsDir, 'Directory.Build.props'), + }); + for (const mapping of csMappings) { await copyAndReplaceWithChangedCallback( mapping.from, diff --git a/vnext/template/cs-app/proj/Directory.Build.props b/vnext/template/cs-app/proj/Directory.Build.props new file mode 100644 index 00000000000..a2c34830ee1 --- /dev/null +++ b/vnext/template/cs-app/proj/Directory.Build.props @@ -0,0 +1,13 @@ + + + + + $(AssetTargetFallback);native + native,Version=v0.0 + + + + + + + diff --git a/vnext/template/cs-app/proj/MyApp.csproj b/vnext/template/cs-app/proj/MyApp.csproj index 89160998e94..39e6ee85d5a 100644 --- a/vnext/template/cs-app/proj/MyApp.csproj +++ b/vnext/template/cs-app/proj/MyApp.csproj @@ -32,6 +32,9 @@ true {{/useExperimentalNuget}} + + $(AssetTargetFallback);native + true bin\x86\Debug\ diff --git a/vnext/template/cs-lib/proj/Directory.Build.props b/vnext/template/cs-lib/proj/Directory.Build.props new file mode 100644 index 00000000000..a2c34830ee1 --- /dev/null +++ b/vnext/template/cs-lib/proj/Directory.Build.props @@ -0,0 +1,13 @@ + + + + + $(AssetTargetFallback);native + native,Version=v0.0 + + + + + + + diff --git a/vnext/template/cs-lib/proj/MyLib.csproj b/vnext/template/cs-lib/proj/MyLib.csproj index fcc5a6ea3e2..c415f6bbbba 100644 --- a/vnext/template/cs-lib/proj/MyLib.csproj +++ b/vnext/template/cs-lib/proj/MyLib.csproj @@ -25,6 +25,9 @@ true {{/useExperimentalNuget}} + + $(AssetTargetFallback);native + true bin\x86\Debug\ From 51e0e789652179a6dca1e1c0dc4259203516f19d Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sat, 17 Jul 2021 03:18:05 -0700 Subject: [PATCH 075/149] Set AssetTargetFallback directly in C# projects --- Directory.Build.props | 3 +++ .../windows/ReactUWPTestApp/ReactUWPTestApp.csproj | 3 +++ .../windows/InteropTestModuleCS/InteropTestModuleCS.csproj | 3 +++ packages/sample-apps/windows/SampleAppCS/SampleAppCS.csproj | 3 +++ .../sample-apps/windows/SampleLibraryCS/SampleLibraryCS.csproj | 3 +++ 5 files changed, 15 insertions(+) diff --git a/Directory.Build.props b/Directory.Build.props index cfa393e3c2a..686f62e2266 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -11,6 +11,9 @@ $(MSBuildThisFileDirectory)\node_modules\react-native\ $(ReactNativeWindowsDir)\build $(ReactNativeWindowsDir)\target + + + $(RootIntDir)\ProjectExtensions\$(MSBuildProjectName)\ diff --git a/packages/e2e-test-app/windows/ReactUWPTestApp/ReactUWPTestApp.csproj b/packages/e2e-test-app/windows/ReactUWPTestApp/ReactUWPTestApp.csproj index 885943c7654..4c08184bea3 100644 --- a/packages/e2e-test-app/windows/ReactUWPTestApp/ReactUWPTestApp.csproj +++ b/packages/e2e-test-app/windows/ReactUWPTestApp/ReactUWPTestApp.csproj @@ -24,6 +24,9 @@ false ..\packages + + $(AssetTargetFallback);native + true bin\x86\Debug\ diff --git a/packages/integration-test-app/windows/InteropTestModuleCS/InteropTestModuleCS.csproj b/packages/integration-test-app/windows/InteropTestModuleCS/InteropTestModuleCS.csproj index cef8ff7e85b..724dcb34a52 100644 --- a/packages/integration-test-app/windows/InteropTestModuleCS/InteropTestModuleCS.csproj +++ b/packages/integration-test-app/windows/InteropTestModuleCS/InteropTestModuleCS.csproj @@ -23,6 +23,9 @@ false 7.3 + + $(AssetTargetFallback);native + x86 true diff --git a/packages/sample-apps/windows/SampleAppCS/SampleAppCS.csproj b/packages/sample-apps/windows/SampleAppCS/SampleAppCS.csproj index 45b647b7937..4a5c8016814 100644 --- a/packages/sample-apps/windows/SampleAppCS/SampleAppCS.csproj +++ b/packages/sample-apps/windows/SampleAppCS/SampleAppCS.csproj @@ -24,6 +24,9 @@ false 7.3 + + $(AssetTargetFallback);native + true bin\x86\Debug\ diff --git a/packages/sample-apps/windows/SampleLibraryCS/SampleLibraryCS.csproj b/packages/sample-apps/windows/SampleLibraryCS/SampleLibraryCS.csproj index ddaee66ef09..875a690b25b 100644 --- a/packages/sample-apps/windows/SampleLibraryCS/SampleLibraryCS.csproj +++ b/packages/sample-apps/windows/SampleLibraryCS/SampleLibraryCS.csproj @@ -23,6 +23,9 @@ false 7.3 + + $(AssetTargetFallback);native + x86 true From 7510a378688049550f0c866bd74b8680cbf60f9f Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sat, 17 Jul 2021 14:48:40 -0700 Subject: [PATCH 076/149] Remove redundant NuGetToolInstaller@0 instances --- .ado/jobs/nuget-desktop.yml | 6 +----- .ado/jobs/project-reunion.yml | 4 ---- .ado/publish.yml | 11 +++-------- .ado/templates/prep-and-pack-nuget.yml | 5 +++++ .ado/templates/prepare-env.yml | 5 ----- .ado/templates/react-native-init.yml | 5 ----- 6 files changed, 9 insertions(+), 27 deletions(-) diff --git a/.ado/jobs/nuget-desktop.yml b/.ado/jobs/nuget-desktop.yml index b833853b164..9d5e7253f7f 100644 --- a/.ado/jobs/nuget-desktop.yml +++ b/.ado/jobs/nuget-desktop.yml @@ -19,10 +19,6 @@ jobs: submodules: false # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules persistCredentials: false # set to 'true' to leave the OAuth token in the Git config after the initial fetch - - task: NuGetToolInstaller@0 - inputs: - versionSpec: ">=5.8.0" - - template: ../templates/prep-and-pack-nuget.yml parameters: packDesktop: true @@ -30,4 +26,4 @@ jobs: packMicrosoftReactNativeCxx: false packMicrosoftReactNativeManaged: false packMicrosoftReactNativeManagedCodeGen: false - slices: '("x64.Release", "x86.Debug")' \ No newline at end of file + slices: '("x64.Release", "x86.Debug")' diff --git a/.ado/jobs/project-reunion.yml b/.ado/jobs/project-reunion.yml index 644f79000d3..987a3788dc7 100644 --- a/.ado/jobs/project-reunion.yml +++ b/.ado/jobs/project-reunion.yml @@ -62,10 +62,6 @@ jobs: pathToPublish: $(Build.StagingDirectory) parallel: true - - task: NuGetToolInstaller@0 - inputs: - versionSpec: ">=5.8.0" - - template: ../templates/prep-and-pack-nuget.yml parameters: packDesktop: false diff --git a/.ado/publish.yml b/.ado/publish.yml index 35564117da2..2e6e9694a86 100644 --- a/.ado/publish.yml +++ b/.ado/publish.yml @@ -194,7 +194,7 @@ jobs: React.Windows.Desktop\** React.Windows.Desktop.DLL\** React.Windows.Desktop.Test.DLL\** - + - template: templates/component-governance.yml - job: RnwNativeBuildUniversal @@ -243,7 +243,7 @@ jobs: Microsoft.ReactNative\** Microsoft.ReactNative.Managed\** Microsoft.ReactNative.Managed.CodeGen\** - + - template: templates/component-governance.yml # Make symbols available through http://symweb. @@ -290,7 +290,7 @@ jobs: artifactName: ReactWindows pathToPublish: $(Build.StagingDirectory) parallel: true - + - template: templates/component-governance.yml # Make symbols available through http://symweb. @@ -315,11 +315,6 @@ jobs: - template: templates/apply-published-version-vars.yml - # The commit tag in the nuspec requires that we use at least nuget 5.8 (because things break with nuget versions before and Vs 16.8 or later) - - task: NuGetToolInstaller@0 - inputs: - versionSpec: ">=5.8.0" - - template: templates/prep-and-pack-nuget.yml parameters: publishCommitId: $(publishCommitId) diff --git a/.ado/templates/prep-and-pack-nuget.yml b/.ado/templates/prep-and-pack-nuget.yml index 0cddf2058cb..748a6074cbb 100644 --- a/.ado/templates/prep-and-pack-nuget.yml +++ b/.ado/templates/prep-and-pack-nuget.yml @@ -21,6 +21,11 @@ steps: artifact: ReactWindows path: $(System.DefaultWorkingDirectory)/ReactWindows + # The commit tag in the nuspec requires that we use at least nuget 5.8 (because things break with nuget versions before and Vs 16.8 or later) + - task: NuGetToolInstaller@0 + inputs: + versionSpec: ">=5.8.0" + - ${{ if or(eq(parameters.packMicrosoftReactNative, true), eq(parameters.packMicrosoftReactNativeCxx, true), eq(parameters.packMicrosoftReactNativeManaged, true), eq(parameters.packMicrosoftReactNativeManagedCodeGen, true), eq(parameters.packMicrosoftReactNativeProjectReunion, false)) }}: - powershell: | (Get-Content -Path $(System.DefaultWorkingDirectory)\ReactWindows\Microsoft.ReactNative.VersionCheck.targets) -replace '\$\$nuGetPackageVersion\$\$', '${{parameters.npmVersion}}' | Set-Content -Path $(System.DefaultWorkingDirectory)\ReactWindows\Microsoft.ReactNative.VersionCheck.targets diff --git a/.ado/templates/prepare-env.yml b/.ado/templates/prepare-env.yml index b710407881a..f6a8537c5c2 100644 --- a/.ado/templates/prepare-env.yml +++ b/.ado/templates/prepare-env.yml @@ -23,11 +23,6 @@ steps: Get-ChildItem "${env:ProgramFiles(x86)}\Microsoft SDKs\UWPNuGetPackages\runtime.win10-x86.Microsoft.Net.Native.SharedLibrary" | Select-Object FullName Get-ChildItem "${env:ProgramFiles(x86)}\Microsoft SDKs\UWPNuGetPackages\Microsoft.Net.UWPCoreRuntimeSdk" | Select-Object FullName - # The commit tag in the nuspec requires that we use at least nuget 5.8 (because things break with nuget versions before and Vs 16.8 or later) - - task: NuGetToolInstaller@0 - inputs: - versionSpec: ">=5.8.0" - - task: NodeTool@0 displayName: Installing Node inputs: diff --git a/.ado/templates/react-native-init.yml b/.ado/templates/react-native-init.yml index e6bef1d0f62..4decf4af8e9 100644 --- a/.ado/templates/react-native-init.yml +++ b/.ado/templates/react-native-init.yml @@ -77,11 +77,6 @@ steps: parameters: buildEnvironment: ${{ parameters.buildEnvironment }} - # The commit tag in the nuspec requires that we use at least nuget 5.8 (because things break with nuget versions before and Vs 16.8 or later) - - task: NuGetToolInstaller@0 - inputs: - versionSpec: ">=5.8.0" - - ${{ if eq(parameters.useNuGet, true) }}: - template: prep-and-pack-nuget.yml parameters: From 67e9a6906d918ea507402a99b387b583ffec8dad Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sat, 17 Jul 2021 15:22:36 -0700 Subject: [PATCH 077/149] Change files --- ...-native-windows-cli-f600b0b4-710d-4c11-b639-f94578bf55a6.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename change/{@react-native-windows-cli-ac509dc6-adc1-4fc7-bb5d-2715683316a0.json => @react-native-windows-cli-f600b0b4-710d-4c11-b639-f94578bf55a6.json} (100%) diff --git a/change/@react-native-windows-cli-ac509dc6-adc1-4fc7-bb5d-2715683316a0.json b/change/@react-native-windows-cli-f600b0b4-710d-4c11-b639-f94578bf55a6.json similarity index 100% rename from change/@react-native-windows-cli-ac509dc6-adc1-4fc7-bb5d-2715683316a0.json rename to change/@react-native-windows-cli-f600b0b4-710d-4c11-b639-f94578bf55a6.json From dbdc48ab17af527e08ef0fa24a14948c16bd8ab5 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sat, 17 Jul 2021 15:59:30 -0700 Subject: [PATCH 078/149] Make @rnw-cli dependentChangeType minor --- ...native-windows-cli-f600b0b4-710d-4c11-b639-f94578bf55a6.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/change/@react-native-windows-cli-f600b0b4-710d-4c11-b639-f94578bf55a6.json b/change/@react-native-windows-cli-f600b0b4-710d-4c11-b639-f94578bf55a6.json index 4988f7a49f6..1cf40c86cb6 100644 --- a/change/@react-native-windows-cli-f600b0b4-710d-4c11-b639-f94578bf55a6.json +++ b/change/@react-native-windows-cli-f600b0b4-710d-4c11-b639-f94578bf55a6.json @@ -3,5 +3,5 @@ "comment": "Use PackageReference for C++ dependencies", "packageName": "@react-native-windows/cli", "email": "julio.rocha@microsoft.com", - "dependentChangeType": "patch" + "dependentChangeType": "minor" } From 45ba52f5e9ffb9ddc21a1ff0403f86b95510cbfc Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sat, 17 Jul 2021 16:03:32 -0700 Subject: [PATCH 079/149] Make react-native-windows dependentChangeType minor --- ...act-native-windows-c9ee2e0d-b03e-4c92-8335-36e12d4e2465.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/change/react-native-windows-c9ee2e0d-b03e-4c92-8335-36e12d4e2465.json b/change/react-native-windows-c9ee2e0d-b03e-4c92-8335-36e12d4e2465.json index f9fbb42edb7..6f3b3108ade 100644 --- a/change/react-native-windows-c9ee2e0d-b03e-4c92-8335-36e12d4e2465.json +++ b/change/react-native-windows-c9ee2e0d-b03e-4c92-8335-36e12d4e2465.json @@ -3,5 +3,5 @@ "comment": "Use PackageReference for NuGet Dependencies", "packageName": "react-native-windows", "email": "julio.rocha@microsoft.com", - "dependentChangeType": "patch" + "dependentChangeType": "minor" } From 3f492a684a788914e3c8030e69a701964420cd42 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sat, 17 Jul 2021 16:11:30 -0700 Subject: [PATCH 080/149] Make @rnw-cli dependentChangeType none --- ...native-windows-cli-f600b0b4-710d-4c11-b639-f94578bf55a6.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/change/@react-native-windows-cli-f600b0b4-710d-4c11-b639-f94578bf55a6.json b/change/@react-native-windows-cli-f600b0b4-710d-4c11-b639-f94578bf55a6.json index 1cf40c86cb6..f3aadc44977 100644 --- a/change/@react-native-windows-cli-f600b0b4-710d-4c11-b639-f94578bf55a6.json +++ b/change/@react-native-windows-cli-f600b0b4-710d-4c11-b639-f94578bf55a6.json @@ -3,5 +3,5 @@ "comment": "Use PackageReference for C++ dependencies", "packageName": "@react-native-windows/cli", "email": "julio.rocha@microsoft.com", - "dependentChangeType": "minor" + "dependentChangeType": "none" } From 5bca4032ac1bf8609805b6eba7b0b8bb932f9023 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sat, 17 Jul 2021 16:17:45 -0700 Subject: [PATCH 081/149] Make react-native-windows dependentChangeType none --- ...act-native-windows-c9ee2e0d-b03e-4c92-8335-36e12d4e2465.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/change/react-native-windows-c9ee2e0d-b03e-4c92-8335-36e12d4e2465.json b/change/react-native-windows-c9ee2e0d-b03e-4c92-8335-36e12d4e2465.json index 6f3b3108ade..22568b6b248 100644 --- a/change/react-native-windows-c9ee2e0d-b03e-4c92-8335-36e12d4e2465.json +++ b/change/react-native-windows-c9ee2e0d-b03e-4c92-8335-36e12d4e2465.json @@ -3,5 +3,5 @@ "comment": "Use PackageReference for NuGet Dependencies", "packageName": "react-native-windows", "email": "julio.rocha@microsoft.com", - "dependentChangeType": "minor" + "dependentChangeType": "none" } From 65b91c603c99c934a5b65d16d019c12a3de1e03c Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Mon, 19 Jul 2021 19:17:14 -0700 Subject: [PATCH 082/149] Remove packages.config logic from autolink --- .../cli/src/e2etest/autolink.test.ts | 54 +------- .../cli/src/runWindows/utils/autolink.ts | 116 +----------------- 2 files changed, 3 insertions(+), 167 deletions(-) diff --git a/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts b/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts index 0b167e21fd7..dfc0858e99c 100644 --- a/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts +++ b/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts @@ -26,18 +26,12 @@ test('autolink with no windows project', () => { public getWindowsProjectConfig() { return this.windowsAppConfig; } - public packagesConfig = ''; public experimentalFeaturesProps = ''; - protected getPackagesConfigXml(){ - return {path:'packages.config', content: new DOMParser().parseFromString(this.packagesConfig, 'application/xml')}; - } protected getExperimentalFeaturesPropsXml(){ return {path: 'ExperimentalFeatures.props', content: new DOMParser().parseFromString(this.experimentalFeaturesProps, 'application/xml')}; } protected async updateFile(filepath: string, content: string) { - if (filepath === 'packages.config') { - this.packagesConfig = content; - } else if (filepath === 'ExperimentalFeatures.props') { + if (filepath === 'ExperimentalFeatures.props') { this.experimentalFeaturesProps = content; } else { throw new Error(`Unknown path: ${filepath}`); @@ -257,7 +251,6 @@ test('autolink with no windows project', () => { }, ); al.experimentalFeaturesProps = `false`; - al.packagesConfig = ``; const exd = await al.ensureXAMLDialect(); expect(exd).toBeTruthy(); @@ -265,16 +258,6 @@ test('autolink with no windows project', () => { const expectedExperimentalFeatures = 'true'; expect(al.experimentalFeaturesProps).toEqual(expectedExperimentalFeatures); - // example packages.config: - // - // - // - // - // - expect(al.packagesConfig).toContain('Microsoft.WinUI'); - expect(al.packagesConfig).toContain(''); - expect(al.packagesConfig).not.toContain('Microsoft.UI.Xaml'); - done(); }); @@ -293,24 +276,13 @@ test('autolink with no windows project', () => { }, ); al.experimentalFeaturesProps = `true`; - al.packagesConfig = ``; - + const exd = await al.ensureXAMLDialect(); expect(exd).toBeTruthy(); const expectedExperimentalFeatures = 'false'; expect(al.experimentalFeaturesProps).toEqual(expectedExperimentalFeatures); - // example packages.config: - // - // - // - // - // - expect(al.packagesConfig).not.toContain('Microsoft.WinUI'); - expect(al.packagesConfig).toContain(''); - expect(al.packagesConfig).toContain('Microsoft.UI.Xaml'); - done(); }); @@ -329,7 +301,6 @@ test('autolink with no windows project', () => { }, ); al.experimentalFeaturesProps = `true`; - al.packagesConfig = ``; const exd = await al.ensureXAMLDialect(); expect(exd).toBeTruthy(); @@ -337,16 +308,6 @@ test('autolink with no windows project', () => { const expectedExperimentalFeatures = 'true'; expect(al.experimentalFeaturesProps).toEqual(expectedExperimentalFeatures); - // example packages.config: - // - // - // - // - // - expect(al.packagesConfig).toContain('Microsoft.WinUI'); - expect(al.packagesConfig).toContain(''); - expect(al.packagesConfig).not.toContain('Microsoft.UI.Xaml'); - done(); }); @@ -365,7 +326,6 @@ test('autolink with no windows project', () => { }, ); al.experimentalFeaturesProps = `false`; - al.packagesConfig = ``; const exd = await al.ensureXAMLDialect(); expect(exd).toBeTruthy(); @@ -373,16 +333,6 @@ test('autolink with no windows project', () => { const expectedExperimentalFeatures = 'false'; expect(al.experimentalFeaturesProps).toEqual(expectedExperimentalFeatures); - // example packages.config: - // - // - // - // - // - expect(al.packagesConfig).not.toContain('Microsoft.WinUI'); - expect(al.packagesConfig).toContain(''); - expect(al.packagesConfig).toContain('Microsoft.UI.Xaml'); - done(); }); diff --git a/packages/@react-native-windows/cli/src/runWindows/utils/autolink.ts b/packages/@react-native-windows/cli/src/runWindows/utils/autolink.ts index 7e31c9a1844..e8bf29bad0d 100644 --- a/packages/@react-native-windows/cli/src/runWindows/utils/autolink.ts +++ b/packages/@react-native-windows/cli/src/runWindows/utils/autolink.ts @@ -682,23 +682,14 @@ export class AutolinkWindows { const useWinUI3FromConfig = this.getWindowsConfig().useWinUI3; const experimentalFeatures = this.getExperimentalFeaturesPropsXml(); if (experimentalFeatures) { - const useWinUI3FromExperimentalFeatures = - configUtils - .tryFindPropertyValue(experimentalFeatures.content, 'UseWinUI3') - ?.toLowerCase() === 'true'; // use the UseWinUI3 value in react-native.config.js, or if not present, the value from ExperimentalFeatures.props - changesNeeded = await this.updatePackagesConfigXAMLDialect( - useWinUI3FromConfig !== undefined - ? useWinUI3FromConfig - : useWinUI3FromExperimentalFeatures, - ); if (useWinUI3FromConfig !== undefined) { // Make sure ExperimentalFeatures.props matches the value that comes from react-native.config.js const node = experimentalFeatures.content.getElementsByTagName( 'UseWinUI3', ); const newValue = useWinUI3FromConfig ? 'true' : 'false'; - changesNeeded = node.item(0)?.textContent !== newValue || changesNeeded; + changesNeeded = node.item(0)?.textContent !== newValue; if (!this.options.check && changesNeeded) { node.item(0)!.textContent = newValue; const experimentalFeaturesOutput = new XMLSerializer().serializeToString( @@ -714,111 +705,6 @@ export class AutolinkWindows { return changesNeeded; } - protected getPackagesConfigXml() { - const projectFile = this.getProjectFile(); - const packagesConfig = path.join( - path.dirname(projectFile), - 'packages.config', - ); - - if (fs.existsSync(packagesConfig)) { - return { - path: packagesConfig, - content: configUtils.readProjectFile(packagesConfig), - }; - } - return undefined; - } - - private async updatePackagesConfigXAMLDialect(useWinUI3: boolean) { - let changed = false; - const packagesConfig = this.getPackagesConfigXml(); - if (packagesConfig) { - // if we don't have a packages.config, then this is a C# project, in which case we use and dynamically pick the right XAML package. - const project = this.getWindowsConfig(); - - const winUIPropsPath = path.join( - resolveRnwRoot(project), - 'PropertySheets/WinUI.props', - ); - const winuiPropsContents = configUtils.readProjectFile(winUIPropsPath); - const winui2xVersion = configUtils.tryFindPropertyValue( - winuiPropsContents, - 'WinUI2xVersion', - ); - const winui3Version = configUtils.tryFindPropertyValue( - winuiPropsContents, - 'WinUI3Version', - ); - - const dialects = [ - {id: 'Microsoft.WinUI', version: winui3Version!}, - {id: 'Microsoft.UI.Xaml', version: winui2xVersion!}, - ]; - const keepPkg = useWinUI3 ? dialects[0] : dialects[1]; - const removePkg = useWinUI3 ? dialects[1] : dialects[0]; - - changed = this.updatePackagesConfig( - packagesConfig, - [removePkg], - [keepPkg], - ); - - if (!this.options.check && changed) { - const serializer = new XMLSerializer(); - const output = serializer.serializeToString(packagesConfig.content); - const formattedXml = formatter(output, {indentation: ' '}); - await this.updateFile(packagesConfig.path, formattedXml); - } - } - return changed; - } - - private updatePackagesConfig( - packagesConfig: {path: string; content: Document}, - removePkgs: {id: string; version: string}[], - keepPkgs: {id: string; version: string}[], - ) { - let changed = false; - const packageElements = packagesConfig.content.documentElement.getElementsByTagName( - 'package', - ); - - const nodesToRemove: Element[] = []; - - for (let i = 0; i < packageElements.length; i++) { - const packageElement = packageElements.item(i)!; - const idAttr = packageElement!.getAttributeNode('id'); - const id = idAttr!.value; - const keepPkg = keepPkgs.find(pkg => pkg.id === id); - if (removePkgs.find(pkg => pkg.id === id)) { - nodesToRemove.push(packageElement); - changed = true; - } else if (keepPkg) { - changed = - changed || keepPkg.version !== packageElement.getAttribute('version'); - packageElement.setAttribute('version', keepPkg.version!); - keepPkgs = keepPkgs.filter(pkg => pkg.id !== keepPkg.id); - } - } - - nodesToRemove.forEach(pkg => - packagesConfig.content.documentElement.removeChild(pkg), - ); - - keepPkgs.forEach(keepPkg => { - const newPkg = packagesConfig.content.createElement('package'); - - Object.entries(keepPkg).forEach(([attr, value]) => { - newPkg.setAttribute(attr, value as string); - }); - newPkg.setAttribute('targetFramework', 'native'); - packagesConfig.content.documentElement.appendChild(newPkg); - changed = true; - }); - return changed; - } - /** @return The CLI command to invoke autolink-windows independently */ public getAutolinkWindowsCommand() { const folder = this.windowsAppConfig.folder; From 28051620598ac324ed0427404e4c6b2acd08ee88 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Mon, 19 Jul 2021 19:37:46 -0700 Subject: [PATCH 083/149] Remove unused formatter variable --- .../@react-native-windows/cli/src/runWindows/utils/autolink.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/@react-native-windows/cli/src/runWindows/utils/autolink.ts b/packages/@react-native-windows/cli/src/runWindows/utils/autolink.ts index e8bf29bad0d..9c5a497ff59 100644 --- a/packages/@react-native-windows/cli/src/runWindows/utils/autolink.ts +++ b/packages/@react-native-windows/cli/src/runWindows/utils/autolink.ts @@ -33,7 +33,6 @@ import {Project, WindowsProjectConfig} from '../../config/projectConfig'; import {CodedError} from '@react-native-windows/telemetry'; import {XMLSerializer} from 'xmldom'; import {Ora} from 'ora'; -const formatter = require('xml-formatter'); export class AutolinkWindows { private changesNecessary: boolean; From cec5d0caf5a02aee6197c83d5b6a5a711ba1ed82 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Mon, 19 Jul 2021 22:27:13 -0700 Subject: [PATCH 084/149] Delete ensureXAMLDialect tests --- .../cli/src/e2etest/autolink.test.ts | 122 ++---------------- 1 file changed, 11 insertions(+), 111 deletions(-) diff --git a/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts b/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts index dfc0858e99c..e3f3e8b44a9 100644 --- a/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts +++ b/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts @@ -10,7 +10,7 @@ test('autolink with no windows project', () => { new AutolinkTest({}, {}, {check: true, logging: false}); }).toThrowError(); }); - + test('autolink with incomplete windows project', () => { expect(() => { const autolink = new AutolinkTest( @@ -21,7 +21,7 @@ test('autolink with no windows project', () => { autolink.validateRequiredAppProperties(); }).toThrowError(); }); - + class AutolinkTest extends AutolinkWindows { public getWindowsProjectConfig() { return this.windowsAppConfig; @@ -40,7 +40,7 @@ test('autolink with no windows project', () => { } } - + test('autolink fixup sln', () => { const autolink = new AutolinkTest( {windows: {folder: __dirname, sourceDir: '.'}}, @@ -57,7 +57,7 @@ test('autolink with no windows project', () => { autolink.validateRequiredAppProperties(); }).toThrow(); }); - + test('autolink fixup proj', async done => { const autolink = new AutolinkTest( {windows: {folder: __dirname, sourceDir: '.', solutionFile: 'foo.sln'}}, @@ -70,21 +70,21 @@ test('autolink with no windows project', () => { ); expect(autolink.getWindowsProjectConfig().solutionFile).toEqual('foo.sln'); expect(autolink.getWindowsProjectConfig().project).toBeUndefined(); - + const folder = path.resolve('src/e2etest/projects/', 'WithWinUI3'); await ensureWinUI3Project(folder); expect(() => { autolink.validateRequiredProjectProperties(); }).toThrow(); autolink.fixUpForProjOption(); - + const projectConfig = autolink.getWindowsProjectConfig().project; expect(projectConfig).not.toBeUndefined(); expect(projectConfig.projectName).toEqual('WithWinUI3'); autolink.validateRequiredProjectProperties(); done(); }); - + test('empty cpp autolink dependencies', () => { const autolink = new AutolinkTest( {windows: {folder: __dirname, sourceDir: '.', solutionFile: 'foo.sln'}}, @@ -101,7 +101,7 @@ test('autolink with no windows project', () => { '\n UNREFERENCED_PARAMETER(packageProviders);', ); }); - + test('one invalid cpp autolink dependency', () => { const autolink = new AutolinkTest( {windows: {folder: __dirname, sourceDir: '.', solutionFile: 'foo.sln'}}, @@ -129,7 +129,7 @@ test('autolink with no windows project', () => { '\n UNREFERENCED_PARAMETER(packageProviders);', ); }); - + test('one invalid cs autolink dependency', () => { const autolink = new AutolinkTest( {windows: {folder: __dirname, sourceDir: '.', solutionFile: 'foo.sln'}}, @@ -156,7 +156,7 @@ test('autolink with no windows project', () => { expect(replacements.csUsingNamespaces).toEqual(''); expect(replacements.csReactPackageProviders).toEqual(''); }); - + test('one valid cpp autolink dependency', () => { const autolink = new AutolinkTest( {windows: {folder: __dirname, sourceDir: '.', solutionFile: 'foo.sln'}}, @@ -195,7 +195,7 @@ test('autolink with no windows project', () => { 'packageProviders.Append(winrt::FamousAnimalCartoons())', ); }); - + test('one valid cs autolink dependency', () => { const autolink = new AutolinkTest( {windows: {folder: __dirname, sourceDir: '.', solutionFile: 'foo.sln'}}, @@ -235,107 +235,7 @@ test('autolink with no windows project', () => { 'packageProviders.Add(new FamousAnimalCartoons())', ); }); - - test('ensureXAMLDialect - useWinUI3=true in react-native.config.js, useWinUI3=false in ExperimentalFeatures.props', async done => { - const folder = path.resolve('src/e2etest/projects/WithWinUI3'); - const rnc = require(path.join(folder, 'react-native.config.js')); - - const config = projectConfigWindows(folder, rnc.project.windows)!; - - const al = new AutolinkTest( - {windows: config}, - {}, - { - check: false, - logging: false, - }, - ); - al.experimentalFeaturesProps = `false`; - - const exd = await al.ensureXAMLDialect(); - expect(exd).toBeTruthy(); - - const expectedExperimentalFeatures = 'true'; - expect(al.experimentalFeaturesProps).toEqual(expectedExperimentalFeatures); - done(); - }); - - test('ensureXAMLDialect - useWinUI3=false in react-native.config.js, useWinUI3=true in ExperimentalFeatures.props', async done => { - const folder = path.resolve('src/e2etest/projects/WithWinUI3'); - const rnc = require(path.join(folder, 'react-native.config.js')); - - const config = projectConfigWindows(folder, rnc.project.windows)!; - config.useWinUI3 = false; - const al = new AutolinkTest( - {windows: config}, - {}, - { - check: false, - logging: false, - }, - ); - al.experimentalFeaturesProps = `true`; - - const exd = await al.ensureXAMLDialect(); - expect(exd).toBeTruthy(); - - const expectedExperimentalFeatures = 'false'; - expect(al.experimentalFeaturesProps).toEqual(expectedExperimentalFeatures); - - done(); - }); - - test('ensureXAMLDialect - useWinUI3 not in react-native.config.js, useWinUI3=true in ExperimentalFeatures.props', async done => { - const folder = path.resolve('src/e2etest/projects/WithWinUI3'); - const rnc = require(path.join(folder, 'react-native.config.js')); - - const config = projectConfigWindows(folder, rnc.project.windows)!; - delete config.useWinUI3; - const al = new AutolinkTest( - {windows: config}, - {}, - { - check: false, - logging: false, - }, - ); - al.experimentalFeaturesProps = `true`; - - const exd = await al.ensureXAMLDialect(); - expect(exd).toBeTruthy(); - - const expectedExperimentalFeatures = 'true'; - expect(al.experimentalFeaturesProps).toEqual(expectedExperimentalFeatures); - - done(); - }); - - test('ensureXAMLDialect - useWinUI3 not in react-native.config.js, useWinUI3=false in ExperimentalFeatures.props', async done => { - const folder = path.resolve('src/e2etest/projects/WithWinUI3'); - const rnc = require(path.join(folder, 'react-native.config.js')); - - const config = projectConfigWindows(folder, rnc.project.windows)!; - delete config.useWinUI3; - const al = new AutolinkTest( - {windows: config}, - {}, - { - check: false, - logging: false, - }, - ); - al.experimentalFeaturesProps = `false`; - - const exd = await al.ensureXAMLDialect(); - expect(exd).toBeTruthy(); - - const expectedExperimentalFeatures = 'false'; - expect(al.experimentalFeaturesProps).toEqual(expectedExperimentalFeatures); - - done(); - }); - test('Indirect autolink dependency', () => { const autolink = new AutolinkTest( {windows: {folder: __dirname, sourceDir: '.', solutionFile: 'foo.sln'}}, From f9c470dc66353845508802e7af1600d66b819c12 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Mon, 19 Jul 2021 22:44:15 -0700 Subject: [PATCH 085/149] Remove unused projectConfigWindows --- packages/@react-native-windows/cli/src/e2etest/autolink.test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts b/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts index e3f3e8b44a9..0d23be7597a 100644 --- a/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts +++ b/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts @@ -1,5 +1,4 @@ import path from 'path'; -import { projectConfigWindows } from '../config/projectConfig'; import {AutolinkWindows} from '../runWindows/utils/autolink'; import {DOMParser} from 'xmldom'; import { ensureWinUI3Project } from './projectConfig.utils'; From d3a62b036676f65082967cdffa2e980e1a2dbd82 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 21 Jul 2021 11:26:01 -0700 Subject: [PATCH 086/149] Remove xml-formatter dependency --- packages/@react-native-windows/cli/package.json | 1 - yarn.lock | 12 ------------ 2 files changed, 13 deletions(-) diff --git a/packages/@react-native-windows/cli/package.json b/packages/@react-native-windows/cli/package.json index 3836a2b0d71..fd3d1c26ef7 100644 --- a/packages/@react-native-windows/cli/package.json +++ b/packages/@react-native-windows/cli/package.json @@ -32,7 +32,6 @@ "shelljs": "^0.8.4", "username": "^5.1.0", "uuid": "^3.3.2", - "xml-formatter": "^2.4.0", "xml-parser": "^1.2.1", "xmldom": "^0.5.0", "xpath": "^0.0.27" diff --git a/yarn.lock b/yarn.lock index 6efebb8bc0a..d72ab53d213 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11691,23 +11691,11 @@ xcode@^2.0.0: simple-plist "^1.0.0" uuid "^3.3.2" -xml-formatter@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/xml-formatter/-/xml-formatter-2.4.0.tgz#c956ea6c5345240c0829da86a5e81d44ed4cb9c7" - integrity sha512-xTQ2IfbkCQKn0DGN5SD5KUgTgVohWiolyOXTLUHKJczIuSeGonN0BPduB9VQR5HOEuT1KOHQsOHSmTpU76zpUA== - dependencies: - xml-parser-xo "^3.1.1" - xml-name-validator@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== -xml-parser-xo@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/xml-parser-xo/-/xml-parser-xo-3.1.1.tgz#a87d92e44fa8ad3ba7242517df96e6b0893f1f47" - integrity sha512-gq1nDlJxjKQpPPZUhLbJ52pghtlB4Rz6LAQULm3SF6xzOYVnUloBglNhJR9vtZB3vIxMN/R3nZTf3qmun+6GCg== - xml-parser@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/xml-parser/-/xml-parser-1.2.1.tgz#c31f4c34f2975db82ad013222120592736156fcd" From 65d6f7e2f7b4dc9dd17dd78eeeb7d267f193c145 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 21 Jul 2021 11:43:38 -0700 Subject: [PATCH 087/149] Parameterize V8Version --- vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj | 2 +- vnext/Desktop/React.Windows.Desktop.vcxproj | 2 +- vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj | 2 +- vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj index 2755a557610..29f5a0a0587 100644 --- a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj +++ b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj @@ -154,7 +154,7 @@ - + diff --git a/vnext/Desktop/React.Windows.Desktop.vcxproj b/vnext/Desktop/React.Windows.Desktop.vcxproj index 59b9aa24ade..9634484c6ac 100644 --- a/vnext/Desktop/React.Windows.Desktop.vcxproj +++ b/vnext/Desktop/React.Windows.Desktop.vcxproj @@ -334,7 +334,7 @@ - + diff --git a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj index ee5964751e3..10701896b4c 100644 --- a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +++ b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj @@ -776,7 +776,7 @@ - + diff --git a/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj b/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj index 84266af6fb5..59d731d4d41 100644 --- a/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj +++ b/vnext/ReactCommon.UnitTests/ReactCommon.UnitTests.vcxproj @@ -175,6 +175,6 @@ - + \ No newline at end of file From 7ed312508da33a3038383c204d0b82b9b67e7ae5 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 21 Jul 2021 17:50:37 -0700 Subject: [PATCH 088/149] Empty From cb3b26935117bb5a20ef2579a06afc880e453f0a Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sat, 24 Jul 2021 14:33:34 -0700 Subject: [PATCH 089/149] Re-introduce ensureXAMLDialect - useWinUI3 --- .../cli/src/e2etest/autolink.test.ts | 101 ++++++++++++++++++ .../cli/src/runWindows/utils/autolink.ts | 4 +- 2 files changed, 103 insertions(+), 2 deletions(-) diff --git a/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts b/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts index 0d23be7597a..db77a04f963 100644 --- a/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts +++ b/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts @@ -1,4 +1,5 @@ import path from 'path'; +import { projectConfigWindows } from '../config/projectConfig'; import {AutolinkWindows} from '../runWindows/utils/autolink'; import {DOMParser} from 'xmldom'; import { ensureWinUI3Project } from './projectConfig.utils'; @@ -235,6 +236,106 @@ test('autolink with no windows project', () => { ); }); + test('ensureXAMLDialect - useWinUI3=true in react-native.config.js, useWinUI3=false in ExperimentalFeatures.props', async done => { + const folder = path.resolve('src/e2etest/projects/WithWinUI3'); + const rnc = require(path.join(folder, 'react-native.config.js')); + + const config = projectConfigWindows(folder, rnc.project.windows)!; + + const al = new AutolinkTest( + {windows: config}, + {}, + { + check: false, + logging: false, + }, + ); + al.experimentalFeaturesProps = `false`; + + const exd = await al.ensureXAMLDialect(); + expect(exd).toBeTruthy(); + + const expectedExperimentalFeatures = 'true'; + expect(al.experimentalFeaturesProps).toEqual(expectedExperimentalFeatures); + + done(); + }); + + test('ensureXAMLDialect - useWinUI3=false in react-native.config.js, useWinUI3=true in ExperimentalFeatures.props', async done => { + const folder = path.resolve('src/e2etest/projects/WithWinUI3'); + const rnc = require(path.join(folder, 'react-native.config.js')); + + const config = projectConfigWindows(folder, rnc.project.windows)!; + config.useWinUI3 = false; + const al = new AutolinkTest( + {windows: config}, + {}, + { + check: false, + logging: false, + }, + ); + al.experimentalFeaturesProps = `true`; + + const exd = await al.ensureXAMLDialect(); + expect(exd).toBeTruthy(); + + const expectedExperimentalFeatures = 'false'; + expect(al.experimentalFeaturesProps).toEqual(expectedExperimentalFeatures); + + done(); + }); + + test('ensureXAMLDialect - useWinUI3 not in react-native.config.js, useWinUI3=true in ExperimentalFeatures.props', async done => { + const folder = path.resolve('src/e2etest/projects/WithWinUI3'); + const rnc = require(path.join(folder, 'react-native.config.js')); + + const config = projectConfigWindows(folder, rnc.project.windows)!; + delete config.useWinUI3; + const al = new AutolinkTest( + {windows: config}, + {}, + { + check: false, + logging: false, + }, + ); + al.experimentalFeaturesProps = `true`; + + const exd = await al.ensureXAMLDialect(); + expect(exd).toBeTruthy(); + + const expectedExperimentalFeatures = 'true'; + expect(al.experimentalFeaturesProps).toEqual(expectedExperimentalFeatures); + + done(); + }); + + test('ensureXAMLDialect - useWinUI3 not in react-native.config.js, useWinUI3=false in ExperimentalFeatures.props', async done => { + const folder = path.resolve('src/e2etest/projects/WithWinUI3'); + const rnc = require(path.join(folder, 'react-native.config.js')); + + const config = projectConfigWindows(folder, rnc.project.windows)!; + delete config.useWinUI3; + const al = new AutolinkTest( + {windows: config}, + {}, + { + check: false, + logging: false, + }, + ); + al.experimentalFeaturesProps = `false`; + + const exd = await al.ensureXAMLDialect(); + expect(exd).toBeTruthy(); + + const expectedExperimentalFeatures = 'false'; + expect(al.experimentalFeaturesProps).toEqual(expectedExperimentalFeatures); + + done(); + }); + test('Indirect autolink dependency', () => { const autolink = new AutolinkTest( {windows: {folder: __dirname, sourceDir: '.', solutionFile: 'foo.sln'}}, diff --git a/packages/@react-native-windows/cli/src/runWindows/utils/autolink.ts b/packages/@react-native-windows/cli/src/runWindows/utils/autolink.ts index 9c5a497ff59..3e169a9fe76 100644 --- a/packages/@react-native-windows/cli/src/runWindows/utils/autolink.ts +++ b/packages/@react-native-windows/cli/src/runWindows/utils/autolink.ts @@ -677,7 +677,7 @@ export class AutolinkWindows { } public async ensureXAMLDialect() { - let changesNeeded = false; + let changesNeeded = true; const useWinUI3FromConfig = this.getWindowsConfig().useWinUI3; const experimentalFeatures = this.getExperimentalFeaturesPropsXml(); if (experimentalFeatures) { @@ -688,7 +688,7 @@ export class AutolinkWindows { 'UseWinUI3', ); const newValue = useWinUI3FromConfig ? 'true' : 'false'; - changesNeeded = node.item(0)?.textContent !== newValue; + changesNeeded = node.item(0)?.textContent !== newValue && changesNeeded; if (!this.options.check && changesNeeded) { node.item(0)!.textContent = newValue; const experimentalFeaturesOutput = new XMLSerializer().serializeToString( From 7128af996b866af0ea020ac367dd41862ca04c06 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Fri, 30 Jul 2021 16:58:25 -0700 Subject: [PATCH 090/149] Define V8PackageName --- vnext/PropertySheets/JSEngine.props | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vnext/PropertySheets/JSEngine.props b/vnext/PropertySheets/JSEngine.props index a0b4284511c..64ece6b7d0a 100644 --- a/vnext/PropertySheets/JSEngine.props +++ b/vnext/PropertySheets/JSEngine.props @@ -17,9 +17,10 @@ false false + ReactNative.V8Jsi.Windows + ReactNative.V8Jsi.Windows.UWP 0.64.17 - $(NuGetPackageRoot)\ReactNative.V8Jsi.Windows.$(V8Version) - $(NuGetPackageRoot)\ReactNative.V8Jsi.Windows.UWP.$(V8Version) + $(NuGetPackageRoot)\$(V8PackageName).$(V8Version) From e4c3ce09dbc347c6389be147f91b6d3c60b8fbf9 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sat, 31 Jul 2021 18:20:58 -0700 Subject: [PATCH 091/149] Add conditional reference to V8Jsi in playground-win32 --- .../windows/playground-win32/Playground-win32.vcxproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/playground/windows/playground-win32/Playground-win32.vcxproj b/packages/playground/windows/playground-win32/Playground-win32.vcxproj index 164a25c7c19..77ec3a9bdf8 100644 --- a/packages/playground/windows/playground-win32/Playground-win32.vcxproj +++ b/packages/playground/windows/playground-win32/Playground-win32.vcxproj @@ -174,14 +174,14 @@ - + @@ -190,4 +190,4 @@ - + \ No newline at end of file From 8e12e98f9c0333267b211ba0d9761c58f179eaff Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sat, 31 Jul 2021 20:19:10 -0700 Subject: [PATCH 092/149] Use $(WinUIPackageVersion) --- .../windows/playground-win32/Playground-win32.vcxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/playground/windows/playground-win32/Playground-win32.vcxproj b/packages/playground/windows/playground-win32/Playground-win32.vcxproj index 77ec3a9bdf8..97f0ac0ecc0 100644 --- a/packages/playground/windows/playground-win32/Playground-win32.vcxproj +++ b/packages/playground/windows/playground-win32/Playground-win32.vcxproj @@ -177,7 +177,7 @@ to be able to carry WinUI in-app instead of using the Framework Package --> - + From 1989cf8c118e7c4da598052ff4c7c1655b94fb24 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sat, 31 Jul 2021 21:27:05 -0700 Subject: [PATCH 093/149] Empty From 45d12daba5c68b922382e50b8f941387e0073145 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Fri, 20 Aug 2021 20:17:50 -0700 Subject: [PATCH 094/149] Use $(HermesVersion) property --- .../windows/integrationtest/integrationtest.vcxproj | 2 +- packages/playground/windows/playground/Playground.vcxproj | 2 +- vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj b/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj index 10d5bcf1eb4..365cf2f7a68 100644 --- a/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj +++ b/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj @@ -182,7 +182,7 @@ - + diff --git a/packages/playground/windows/playground/Playground.vcxproj b/packages/playground/windows/playground/Playground.vcxproj index 449496673a6..d45dac8ba4a 100644 --- a/packages/playground/windows/playground/Playground.vcxproj +++ b/packages/playground/windows/playground/Playground.vcxproj @@ -184,7 +184,7 @@ - + diff --git a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj index b4e52cfc491..1975d3af327 100644 --- a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +++ b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj @@ -775,7 +775,7 @@ - + From 79397d1436643075968075d931e871047a21172e Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Fri, 27 Aug 2021 19:34:24 -0700 Subject: [PATCH 095/149] Restore packages.config workflow for react-native-picer --- .ado/jobs/playground.yml | 11 ++++ .../@react-native-picker+picker+1.16.5.patch | 50 +++++++++++-------- 2 files changed, 41 insertions(+), 20 deletions(-) diff --git a/.ado/jobs/playground.yml b/.ado/jobs/playground.yml index 514f173a6a5..f0497b6c4e0 100644 --- a/.ado/jobs/playground.yml +++ b/.ado/jobs/playground.yml @@ -64,6 +64,17 @@ jobs: script: | echo ##vso[task.setvariable variable=BuildWinUI3Properties]/p:AppxPackageSigningEnabled=false /p:UseWinUI3=true + - task: NuGetToolInstaller@0 + inputs: + versionSpec: ">=5.8.0" + + - task: NuGetCommand@2 + displayName: Restore NuGet packages (NuGet.exe) + inputs: + command: restore + restoreSolution: packages/playground/windows/$(SolutionFile) + verbosityRestore: Detailed # Options: quiet, normal, detailed + - task: MSBuild@1 displayName: Restore NuGet packages inputs: diff --git a/patches/@react-native-picker+picker+1.16.5.patch b/patches/@react-native-picker+picker+1.16.5.patch index d3b4fa3c2fb..1b95ed4fa9d 100644 --- a/patches/@react-native-picker+picker+1.16.5.patch +++ b/patches/@react-native-picker+picker+1.16.5.patch @@ -3,9 +3,9 @@ index c88a28b..040bee2 100644 --- a/node_modules/@react-native-picker/picker/README.md +++ b/node_modules/@react-native-picker/picker/README.md @@ -12,11 +12,12 @@ - + ## Supported Versions - + -| @react-native-picker/picker | react-native | -| --- | --- | -| >= 1.16.0 | 0.61+ | @@ -17,19 +17,19 @@ index c88a28b..040bee2 100644 +| >= 1.16.0 | 0.61+ | 0.61+ | +| >= 1.2.0 | 0.60+ or 0.59+ with [Jetifier](https://www.npmjs.com/package/jetifier) | N/A | +| >= 1.0.0 | 0.57 | N/A | - + ## For Managed Workflow users using Expo 37 This component is not supported in the managed workflow for expo sdk 37. Please import the `Picker` from `react-native`. @@ -49,7 +50,8 @@ No additional step is required. Windows (expand for details) - + #### Windows -Usage in Windows requires the following extra steps: + +To use without autolinking the below steps may be followed. - + ##### Add the `ReactNativePicker` project to your solution. - + diff --git a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactNativePicker.vcxproj b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactNativePicker.vcxproj index 28a8132..ca1cd63 100644 --- a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactNativePicker.vcxproj @@ -96,7 +96,7 @@ index c5eda6c..659c446 100644 @@ -6,21 +6,26 @@ #include "ReactPickerView.h" #include "ReactPickerView.g.cpp" - + +#include + namespace winrt { @@ -113,16 +113,16 @@ index c5eda6c..659c446 100644 + using namespace xaml::Input; + using namespace xaml::Media; } // namespace winrt - + namespace winrt::ReactNativePicker::implementation { - + +#ifdef USE_WINUI3 + const bool ReactPickerView::s_isEditableComboboxSupported = true; +#else const bool ReactPickerView::s_isEditableComboboxSupported = winrt::ApiInformation::IsPropertyPresent( L"Windows.UI.Xaml.Controls.ComboBox", L"IsEditableProperty"); +#endif - + ReactPickerView::ReactPickerView(winrt::IReactContext const& reactContext) : m_reactContext(reactContext) { this->AllowFocusOnInteraction(true); @@ -61,9 +66,13 @@ namespace winrt::ReactNativePicker::implementation { @@ -142,7 +142,7 @@ index c5eda6c..659c446 100644 @@ -188,7 +197,7 @@ namespace winrt::ReactNativePicker::implementation { } } - + - void ReactPickerView::UpdateComboBoxItemForegroundResource(winrt::FrameworkElement const& item, winrt::Windows::UI::Xaml::Media::Brush const& color) { + void ReactPickerView::UpdateComboBoxItemForegroundResource(winrt::FrameworkElement const& item, xaml::Media::Brush const& color) { if (auto comboBoxItem = item.try_as()) { @@ -162,7 +162,7 @@ index 327763e..c39e9a5 100644 + xaml::Media::Brush m_comboBoxColor{ nullptr }; + xaml::Controls::ComboBox::SelectionChanged_revoker m_selectionChangedRevoker{}; + xaml::Controls::ComboBox::DropDownClosed_revoker m_dropDownClosedRevoker{}; - + void RegisterEvents(); void RepopulateItems(winrt::Microsoft::ReactNative::JSValueArray const& items); void SetSelectedIndex(int index); @@ -172,7 +172,7 @@ index 327763e..c39e9a5 100644 + void UpdateComboBoxItemForegroundResource(xaml::FrameworkElement const& item, xaml::Media::Brush const& color); }; } // namespace winrt::ReactNativePicker::implementation - + diff --git a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.idl b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.idl index 39f1a06..9a5063e 100644 --- a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.idl @@ -181,7 +181,7 @@ index 39f1a06..9a5063e 100644 +#include + namespace ReactNativePicker{ - + [default_interface] - runtimeclass ReactPickerView : Windows.UI.Xaml.Controls.ComboBox { + runtimeclass ReactPickerView : XAML_NAMESPACE.Controls.ComboBox { @@ -199,29 +199,29 @@ index 173f0e8..eaefe6f 100644 - using namespace Windows::UI::Xaml; + using namespace xaml; } - + namespace winrt::ReactNativePicker::implementation { diff --git a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerViewManager.h b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerViewManager.h index 55e1f9e..41ee279 100644 --- a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerViewManager.h +++ b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerViewManager.h @@ -18,7 +18,7 @@ namespace winrt::ReactNativePicker::implementation { - + // IViewManager winrt::hstring Name() noexcept; - winrt::Windows::UI::Xaml::FrameworkElement CreateView() noexcept; + xaml::FrameworkElement CreateView() noexcept; - + // IViewManagerWithReactContext winrt::Microsoft::ReactNative::IReactContext ReactContext() noexcept; @@ -30,7 +30,7 @@ namespace winrt::ReactNativePicker::implementation { NativeProps() noexcept; - + void UpdateProperties( - winrt::Windows::UI::Xaml::FrameworkElement const& view, + xaml::FrameworkElement const& view, winrt::Microsoft::ReactNative::IJSValueReader const& propertyMapReader) noexcept; - + // IViewManagerWithExportedEventTypeConstants diff --git a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/pch.h b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/pch.h index 62c1bf9..0b262fe 100644 @@ -229,7 +229,7 @@ index 62c1bf9..0b262fe 100644 +++ b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/pch.h @@ -3,13 +3,11 @@ #define NOMINMAX - + #include -#include -#include @@ -247,3 +247,13 @@ index 62c1bf9..0b262fe 100644 + +#include +#include +diff --git a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/packages.config b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/packages.config +index 790637cec..deddf6157 100644 +--- a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/packages.config ++++ b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/packages.config +@@ -2,3 +2,4 @@ + + ++ + +\ No newline at end of file From 280f8db4c3a619fde4b29be2288bbb2b281269ca Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Fri, 27 Aug 2021 19:57:14 -0700 Subject: [PATCH 096/149] Drop EOL indicator --- patches/@react-native-picker+picker+1.16.5.patch | 1 - 1 file changed, 1 deletion(-) diff --git a/patches/@react-native-picker+picker+1.16.5.patch b/patches/@react-native-picker+picker+1.16.5.patch index 1b95ed4fa9d..d71a2d4cd25 100644 --- a/patches/@react-native-picker+picker+1.16.5.patch +++ b/patches/@react-native-picker+picker+1.16.5.patch @@ -256,4 +256,3 @@ index 790637cec..deddf6157 100644 + -\ No newline at end of file From 4b06e470bba6630e5938809d9a29728310602470 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Fri, 27 Aug 2021 20:18:23 -0700 Subject: [PATCH 097/149] Update patch --- patches/@react-native-picker+picker+1.16.5.patch | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/patches/@react-native-picker+picker+1.16.5.patch b/patches/@react-native-picker+picker+1.16.5.patch index d71a2d4cd25..c18f4897e4a 100644 --- a/patches/@react-native-picker+picker+1.16.5.patch +++ b/patches/@react-native-picker+picker+1.16.5.patch @@ -248,11 +248,13 @@ index 62c1bf9..0b262fe 100644 +#include +#include diff --git a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/packages.config b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/packages.config -index 790637cec..deddf6157 100644 +index 790637c..f0e2df0 100644 --- a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/packages.config +++ b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/packages.config -@@ -2,3 +2,4 @@ +@@ -1,4 +1,5 @@ +  + +\ No newline at end of file From fe4155fda76e09dedba16955bfdb4da791b61157 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Fri, 27 Aug 2021 22:19:06 -0700 Subject: [PATCH 098/149] Revert patch --- .../@react-native-picker+picker+1.16.5.patch | 51 ++++++++----------- 1 file changed, 20 insertions(+), 31 deletions(-) diff --git a/patches/@react-native-picker+picker+1.16.5.patch b/patches/@react-native-picker+picker+1.16.5.patch index c18f4897e4a..d3b4fa3c2fb 100644 --- a/patches/@react-native-picker+picker+1.16.5.patch +++ b/patches/@react-native-picker+picker+1.16.5.patch @@ -3,9 +3,9 @@ index c88a28b..040bee2 100644 --- a/node_modules/@react-native-picker/picker/README.md +++ b/node_modules/@react-native-picker/picker/README.md @@ -12,11 +12,12 @@ - + ## Supported Versions - + -| @react-native-picker/picker | react-native | -| --- | --- | -| >= 1.16.0 | 0.61+ | @@ -17,19 +17,19 @@ index c88a28b..040bee2 100644 +| >= 1.16.0 | 0.61+ | 0.61+ | +| >= 1.2.0 | 0.60+ or 0.59+ with [Jetifier](https://www.npmjs.com/package/jetifier) | N/A | +| >= 1.0.0 | 0.57 | N/A | - + ## For Managed Workflow users using Expo 37 This component is not supported in the managed workflow for expo sdk 37. Please import the `Picker` from `react-native`. @@ -49,7 +50,8 @@ No additional step is required. Windows (expand for details) - + #### Windows -Usage in Windows requires the following extra steps: + +To use without autolinking the below steps may be followed. - + ##### Add the `ReactNativePicker` project to your solution. - + diff --git a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactNativePicker.vcxproj b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactNativePicker.vcxproj index 28a8132..ca1cd63 100644 --- a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactNativePicker.vcxproj @@ -96,7 +96,7 @@ index c5eda6c..659c446 100644 @@ -6,21 +6,26 @@ #include "ReactPickerView.h" #include "ReactPickerView.g.cpp" - + +#include + namespace winrt { @@ -113,16 +113,16 @@ index c5eda6c..659c446 100644 + using namespace xaml::Input; + using namespace xaml::Media; } // namespace winrt - + namespace winrt::ReactNativePicker::implementation { - + +#ifdef USE_WINUI3 + const bool ReactPickerView::s_isEditableComboboxSupported = true; +#else const bool ReactPickerView::s_isEditableComboboxSupported = winrt::ApiInformation::IsPropertyPresent( L"Windows.UI.Xaml.Controls.ComboBox", L"IsEditableProperty"); +#endif - + ReactPickerView::ReactPickerView(winrt::IReactContext const& reactContext) : m_reactContext(reactContext) { this->AllowFocusOnInteraction(true); @@ -61,9 +66,13 @@ namespace winrt::ReactNativePicker::implementation { @@ -142,7 +142,7 @@ index c5eda6c..659c446 100644 @@ -188,7 +197,7 @@ namespace winrt::ReactNativePicker::implementation { } } - + - void ReactPickerView::UpdateComboBoxItemForegroundResource(winrt::FrameworkElement const& item, winrt::Windows::UI::Xaml::Media::Brush const& color) { + void ReactPickerView::UpdateComboBoxItemForegroundResource(winrt::FrameworkElement const& item, xaml::Media::Brush const& color) { if (auto comboBoxItem = item.try_as()) { @@ -162,7 +162,7 @@ index 327763e..c39e9a5 100644 + xaml::Media::Brush m_comboBoxColor{ nullptr }; + xaml::Controls::ComboBox::SelectionChanged_revoker m_selectionChangedRevoker{}; + xaml::Controls::ComboBox::DropDownClosed_revoker m_dropDownClosedRevoker{}; - + void RegisterEvents(); void RepopulateItems(winrt::Microsoft::ReactNative::JSValueArray const& items); void SetSelectedIndex(int index); @@ -172,7 +172,7 @@ index 327763e..c39e9a5 100644 + void UpdateComboBoxItemForegroundResource(xaml::FrameworkElement const& item, xaml::Media::Brush const& color); }; } // namespace winrt::ReactNativePicker::implementation - + diff --git a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.idl b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.idl index 39f1a06..9a5063e 100644 --- a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.idl @@ -181,7 +181,7 @@ index 39f1a06..9a5063e 100644 +#include + namespace ReactNativePicker{ - + [default_interface] - runtimeclass ReactPickerView : Windows.UI.Xaml.Controls.ComboBox { + runtimeclass ReactPickerView : XAML_NAMESPACE.Controls.ComboBox { @@ -199,29 +199,29 @@ index 173f0e8..eaefe6f 100644 - using namespace Windows::UI::Xaml; + using namespace xaml; } - + namespace winrt::ReactNativePicker::implementation { diff --git a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerViewManager.h b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerViewManager.h index 55e1f9e..41ee279 100644 --- a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerViewManager.h +++ b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerViewManager.h @@ -18,7 +18,7 @@ namespace winrt::ReactNativePicker::implementation { - + // IViewManager winrt::hstring Name() noexcept; - winrt::Windows::UI::Xaml::FrameworkElement CreateView() noexcept; + xaml::FrameworkElement CreateView() noexcept; - + // IViewManagerWithReactContext winrt::Microsoft::ReactNative::IReactContext ReactContext() noexcept; @@ -30,7 +30,7 @@ namespace winrt::ReactNativePicker::implementation { NativeProps() noexcept; - + void UpdateProperties( - winrt::Windows::UI::Xaml::FrameworkElement const& view, + xaml::FrameworkElement const& view, winrt::Microsoft::ReactNative::IJSValueReader const& propertyMapReader) noexcept; - + // IViewManagerWithExportedEventTypeConstants diff --git a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/pch.h b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/pch.h index 62c1bf9..0b262fe 100644 @@ -229,7 +229,7 @@ index 62c1bf9..0b262fe 100644 +++ b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/pch.h @@ -3,13 +3,11 @@ #define NOMINMAX - + #include -#include -#include @@ -247,14 +247,3 @@ index 62c1bf9..0b262fe 100644 + +#include +#include -diff --git a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/packages.config b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/packages.config -index 790637c..f0e2df0 100644 ---- a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/packages.config -+++ b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/packages.config -@@ -1,4 +1,5 @@ -  - - -+ - -\ No newline at end of file From 806270d79e5ac2d15c809399c4001bd5d94fa3f9 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Fri, 27 Aug 2021 22:39:29 -0700 Subject: [PATCH 099/149] Use npx patch-package --- .../@react-native-picker+picker+1.16.5.patch | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/patches/@react-native-picker+picker+1.16.5.patch b/patches/@react-native-picker+picker+1.16.5.patch index d3b4fa3c2fb..f4d4ecb47fa 100644 --- a/patches/@react-native-picker+picker+1.16.5.patch +++ b/patches/@react-native-picker+picker+1.16.5.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/@react-native-picker/picker/README.md b/node_modules/@react-native-picker/picker/README.md -index c88a28b..040bee2 100644 +index c88a28b..70b46e2 100644 --- a/node_modules/@react-native-picker/picker/README.md +++ b/node_modules/@react-native-picker/picker/README.md @@ -12,11 +12,12 @@ @@ -31,7 +31,7 @@ index c88a28b..040bee2 100644 ##### Add the `ReactNativePicker` project to your solution. diff --git a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactNativePicker.vcxproj b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactNativePicker.vcxproj -index 28a8132..ca1cd63 100644 +index 28a8132..85429ac 100644 --- a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactNativePicker.vcxproj +++ b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactNativePicker.vcxproj @@ -1,5 +1,6 @@ @@ -90,7 +90,7 @@ index 28a8132..ca1cd63 100644 diff --git a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.cpp b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.cpp -index c5eda6c..659c446 100644 +index c5eda6c..1834ac8 100644 --- a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.cpp +++ b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.cpp @@ -6,21 +6,26 @@ @@ -149,7 +149,7 @@ index c5eda6c..659c446 100644 comboBoxItem.Foreground(color); } diff --git a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.h b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.h -index 327763e..c39e9a5 100644 +index 327763e..3b21138 100644 --- a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.h +++ b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.h @@ -22,15 +22,15 @@ namespace winrt::ReactNativePicker::implementation { @@ -174,7 +174,7 @@ index 327763e..c39e9a5 100644 } // namespace winrt::ReactNativePicker::implementation diff --git a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.idl b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.idl -index 39f1a06..9a5063e 100644 +index 39f1a06..7d712d1 100644 --- a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.idl +++ b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.idl @@ -1,7 +1,9 @@ @@ -189,7 +189,7 @@ index 39f1a06..9a5063e 100644 void UpdateProperties(Microsoft.ReactNative.IJSValueReader reader); }; diff --git a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerViewManager.cpp b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerViewManager.cpp -index 173f0e8..eaefe6f 100644 +index 173f0e8..c87d9c5 100644 --- a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerViewManager.cpp +++ b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerViewManager.cpp @@ -9,7 +9,7 @@ @@ -202,7 +202,7 @@ index 173f0e8..eaefe6f 100644 namespace winrt::ReactNativePicker::implementation { diff --git a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerViewManager.h b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerViewManager.h -index 55e1f9e..41ee279 100644 +index 55e1f9e..4b66140 100644 --- a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerViewManager.h +++ b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerViewManager.h @@ -18,7 +18,7 @@ namespace winrt::ReactNativePicker::implementation { @@ -223,8 +223,19 @@ index 55e1f9e..41ee279 100644 winrt::Microsoft::ReactNative::IJSValueReader const& propertyMapReader) noexcept; // IViewManagerWithExportedEventTypeConstants +diff --git a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/packages.config b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/packages.config +index 790637c..f0e2df0 100644 +--- a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/packages.config ++++ b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/packages.config +@@ -1,4 +1,5 @@ +  + + ++ + +\ No newline at end of file diff --git a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/pch.h b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/pch.h -index 62c1bf9..0b262fe 100644 +index 62c1bf9..1a1aa66 100644 --- a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/pch.h +++ b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/pch.h @@ -3,13 +3,11 @@ From 79e1440c6611c01bf36d1b7f9c1b1d1e05b4ee62 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Mon, 30 Aug 2021 17:40:12 -0700 Subject: [PATCH 100/149] Add WinUI 2 as packages.config dep in picker --- .../@react-native-picker+picker+1.16.5.patch | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/patches/@react-native-picker+picker+1.16.5.patch b/patches/@react-native-picker+picker+1.16.5.patch index f4d4ecb47fa..ee6c44d2eac 100644 --- a/patches/@react-native-picker+picker+1.16.5.patch +++ b/patches/@react-native-picker+picker+1.16.5.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/@react-native-picker/picker/README.md b/node_modules/@react-native-picker/picker/README.md -index c88a28b..70b46e2 100644 +index c88a28b..040bee2 100644 --- a/node_modules/@react-native-picker/picker/README.md +++ b/node_modules/@react-native-picker/picker/README.md @@ -12,11 +12,12 @@ @@ -31,7 +31,7 @@ index c88a28b..70b46e2 100644 ##### Add the `ReactNativePicker` project to your solution. diff --git a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactNativePicker.vcxproj b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactNativePicker.vcxproj -index 28a8132..85429ac 100644 +index 28a8132..8e119fb 100644 --- a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactNativePicker.vcxproj +++ b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactNativePicker.vcxproj @@ -1,5 +1,6 @@ @@ -90,7 +90,7 @@ index 28a8132..85429ac 100644 diff --git a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.cpp b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.cpp -index c5eda6c..1834ac8 100644 +index c5eda6c..bb20c1b 100644 --- a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.cpp +++ b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.cpp @@ -6,21 +6,26 @@ @@ -149,7 +149,7 @@ index c5eda6c..1834ac8 100644 comboBoxItem.Foreground(color); } diff --git a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.h b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.h -index 327763e..3b21138 100644 +index 327763e..c39e9a5 100644 --- a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.h +++ b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.h @@ -22,15 +22,15 @@ namespace winrt::ReactNativePicker::implementation { @@ -174,7 +174,7 @@ index 327763e..3b21138 100644 } // namespace winrt::ReactNativePicker::implementation diff --git a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.idl b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.idl -index 39f1a06..7d712d1 100644 +index 39f1a06..9a5063e 100644 --- a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.idl +++ b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerView.idl @@ -1,7 +1,9 @@ @@ -189,7 +189,7 @@ index 39f1a06..7d712d1 100644 void UpdateProperties(Microsoft.ReactNative.IJSValueReader reader); }; diff --git a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerViewManager.cpp b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerViewManager.cpp -index 173f0e8..c87d9c5 100644 +index 173f0e8..eaefe6f 100644 --- a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerViewManager.cpp +++ b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerViewManager.cpp @@ -9,7 +9,7 @@ @@ -202,7 +202,7 @@ index 173f0e8..c87d9c5 100644 namespace winrt::ReactNativePicker::implementation { diff --git a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerViewManager.h b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerViewManager.h -index 55e1f9e..4b66140 100644 +index 55e1f9e..41ee279 100644 --- a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerViewManager.h +++ b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/ReactPickerViewManager.h @@ -18,7 +18,7 @@ namespace winrt::ReactNativePicker::implementation { @@ -224,18 +224,19 @@ index 55e1f9e..4b66140 100644 // IViewManagerWithExportedEventTypeConstants diff --git a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/packages.config b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/packages.config -index 790637c..f0e2df0 100644 +index 790637c..4059727 100644 --- a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/packages.config +++ b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/packages.config -@@ -1,4 +1,5 @@ +@@ -1,4 +1,6 @@  + ++ \ No newline at end of file diff --git a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/pch.h b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/pch.h -index 62c1bf9..1a1aa66 100644 +index 62c1bf9..0b262fe 100644 --- a/node_modules/@react-native-picker/picker/windows/ReactNativePicker/pch.h +++ b/node_modules/@react-native-picker/picker/windows/ReactNativePicker/pch.h @@ -3,13 +3,11 @@ From 134b0c833c42cf1a4b8077f41e52fb7f619a4f96 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Tue, 7 Sep 2021 13:47:14 -0700 Subject: [PATCH 101/149] Change files --- ...ation-channel-e55358d7-47ab-4fdd-b9bc-1a5bf5af7172.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/@react-native-windows-automation-channel-e55358d7-47ab-4fdd-b9bc-1a5bf5af7172.json diff --git a/change/@react-native-windows-automation-channel-e55358d7-47ab-4fdd-b9bc-1a5bf5af7172.json b/change/@react-native-windows-automation-channel-e55358d7-47ab-4fdd-b9bc-1a5bf5af7172.json new file mode 100644 index 00000000000..785316f483a --- /dev/null +++ b/change/@react-native-windows-automation-channel-e55358d7-47ab-4fdd-b9bc-1a5bf5af7172.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Use PackageReference in C++ projects", + "packageName": "@react-native-windows/automation-channel", + "email": "julio.rocha@microsoft.com", + "dependentChangeType": "patch" +} From ca1875494ce403e74664e4b4113a295ebef97b06 Mon Sep 17 00:00:00 2001 From: Julio Cesar Rocha Date: Fri, 22 Oct 2021 17:06:32 -0700 Subject: [PATCH 102/149] Update autolink.test.ts --- .../cli/src/e2etest/autolink.test.ts | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts b/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts index 45237a95fa5..007284e1615 100644 --- a/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts +++ b/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts @@ -122,9 +122,6 @@ test('autolink with no windows project', () => { hooks: {}, params: [], }, - assets: [], - hooks: {}, - params: [], }, { check: true, @@ -153,9 +150,6 @@ test('autolink with no windows project', () => { hooks: {}, params: [], }, - assets: [], - hooks: {}, - params: [], }, { check: true, @@ -189,10 +183,10 @@ test('autolink with no windows project', () => { ], }, }, - }, assets: [], hooks: {}, params: [], + }, }, { check: true, @@ -229,10 +223,10 @@ test('autolink with no windows project', () => { ], }, }, - }, assets: [], hooks: {}, params: [], + }, }, { check: true, @@ -368,11 +362,10 @@ test('autolink with no windows project', () => { { directDependency: false, projectFile: 'indirect.vcxproj', - } + }, ], }, }, - }, assets: [], hooks: {}, params: [], From b540062d37206c265b9216681e8913cf56dcc54b Mon Sep 17 00:00:00 2001 From: Julio Cesar Rocha Date: Fri, 22 Oct 2021 17:19:30 -0700 Subject: [PATCH 103/149] Restore xml-formatter --- packages/@react-native-windows/cli/package.json | 1 + .../cli/src/runWindows/utils/autolink.ts | 1 + yarn.lock | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/@react-native-windows/cli/package.json b/packages/@react-native-windows/cli/package.json index d547e3d3f65..29719f54696 100644 --- a/packages/@react-native-windows/cli/package.json +++ b/packages/@react-native-windows/cli/package.json @@ -33,6 +33,7 @@ "shelljs": "^0.8.4", "username": "^5.1.0", "uuid": "^3.3.2", + "xml-formatter": "^2.4.0", "xml-parser": "^1.2.1", "xpath": "^0.0.27" }, diff --git a/packages/@react-native-windows/cli/src/runWindows/utils/autolink.ts b/packages/@react-native-windows/cli/src/runWindows/utils/autolink.ts index 21b77200e5e..785379352a2 100644 --- a/packages/@react-native-windows/cli/src/runWindows/utils/autolink.ts +++ b/packages/@react-native-windows/cli/src/runWindows/utils/autolink.ts @@ -34,6 +34,7 @@ import {Project, WindowsProjectConfig} from '../../config/projectConfig'; import {CodedError} from '@react-native-windows/telemetry'; import {XMLSerializer} from '@xmldom/xmldom'; import {Ora} from 'ora'; +const formatter = require('xml-formatter'); export class AutolinkWindows { private changesNecessary: boolean; diff --git a/yarn.lock b/yarn.lock index cec85933b85..61360d47ccb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11466,9 +11466,9 @@ xcode@^2.0.0: uuid "^3.3.2" xml-formatter@^2.4.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/xml-formatter/-/xml-formatter-2.5.0.tgz#ebe52306b10d565ac54330a09d646030588bab58" - integrity sha512-IoDLp5OpSYFd03ONFVPD7gtMP9weilUm4NLVkP9+zRfCqGRbIOTIbmZ+/As0gZa802QlU2/yQxhP5DmSaNoprw== + version "2.5.1" + resolved "https://registry.yarnpkg.com/xml-formatter/-/xml-formatter-2.5.1.tgz#5f0625c815558fed15aab64547ea08bf7e9197ae" + integrity sha512-qJwnz5uNMs4mc7jX3UH80taCK4BHnXX91MvByple+iOS2P1eNeifGAfPnKuteyHg8pehbhTBHPBunGOQ53nKdQ== dependencies: xml-parser-xo "^3.1.2" From 9bbb55ae8a57a77df46e6bf9bcfa84cdabfea89a Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Fri, 5 Nov 2021 17:58:56 -0700 Subject: [PATCH 104/149] Fix YML indentation --- .ado/jobs/universal.yml | 494 +++++++++++++++++------------------ .ado/templates/build-rnw.yml | 10 +- 2 files changed, 236 insertions(+), 268 deletions(-) diff --git a/.ado/jobs/universal.yml b/.ado/jobs/universal.yml index 0b0ced407ba..09754149eab 100644 --- a/.ado/jobs/universal.yml +++ b/.ado/jobs/universal.yml @@ -1,261 +1,237 @@ - parameters: - - name: buildEnvironment - type: string - default : PullRequest - values: - - PullRequest - - Continuous - - name: buildMatrix - type: object - default: - - BuildEnvironment: PullRequest - Matrix: - - Name: X64ReleaseFast - BuildConfiguration: Release - BuildPlatform: x64 - FastBuild: true - - Name: X86DebugFast - BuildConfiguration: Debug - BuildPlatform: x86 - LayoutHeaders: true - CreateApiDocs: true - FastBuild: true - - BuildEnvironment: Continuous - Matrix: - - Name: Arm64Debug - BuildConfiguration: Debug - BuildPlatform: ARM64 - FastBuild: false - - Name: Arm64Release - BuildConfiguration: Release - BuildPlatform: ARM64 - FastBuild: false - - Name: X64Debug - BuildConfiguration: Debug - BuildPlatform: x64 - FastBuild: false - - Name: X64Release - BuildConfiguration: Release - BuildPlatform: x64 - FastBuild: false - - Name: X86Debug - BuildConfiguration: Debug - BuildPlatform: x86 - LayoutHeaders: true - CreateApiDocs: true - FastBuild: false - - Name: X86Release - BuildConfiguration: Release - BuildPlatform: x86 - FastBuild: false - - Name: X64ReleaseFast - BuildConfiguration: Release - BuildPlatform: x64 - FastBuild: true - - Name: X86DebugFast - BuildConfiguration: Debug - BuildPlatform: x86 - LayoutHeaders: true - FastBuild: true - - jobs: - - ${{ each config in parameters.buildMatrix }}: - - ${{ if eq(config.BuildEnvironment, parameters.buildEnvironment) }}: - - ${{ each matrix in config.Matrix }}: - - job: UniversalBuild${{ matrix.Name }} - variables: - - template: ../variables/vs2019.yml - - # Some tasks run on a different user (VssAdministrator) instead of the default user (AzDevOps). - # Keep NuGet cache independent from the user directory. - - name: NUGET_PACKAGES - value: D:\NugetPackages - displayName: Universal Build ${{ matrix.Name }} - pool: $(AgentPool.Large) - timeoutInMinutes: 60 - cancelTimeoutInMinutes: 5 - - steps: - - checkout: self - clean: false - submodules: false - - - template: ../templates/apply-published-version-vars.yml - - - template: ../templates/build-rnw.yml - parameters: - project: vnext/Microsoft.ReactNative.sln - buildPlatform: ${{ matrix.BuildPlatform }} - buildConfiguration: ${{ matrix.BuildConfiguration }} - multicoreBuild: true - msbuildArguments: /p:RNW_FASTBUILD=${{ matrix.FastBuild }} - - - ${{ if eq(matrix.CreateApiDocs, true) }}: - - powershell: | - $winmd2md_url = "https://github.com/asklar/winmd2md/releases/download/v0.1.13/winmd2md.exe" - Invoke-WebRequest -UseBasicParsing $winmd2md_url -OutFile $env:TEMP\winmd2md.exe - & $env:TEMP\winmd2md.exe /experimental /outputDirectory vnext\target\winmd2md vnext\target\x86\Debug\Microsoft.ReactNative\Microsoft.ReactNative.winmd - displayName: "Generate WinRT API docs" - - - task: PublishBuildArtifacts@1 - displayName: Upload WinRT API docs - inputs: - pathtoPublish: 'vnext\target\winmd2md' - artifactName: 'WinRT API docs - $(Agent.JobName)-$(System.JobAttempt)' - - - task: BinSkim@3 - displayName: "Run Binskim Analysis" - condition: and(succeeded(), eq('${{ matrix.BuildConfiguration }}', 'Release'), eq('${{ matrix.FastBuild }}', 'false'), ne('${{ matrix.BuildPlatform }}', 'ARM64')) +parameters: + - name: buildEnvironment + type: string + default : PullRequest + values: + - PullRequest + - Continuous + - name: buildMatrix + type: object + default: + - BuildEnvironment: PullRequest + Matrix: + - Name: X64ReleaseFast + BuildConfiguration: Release + BuildPlatform: x64 + FastBuild: true + - Name: X86DebugFast + BuildConfiguration: Debug + BuildPlatform: x86 + LayoutHeaders: true + CreateApiDocs: true + FastBuild: true + - BuildEnvironment: Continuous + Matrix: + - Name: Arm64Debug + BuildConfiguration: Debug + BuildPlatform: ARM64 + FastBuild: false + - Name: Arm64Release + BuildConfiguration: Release + BuildPlatform: ARM64 + FastBuild: false + - Name: X64Debug + BuildConfiguration: Debug + BuildPlatform: x64 + FastBuild: false + - Name: X64Release + BuildConfiguration: Release + BuildPlatform: x64 + FastBuild: false + - Name: X86Debug + BuildConfiguration: Debug + BuildPlatform: x86 + LayoutHeaders: true + CreateApiDocs: true + FastBuild: false + - Name: X86Release + BuildConfiguration: Release + BuildPlatform: x86 + FastBuild: false + - Name: X64ReleaseFast + BuildConfiguration: Release + BuildPlatform: x64 + FastBuild: true + - Name: X86DebugFast + BuildConfiguration: Debug + BuildPlatform: x86 + LayoutHeaders: true + FastBuild: true + +jobs: + - ${{ each config in parameters.buildMatrix }}: + - ${{ if eq(config.BuildEnvironment, parameters.buildEnvironment) }}: + - ${{ each matrix in config.Matrix }}: + - job: UniversalBuild${{ matrix.Name }} + variables: + - template: ../variables/vs2019.yml + # Some tasks run on a different user (VssAdministrator) instead of the default user (AzDevOps). + # Keep NuGet cache independent from the user directory. + - name: NUGET_PACKAGES + value: D:\NugetPackages + displayName: Universal Build ${{ matrix.Name }} + pool: $(AgentPool.Large) + timeoutInMinutes: 60 + cancelTimeoutInMinutes: 5 + steps: + - checkout: self + clean: false + submodules: false + - template: ../templates/apply-published-version-vars.yml + - template: ../templates/build-rnw.yml + parameters: + project: vnext/Microsoft.ReactNative.sln + buildPlatform: ${{ matrix.BuildPlatform }} + buildConfiguration: ${{ matrix.BuildConfiguration }} + multicoreBuild: true + msbuildArguments: /p:RNW_FASTBUILD=${{ matrix.FastBuild }} + - ${{ if eq(matrix.CreateApiDocs, true) }}: + - powershell: | + $winmd2md_url = "https://github.com/asklar/winmd2md/releases/download/v0.1.13/winmd2md.exe" + Invoke-WebRequest -UseBasicParsing $winmd2md_url -OutFile $env:TEMP\winmd2md.exe + & $env:TEMP\winmd2md.exe /experimental /outputDirectory vnext\target\winmd2md vnext\target\x86\Debug\Microsoft.ReactNative\Microsoft.ReactNative.winmd + displayName: "Generate WinRT API docs" + - task: PublishBuildArtifacts@1 + displayName: Upload WinRT API docs inputs: - InputType: 'Basic' - Function: 'analyze' - AnalyzeTarget: '$(Build.SourcesDirectory)\vnext\target\${{ matrix.BuildPlatform }}\${{ matrix.BuildConfiguration }}\Microsoft.ReactNative\Microsoft.ReactNative.dll' - AnalyzeVerbose: true - toolVersion: 'LatestPreRelease' - - - task: PublishPipelineArtifact@1 - displayName: "Publish binaries for testing" - inputs: - targetPath: $(Build.SourcesDirectory)/vnext/target/${{ matrix.BuildPlatform }}/${{ matrix.BuildConfiguration }} - artifactName: "Universal-${{ matrix.BuildPlatform }}-${{ matrix.BuildConfiguration }}-fast_${{ matrix.FastBuild }}" - - - template: ../templates/publish-build-artifacts-for-nuget.yml - parameters: - artifactName: ReactWindows - buildPlatform: ${{ matrix.BuildPlatform }} - buildConfiguration: ${{ matrix.BuildConfiguration }} - layoutHeaders: ${{ matrix.LayoutHeaders }} - contents: | - Microsoft.ReactNative\** - Microsoft.ReactNative.Managed\** - Microsoft.ReactNative.Managed.CodeGen\** - - - template: ../templates/component-governance.yml - - - job: UniversalTest${{ matrix.Name }} - variables: - - template: ../variables/vs2019.yml - - # Some tasks run on a different user (VssAdministrator) instead of the default user (AzDevOps). - # Keep NuGet cache independent from the user directory. - - name: NUGET_PACKAGES - value: D:\NugetPackages - - displayName: Universal Test ${{ matrix.Name }} - dependsOn: - - UniversalBuild${{ matrix.Name }} - - pool: $(AgentPool.Medium) - timeoutInMinutes: 60 - cancelTimeoutInMinutes: 5 - - steps: - - checkout: self - clean: false - submodules: false - - - task: PowerShell@2 - displayName: "Check if this environment meets the development dependencies" - inputs: - targetType: filePath - filePath: $(Build.SourcesDirectory)\vnext\Scripts\rnw-dependencies.ps1 - arguments: -NoPrompt -Tags buildLab - - - template: ../templates/prepare-env.yml - - - task: MSBuild@1 - displayName: Restore NuGet packages - inputs: - solution: vnext/Microsoft.ReactNative.sln - msbuildArchitecture: x64 - platform: ${{ matrix.BuildPlatform }} - configuration: ${{ matrix.BuildConfiguration }} - msbuildArguments: /t:Restore - - - task: DownloadPipelineArtifact@1 - displayName: "Download binaries for testing" - inputs: - targetPath: $(Build.SourcesDirectory)/vnext/target/${{ matrix.BuildPlatform }}/${{ matrix.BuildConfiguration }} - artifactName: "Universal-${{ matrix.BuildPlatform }}-${{ matrix.BuildConfiguration }}-fast_${{ matrix.FastBuild }}" - - - template: ../templates/discover-google-test-adapter.yml - - - task: VSTest@2 - displayName: Run Universal Unit Tests (Native) - timeoutInMinutes: 5 # Set smaller timeout , due to hangs - inputs: - testSelector: testAssemblies - testAssemblyVer2: | - Microsoft.ReactNative.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.exe - Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.exe - Mso.UnitTests/Mso.UnitTests.exe - pathtoCustomTestAdapters: $(GoogleTestAdapterPath) - searchFolder: $(Build.SourcesDirectory)/vnext/target/${{ matrix.BuildPlatform }}/${{ matrix.BuildConfiguration }} - runTestsInIsolation: true - platform: ${{ matrix.BuildPlatform }} - configuration: ${{ matrix.BuildConfiguration }} - publishRunAttachments: true - collectDumpOn: onAbortOnly - vsTestVersion: latest - failOnMinTestsNotRun: true - # Issue #8003 Tracks restoring this test whose condition should be resotred disabled as it times out on releasex64... - # condition: and(succeeded(), not(eq('${{ matrix.BuildPlatform }}', 'ARM64'))) - condition: and(succeeded(), eq('${{ matrix.BuildPlatform }}', 'x86')) - - - task: VSTest@2 - displayName: Run Universal Unit Tests (UWP) - timeoutInMinutes: 5 # Set smaller timeout , due to hangs - inputs: - testSelector: testAssemblies - testAssemblyVer2: | - Microsoft.ReactNative.Managed.UnitTests/Microsoft.ReactNative.Managed.UnitTests.build.appxrecipe - searchFolder: $(Build.SourcesDirectory)/vnext/target/${{ matrix.BuildPlatform }}/${{ matrix.BuildConfiguration }} - runTestsInIsolation: true - platform: ${{ matrix.BuildPlatform }} - configuration: ${{ matrix.BuildConfiguration }} - publishRunAttachments: true - codeCoverageEnabled: true - collectDumpOn: onAbortOnly - vsTestVersion: latest - failOnMinTestsNotRun: true - condition: and(succeeded(), not(eq('${{ matrix.BuildPlatform }}', 'ARM64'))) - - - task: VSTest@2 - displayName: Run Universal Unit Tests (NetCore) - timeoutInMinutes: 5 # Set smaller timeout , due to hangs - inputs: - testSelector: testAssemblies - testAssemblyVer2: | - Microsoft.ReactNative.Managed.CodeGen.UnitTests/Microsoft.ReactNative.Managed.CodeGen.UnitTests.dll - searchFolder: $(Build.SourcesDirectory)/vnext/target/${{ matrix.BuildPlatform }}/${{ matrix.BuildConfiguration }} - runTestsInIsolation: true - platform: ${{ matrix.BuildPlatform }} - configuration: ${{ matrix.BuildConfiguration }} - publishRunAttachments: true - codeCoverageEnabled: true - collectDumpOn: onAbortOnly - vsTestVersion: latest - failOnMinTestsNotRun: true - condition: and(succeeded(), eq('${{ matrix.BuildPlatform }}', 'x64')) - - # This job is the one that accumulates the spread out build tasks into one dependency - - job: UniversalBuild - displayName: Universal Build 🏗 - variables: - - template: ../variables/vs2019.yml - dependsOn: - - ${{ each config in parameters.buildMatrix }}: - - ${{ if eq(config.BuildEnvironment, parameters.buildEnvironment) }}: - - ${{ each matrix in config.Matrix }}: + pathtoPublish: 'vnext\target\winmd2md' + artifactName: 'WinRT API docs - $(Agent.JobName)-$(System.JobAttempt)' + - task: BinSkim@3 + displayName: "Run Binskim Analysis" + condition: and(succeeded(), eq('${{ matrix.BuildConfiguration }}', 'Release'), eq('${{ matrix.FastBuild }}', 'false'), ne('${{ matrix.BuildPlatform }}', 'ARM64')) + inputs: + InputType: 'Basic' + Function: 'analyze' + AnalyzeTarget: '$(Build.SourcesDirectory)\vnext\target\${{ matrix.BuildPlatform }}\${{ matrix.BuildConfiguration }}\Microsoft.ReactNative\Microsoft.ReactNative.dll' + AnalyzeVerbose: true + toolVersion: 'LatestPreRelease' + - task: PublishPipelineArtifact@1 + displayName: "Publish binaries for testing" + inputs: + targetPath: $(Build.SourcesDirectory)/vnext/target/${{ matrix.BuildPlatform }}/${{ matrix.BuildConfiguration }} + artifactName: "Universal-${{ matrix.BuildPlatform }}-${{ matrix.BuildConfiguration }}-fast_${{ matrix.FastBuild }}" + - template: ../templates/publish-build-artifacts-for-nuget.yml + parameters: + artifactName: ReactWindows + buildPlatform: ${{ matrix.BuildPlatform }} + buildConfiguration: ${{ matrix.BuildConfiguration }} + layoutHeaders: ${{ matrix.LayoutHeaders }} + contents: | + Microsoft.ReactNative\** + Microsoft.ReactNative.Managed\** + Microsoft.ReactNative.Managed.CodeGen\** + - template: ../templates/component-governance.yml + - job: UniversalTest${{ matrix.Name }} + variables: + - template: ../variables/vs2019.yml + # Some tasks run on a different user (VssAdministrator) instead of the default user (AzDevOps). + # Keep NuGet cache independent from the user directory. + - name: NUGET_PACKAGES + value: D:\NugetPackages + displayName: Universal Test ${{ matrix.Name }} + dependsOn: - UniversalBuild${{ matrix.Name }} - pool: - vmImage: $(VmImage) - timeoutInMinutes: 60 - cancelTimeoutInMinutes: 5 - - steps: - - checkout: none - clean: false - - powershell: | - Write-Host "Waited for all Universal Build steps" - displayName: Waiting for all Universal Build steps + pool: $(AgentPool.Medium) + timeoutInMinutes: 60 + cancelTimeoutInMinutes: 5 + steps: + - checkout: self + clean: false + submodules: false + - task: PowerShell@2 + displayName: "Check if this environment meets the development dependencies" + inputs: + targetType: filePath + filePath: $(Build.SourcesDirectory)\vnext\Scripts\rnw-dependencies.ps1 + arguments: -NoPrompt -Tags buildLab + - template: ../templates/prepare-env.yml + - task: MSBuild@1 + displayName: Restore NuGet packages + inputs: + solution: vnext/Microsoft.ReactNative.sln + msbuildArchitecture: x64 + platform: ${{ matrix.BuildPlatform }} + configuration: ${{ matrix.BuildConfiguration }} + msbuildArguments: /t:Restore + - task: DownloadPipelineArtifact@1 + displayName: "Download binaries for testing" + inputs: + targetPath: $(Build.SourcesDirectory)/vnext/target/${{ matrix.BuildPlatform }}/${{ matrix.BuildConfiguration }} + artifactName: "Universal-${{ matrix.BuildPlatform }}-${{ matrix.BuildConfiguration }}-fast_${{ matrix.FastBuild }}" + - template: ../templates/discover-google-test-adapter.yml + - task: VSTest@2 + displayName: Run Universal Unit Tests (Native) + timeoutInMinutes: 5 # Set smaller timeout , due to hangs + inputs: + testSelector: testAssemblies + testAssemblyVer2: | + Microsoft.ReactNative.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.exe + Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.exe + Mso.UnitTests/Mso.UnitTests.exe + pathtoCustomTestAdapters: $(GoogleTestAdapterPath) + searchFolder: $(Build.SourcesDirectory)/vnext/target/${{ matrix.BuildPlatform }}/${{ matrix.BuildConfiguration }} + runTestsInIsolation: true + platform: ${{ matrix.BuildPlatform }} + configuration: ${{ matrix.BuildConfiguration }} + publishRunAttachments: true + collectDumpOn: onAbortOnly + vsTestVersion: latest + failOnMinTestsNotRun: true + # Issue #8003 Tracks restoring this test whose condition should be resotred disabled as it times out on releasex64... + # condition: and(succeeded(), not(eq('${{ matrix.BuildPlatform }}', 'ARM64'))) + condition: and(succeeded(), eq('${{ matrix.BuildPlatform }}', 'x86')) + - task: VSTest@2 + displayName: Run Universal Unit Tests (UWP) + timeoutInMinutes: 5 # Set smaller timeout , due to hangs + inputs: + testSelector: testAssemblies + testAssemblyVer2: | + Microsoft.ReactNative.Managed.UnitTests/Microsoft.ReactNative.Managed.UnitTests.build.appxrecipe + searchFolder: $(Build.SourcesDirectory)/vnext/target/${{ matrix.BuildPlatform }}/${{ matrix.BuildConfiguration }} + runTestsInIsolation: true + platform: ${{ matrix.BuildPlatform }} + configuration: ${{ matrix.BuildConfiguration }} + publishRunAttachments: true + codeCoverageEnabled: true + collectDumpOn: onAbortOnly + vsTestVersion: latest + failOnMinTestsNotRun: true + condition: and(succeeded(), not(eq('${{ matrix.BuildPlatform }}', 'ARM64'))) + - task: VSTest@2 + displayName: Run Universal Unit Tests (NetCore) + timeoutInMinutes: 5 # Set smaller timeout , due to hangs + inputs: + testSelector: testAssemblies + testAssemblyVer2: | + Microsoft.ReactNative.Managed.CodeGen.UnitTests/Microsoft.ReactNative.Managed.CodeGen.UnitTests.dll + searchFolder: $(Build.SourcesDirectory)/vnext/target/${{ matrix.BuildPlatform }}/${{ matrix.BuildConfiguration }} + runTestsInIsolation: true + platform: ${{ matrix.BuildPlatform }} + configuration: ${{ matrix.BuildConfiguration }} + publishRunAttachments: true + codeCoverageEnabled: true + collectDumpOn: onAbortOnly + vsTestVersion: latest + failOnMinTestsNotRun: true + condition: and(succeeded(), eq('${{ matrix.BuildPlatform }}', 'x64')) + + # This job is the one that accumulates the spread out build tasks into one dependency + - job: UniversalBuild + displayName: Universal Build 🏗 + variables: + - template: ../variables/vs2019.yml + dependsOn: + - ${{ each config in parameters.buildMatrix }}: + - ${{ if eq(config.BuildEnvironment, parameters.buildEnvironment) }}: + - ${{ each matrix in config.Matrix }}: + - UniversalBuild${{ matrix.Name }} + pool: + vmImage: $(VmImage) + timeoutInMinutes: 60 + cancelTimeoutInMinutes: 5 + steps: + - checkout: none + clean: false + - powershell: | + Write-Host "Waited for all Universal Build steps" + displayName: Waiting for all Universal Build steps diff --git a/.ado/templates/build-rnw.yml b/.ado/templates/build-rnw.yml index 665021df8eb..c09246dd350 100644 --- a/.ado/templates/build-rnw.yml +++ b/.ado/templates/build-rnw.yml @@ -39,15 +39,6 @@ steps: installVsComponents: ${{ parameters.installVsComponents }} debug: ${{ parameters.debug }} - - task: MSBuild@1 - displayName: Restore NuGet packages - inputs: - solution: ${{parameters.project}} - msbuildArchitecture: x64 - platform: ${{ parameters.buildPlatform }} - configuration: ${{ parameters.buildConfiguration }} - msbuildArguments: /t:Restore - - task: VSBuild@1 displayName: VSBuild ${{parameters.project}} inputs: @@ -62,6 +53,7 @@ steps: createLogFile: true logFileVerbosity: detailed msbuildArgs: + /restore /p:PreferredToolArchitecture=${{parameters.preferredToolArchitecture}} /p:PlatformToolset=${{parameters.platformToolset}} /p:RNW_PKG_VERSION_STR="$(RNW_PKG_VERSION_STR)" From 6f7ddf199f04723107b79c7fbaf95db7b44a6f8a Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Fri, 5 Nov 2021 18:53:53 -0700 Subject: [PATCH 105/149] Fix more YAML indentation --- .ado/jobs/sample-apps.yml | 16 ++++++++-------- .ado/templates/prep-and-pack-nuget.yml | 13 ++++--------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/.ado/jobs/sample-apps.yml b/.ado/jobs/sample-apps.yml index 0809d678c90..2e2c30176dd 100644 --- a/.ado/jobs/sample-apps.yml +++ b/.ado/jobs/sample-apps.yml @@ -76,14 +76,14 @@ jobs: configuration: ${{ matrix.BuildConfiguration }} buildEnvironment: ${{ config.BuildEnvironment }} - - task: MSBuild@1 - displayName: Restore NuGet packages - inputs: - solution: packages/sample-apps/windows/SampleApps.sln - msbuildArchitecture: x64 - platform: $(BuildPlatform) - configuration: $(BuildConfiguration) - msbuildArguments: /t:Restore + - task: MSBuild@1 + displayName: Restore NuGet packages + inputs: + solution: packages/sample-apps/windows/SampleApps.sln + msbuildArchitecture: x64 + platform: $(BuildPlatform) + configuration: $(BuildConfiguration) + msbuildArguments: /t:Restore - template: ../templates/run-windows-with-certificates.yml parameters: diff --git a/.ado/templates/prep-and-pack-nuget.yml b/.ado/templates/prep-and-pack-nuget.yml index 32f84c5fc63..bc9234e3cea 100644 --- a/.ado/templates/prep-and-pack-nuget.yml +++ b/.ado/templates/prep-and-pack-nuget.yml @@ -10,12 +10,12 @@ parameters: - name : npmVersion type: string default: '0.0.1-pr' - + # Note: NuGet pack expects platform-specific file separators ('\' on Windows). - name: nugetroot type: string default: $(System.DefaultWorkingDirectory)\ReactWindows - + - name: packDesktop type: boolean default: false @@ -33,7 +33,7 @@ parameters: default: false - name: packMicrosoftReactNativeProjectReunion type: boolean - default: false + default: false - name: signMicrosoft type: boolean @@ -44,7 +44,7 @@ steps: Write-Host "##vso[task.setvariable variable=basePlatform]${{ parameters.slices[0].platform }}" Write-Host "##vso[task.setvariable variable=baseConfiguration]${{ parameters.slices[0].configuration }}" displayName: Set base slice to ${{ parameters.slices[0].platform }}.${{ parameters.slices[0].configuration }} - + - ${{ each slice in parameters.slices }}: - task: DownloadPipelineArtifact@2 displayName: 'Download ${{ parameters.artifactName }}.${{ slice.platform }}.${{ slice.configuration }}' @@ -65,11 +65,6 @@ steps: filePath: vnext/Scripts/Tfs/Layout-Desktop-Headers.ps1 arguments: -TargetRoot ${{parameters.nugetroot}} - # The commit tag in the nuspec requires that we use at least nuget 5.8 (because things break with nuget versions before and Vs 16.8 or later) - - task: NuGetToolInstaller@0 - inputs: - versionSpec: ">=5.8.0" - - ${{ if or(eq(parameters.packMicrosoftReactNative, true), eq(parameters.packMicrosoftReactNativeCxx, true), eq(parameters.packMicrosoftReactNativeManaged, true), eq(parameters.packMicrosoftReactNativeManagedCodeGen, true), eq(parameters.packMicrosoftReactNativeProjectReunion, false)) }}: - powershell: | (Get-Content -Path ${{parameters.nugetroot}}\Microsoft.ReactNative.VersionCheck.targets) -replace '\$\$nuGetPackageVersion\$\$', '${{parameters.npmVersion}}' | Set-Content -Path ${{parameters.nugetroot}}\Microsoft.ReactNative.VersionCheck.targets From 8ff42fca16b2941405e3be089d82efa8a426d16d Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Fri, 5 Nov 2021 22:08:37 -0700 Subject: [PATCH 106/149] Unconditionally include Hermes NuGet --- vnext/Desktop/React.Windows.Desktop.vcxproj | 1 + vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/vnext/Desktop/React.Windows.Desktop.vcxproj b/vnext/Desktop/React.Windows.Desktop.vcxproj index e1f33f4ecbe..33fa432fade 100644 --- a/vnext/Desktop/React.Windows.Desktop.vcxproj +++ b/vnext/Desktop/React.Windows.Desktop.vcxproj @@ -325,6 +325,7 @@ + diff --git a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj index 31110bc7f1c..dc3a0827740 100644 --- a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +++ b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj @@ -803,7 +803,7 @@ - + From 9d25c638f9a0a0c2364076c046a192e58f7a0dfc Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Fri, 5 Nov 2021 23:07:51 -0700 Subject: [PATCH 107/149] yarn lint --- .../cli/src/e2etest/autolink.test.ts | 655 +++++++++--------- 1 file changed, 331 insertions(+), 324 deletions(-) diff --git a/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts b/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts index 167fe5ee4d7..ba256c7ac16 100644 --- a/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts +++ b/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts @@ -11,375 +11,382 @@ import {DOMParser} from '@xmldom/xmldom'; import {ensureWinUI3Project} from './projectConfig.utils'; test('autolink with no windows project', () => { - expect(() => { - // eslint-disable-next-line no-new - new AutolinkTest({}, {}, {check: true, logging: false}); - }).toThrowError(); - }); - - test('autolink with incomplete windows project', () => { - expect(() => { - const autolink = new AutolinkTest( - {windows: {}}, - {}, - {check: true, logging: false}, - ); - autolink.validateRequiredAppProperties(); - }).toThrowError(); - }); - - class AutolinkTest extends AutolinkWindows { - public getWindowsProjectConfig() { - return this.windowsAppConfig; - } - public experimentalFeaturesProps = ''; - protected getExperimentalFeaturesPropsXml(){ - return {path: 'ExperimentalFeatures.props', content: new DOMParser().parseFromString(this.experimentalFeaturesProps, 'application/xml')}; - } - protected async updateFile(filepath: string, content: string) { - if (filepath === 'ExperimentalFeatures.props') { - this.experimentalFeaturesProps = content; - } else { - throw new Error(`Unknown path: ${filepath}`); - } - return true; - } -} - + expect(() => { + // eslint-disable-next-line no-new + new AutolinkTest({}, {}, {check: true, logging: false}); + }).toThrowError(); +}); - test('autolink fixup sln', () => { +test('autolink with incomplete windows project', () => { + expect(() => { const autolink = new AutolinkTest( {windows: {}}, {}, {check: true, logging: false}, ); - expect(autolink.getWindowsProjectConfig().solutionFile).toBeUndefined(); - expect(() => { - autolink.validateRequiredAppProperties(); - }).toThrow(); - autolink.fixUpForSlnOption(); - expect(autolink.getWindowsProjectConfig().solutionFile).toEqual('foo'); - expect(() => { - autolink.validateRequiredAppProperties(); - }).toThrow(); - }); - - test('autolink fixup proj', async done => { - const autolink = new AutolinkTest( - {windows: {folder: __dirname, sourceDir: '.', solutionFile: 'foo.sln'}}, - {}, - { - check: true, - logging: false, - proj: 'projects/WithWinUI3/windows/WithWinUI3/WithWinUI3.vcxproj', - }, - ); - expect(autolink.getWindowsProjectConfig().solutionFile).toEqual('foo.sln'); - expect(autolink.getWindowsProjectConfig().project).toBeUndefined(); - - const folder = path.resolve('src/e2etest/projects/', 'WithWinUI3'); - await ensureWinUI3Project(folder); - expect(() => { - autolink.validateRequiredProjectProperties(); - }).toThrow(); - autolink.fixUpForProjOption(); - - const projectConfig = autolink.getWindowsProjectConfig().project; - expect(projectConfig).not.toBeUndefined(); - expect(projectConfig.projectName).toEqual('WithWinUI3'); + autolink.validateRequiredAppProperties(); + }).toThrowError(); +}); + +class AutolinkTest extends AutolinkWindows { + public getWindowsProjectConfig() { + return this.windowsAppConfig; + } + public experimentalFeaturesProps = ''; + protected getExperimentalFeaturesPropsXml() { + return { + path: 'ExperimentalFeatures.props', + content: new DOMParser().parseFromString( + this.experimentalFeaturesProps, + 'application/xml', + ), + }; + } + protected async updateFile(filepath: string, content: string) { + if (filepath === 'ExperimentalFeatures.props') { + this.experimentalFeaturesProps = content; + } else { + throw new Error(`Unknown path: ${filepath}`); + } + return true; + } +} + +test('autolink fixup sln', () => { + const autolink = new AutolinkTest( + {windows: {}}, + {}, + {check: true, logging: false}, + ); + expect(autolink.getWindowsProjectConfig().solutionFile).toBeUndefined(); + expect(() => { + autolink.validateRequiredAppProperties(); + }).toThrow(); + autolink.fixUpForSlnOption(); + expect(autolink.getWindowsProjectConfig().solutionFile).toEqual('foo'); + expect(() => { + autolink.validateRequiredAppProperties(); + }).toThrow(); +}); + +test('autolink fixup proj', async done => { + const autolink = new AutolinkTest( + {windows: {folder: __dirname, sourceDir: '.', solutionFile: 'foo.sln'}}, + {}, + { + check: true, + logging: false, + proj: 'projects/WithWinUI3/windows/WithWinUI3/WithWinUI3.vcxproj', + }, + ); + expect(autolink.getWindowsProjectConfig().solutionFile).toEqual('foo.sln'); + expect(autolink.getWindowsProjectConfig().project).toBeUndefined(); + + const folder = path.resolve('src/e2etest/projects/', 'WithWinUI3'); + await ensureWinUI3Project(folder); + expect(() => { autolink.validateRequiredProjectProperties(); - done(); - }); + }).toThrow(); + autolink.fixUpForProjOption(); + + const projectConfig = autolink.getWindowsProjectConfig().project; + expect(projectConfig).not.toBeUndefined(); + expect(projectConfig.projectName).toEqual('WithWinUI3'); + autolink.validateRequiredProjectProperties(); + done(); +}); - test('empty cpp autolink dependencies', () => { - const autolink = new AutolinkTest( - {windows: {folder: __dirname, sourceDir: '.', solutionFile: 'foo.sln'}}, - {}, - { - check: true, - logging: false, - proj: 'projects/WithWinUI3/windows/WithWinUI3/WithWinUI3.vcxproj', - }, - ); - const replacements = autolink.getCppReplacements(); - expect(replacements.cppIncludes).toEqual(''); - expect(replacements.cppPackageProviders).toEqual( - '\n UNREFERENCED_PARAMETER(packageProviders);', - ); - }); +test('empty cpp autolink dependencies', () => { + const autolink = new AutolinkTest( + {windows: {folder: __dirname, sourceDir: '.', solutionFile: 'foo.sln'}}, + {}, + { + check: true, + logging: false, + proj: 'projects/WithWinUI3/windows/WithWinUI3/WithWinUI3.vcxproj', + }, + ); + const replacements = autolink.getCppReplacements(); + expect(replacements.cppIncludes).toEqual(''); + expect(replacements.cppPackageProviders).toEqual( + '\n UNREFERENCED_PARAMETER(packageProviders);', + ); +}); - test('one invalid cpp autolink dependency', () => { - const autolink = new AutolinkTest( - {windows: {folder: __dirname, sourceDir: '.', solutionFile: 'foo.sln'}}, - { - superModule: { - name: 'superModule', - root: 'theRoot', - platforms: { - windows: {}, - }, - assets: [], - hooks: {}, - params: [], +test('one invalid cpp autolink dependency', () => { + const autolink = new AutolinkTest( + {windows: {folder: __dirname, sourceDir: '.', solutionFile: 'foo.sln'}}, + { + superModule: { + name: 'superModule', + root: 'theRoot', + platforms: { + windows: {}, }, + assets: [], + hooks: {}, + params: [], }, - { - check: true, - logging: false, - proj: 'projects/WithWinUI3/windows/WithWinUI3/WithWinUI3.vcxproj', - }, - ); - const replacements = autolink.getCppReplacements(); - expect(replacements.cppIncludes).toEqual(''); - expect(replacements.cppPackageProviders).toEqual( - '\n UNREFERENCED_PARAMETER(packageProviders);', - ); - }); + }, + { + check: true, + logging: false, + proj: 'projects/WithWinUI3/windows/WithWinUI3/WithWinUI3.vcxproj', + }, + ); + const replacements = autolink.getCppReplacements(); + expect(replacements.cppIncludes).toEqual(''); + expect(replacements.cppPackageProviders).toEqual( + '\n UNREFERENCED_PARAMETER(packageProviders);', + ); +}); - test('one invalid cs autolink dependency', () => { - const autolink = new AutolinkTest( - {windows: {folder: __dirname, sourceDir: '.', solutionFile: 'foo.sln'}}, - { - superModule: { - name: 'superModule', - root: 'theRoot', - platforms: { - windows: {}, - }, - assets: [], - hooks: {}, - params: [], +test('one invalid cs autolink dependency', () => { + const autolink = new AutolinkTest( + {windows: {folder: __dirname, sourceDir: '.', solutionFile: 'foo.sln'}}, + { + superModule: { + name: 'superModule', + root: 'theRoot', + platforms: { + windows: {}, }, + assets: [], + hooks: {}, + params: [], }, - { - check: true, - logging: false, - proj: - 'projects/SimpleCSharpApp/windows/SimpleCSharpApp/SimpleCSharpApp.csproj', - }, - ); - const replacements = autolink.getCsReplacements(); - expect(replacements.csUsingNamespaces).toEqual(''); - expect(replacements.csReactPackageProviders).toEqual(''); - }); + }, + { + check: true, + logging: false, + proj: + 'projects/SimpleCSharpApp/windows/SimpleCSharpApp/SimpleCSharpApp.csproj', + }, + ); + const replacements = autolink.getCsReplacements(); + expect(replacements.csUsingNamespaces).toEqual(''); + expect(replacements.csReactPackageProviders).toEqual(''); +}); - test('one valid cpp autolink dependency', () => { - const autolink = new AutolinkTest( - {windows: {folder: __dirname, sourceDir: '.', solutionFile: 'foo.sln'}}, - { - superModule: { - name: 'superModule', - root: 'theRoot', - platforms: { - windows: { - sourceDir: __dirname, - projects: [ - { - directDependency: true, - projectFile: 'superModule.vcxproj', - cppHeaders: ['Garfield.h', 'Snoopy.h'], - cppPackageProviders: ['FamousAnimalCartoons'], - }, - ], - }, +test('one valid cpp autolink dependency', () => { + const autolink = new AutolinkTest( + {windows: {folder: __dirname, sourceDir: '.', solutionFile: 'foo.sln'}}, + { + superModule: { + name: 'superModule', + root: 'theRoot', + platforms: { + windows: { + sourceDir: __dirname, + projects: [ + { + directDependency: true, + projectFile: 'superModule.vcxproj', + cppHeaders: ['Garfield.h', 'Snoopy.h'], + cppPackageProviders: ['FamousAnimalCartoons'], + }, + ], }, + }, assets: [], hooks: {}, params: [], - }, }, - { - check: true, - logging: false, - proj: 'projects/WithWinUI3/windows/WithWinUI3/WithWinUI3.vcxproj', - }, - ); - const replacements = autolink.getCppReplacements(); - expect(replacements.cppIncludes).toMatch(/#include /); - expect(replacements.cppIncludes).toMatch(/#include /); - expect(replacements.cppPackageProviders).toContain( - 'packageProviders.Append(winrt::FamousAnimalCartoons())', - ); - }); + }, + { + check: true, + logging: false, + proj: 'projects/WithWinUI3/windows/WithWinUI3/WithWinUI3.vcxproj', + }, + ); + const replacements = autolink.getCppReplacements(); + expect(replacements.cppIncludes).toMatch(/#include /); + expect(replacements.cppIncludes).toMatch(/#include /); + expect(replacements.cppPackageProviders).toContain( + 'packageProviders.Append(winrt::FamousAnimalCartoons())', + ); +}); - test('one valid cs autolink dependency', () => { - const autolink = new AutolinkTest( - {windows: {folder: __dirname, sourceDir: '.', solutionFile: 'foo.sln'}}, - { - superModule: { - name: 'superModule', - root: 'theRoot', - platforms: { - windows: { - sourceDir: __dirname, - projects: [ - { - directDependency: true, - csNamespaces: ['Garfield'], - projectFile: 'superModule.vcxproj', - cppHeaders: ['Garfield.h', 'Snoopy.h'], - csPackageProviders: ['FamousAnimalCartoons'], - }, - ], - }, +test('one valid cs autolink dependency', () => { + const autolink = new AutolinkTest( + {windows: {folder: __dirname, sourceDir: '.', solutionFile: 'foo.sln'}}, + { + superModule: { + name: 'superModule', + root: 'theRoot', + platforms: { + windows: { + sourceDir: __dirname, + projects: [ + { + directDependency: true, + csNamespaces: ['Garfield'], + projectFile: 'superModule.vcxproj', + cppHeaders: ['Garfield.h', 'Snoopy.h'], + csPackageProviders: ['FamousAnimalCartoons'], + }, + ], }, + }, assets: [], hooks: {}, params: [], - }, - }, - { - check: true, - logging: false, - proj: - 'projects/SimpleCSharpApp/windows/SimpleCSharpApp/SimpleCSharpApp.csproj', }, - ); - const replacements = autolink.getCsReplacements(); - expect(replacements.csUsingNamespaces).toContain('using Garfield;'); - expect(replacements.csReactPackageProviders).toContain( - 'packageProviders.Add(new FamousAnimalCartoons())', - ); - }); + }, + { + check: true, + logging: false, + proj: + 'projects/SimpleCSharpApp/windows/SimpleCSharpApp/SimpleCSharpApp.csproj', + }, + ); + const replacements = autolink.getCsReplacements(); + expect(replacements.csUsingNamespaces).toContain('using Garfield;'); + expect(replacements.csReactPackageProviders).toContain( + 'packageProviders.Add(new FamousAnimalCartoons())', + ); +}); - test('ensureXAMLDialect - useWinUI3=true in react-native.config.js, useWinUI3=false in ExperimentalFeatures.props', async done => { - const folder = path.resolve('src/e2etest/projects/WithWinUI3'); - const rnc = require(path.join(folder, 'react-native.config.js')); +test('ensureXAMLDialect - useWinUI3=true in react-native.config.js, useWinUI3=false in ExperimentalFeatures.props', async done => { + const folder = path.resolve('src/e2etest/projects/WithWinUI3'); + const rnc = require(path.join(folder, 'react-native.config.js')); - const config = projectConfigWindows(folder, rnc.project.windows)!; + const config = projectConfigWindows(folder, rnc.project.windows)!; - const al = new AutolinkTest( - {windows: config}, - {}, - { - check: false, - logging: false, - }, - ); - al.experimentalFeaturesProps = `false`; + const al = new AutolinkTest( + {windows: config}, + {}, + { + check: false, + logging: false, + }, + ); + al.experimentalFeaturesProps = `false`; - const exd = await al.ensureXAMLDialect(); - expect(exd).toBeTruthy(); + const exd = await al.ensureXAMLDialect(); + expect(exd).toBeTruthy(); - const expectedExperimentalFeatures = 'true'; - expect(al.experimentalFeaturesProps).toEqual(expectedExperimentalFeatures); + const expectedExperimentalFeatures = + 'true'; + expect(al.experimentalFeaturesProps).toEqual(expectedExperimentalFeatures); - done(); - }); + done(); +}); - test('ensureXAMLDialect - useWinUI3=false in react-native.config.js, useWinUI3=true in ExperimentalFeatures.props', async done => { - const folder = path.resolve('src/e2etest/projects/WithWinUI3'); - const rnc = require(path.join(folder, 'react-native.config.js')); +test('ensureXAMLDialect - useWinUI3=false in react-native.config.js, useWinUI3=true in ExperimentalFeatures.props', async done => { + const folder = path.resolve('src/e2etest/projects/WithWinUI3'); + const rnc = require(path.join(folder, 'react-native.config.js')); + const config = projectConfigWindows(folder, rnc.project.windows)!; + delete config.useWinUI3; + const al = new AutolinkTest( + {windows: config}, + {}, + { + check: false, + logging: false, + }, + ); + al.experimentalFeaturesProps = `false2.7.0-test`; + + const exd = await al.ensureXAMLDialect(); + expect(exd).toBeTruthy(); + + const expectedExperimentalFeatures = + 'false2.7.0-test'; + expect(al.experimentalFeaturesProps).toEqual(expectedExperimentalFeatures); + + // example packages.config: + // + // + // + // + // + // expect(al.packagesConfig).toContain('Microsoft.UI.Xaml'); + // expect(al.packagesConfig).toContain('2.7.0-test'); + // expect(al.packagesConfig).toContain(''); + // expect(al.packagesConfig).not.toContain('Microsoft.WinUI'); + //TODO: Evaluate properties using a different mechanism. + + done(); +}); - const config = projectConfigWindows(folder, rnc.project.windows)!; - delete config.useWinUI3; - const al = new AutolinkTest( - {windows: config}, - {}, - { - check: false, - logging: false, - }, - ); - al.experimentalFeaturesProps = `false2.7.0-test`; - - const exd = await al.ensureXAMLDialect(); - expect(exd).toBeTruthy(); - - const expectedExperimentalFeatures = - 'false2.7.0-test'; - expect(al.experimentalFeaturesProps).toEqual(expectedExperimentalFeatures); - - // example packages.config: - // - // - // - // - // - // expect(al.packagesConfig).toContain('Microsoft.UI.Xaml'); - // expect(al.packagesConfig).toContain('2.7.0-test'); - // expect(al.packagesConfig).toContain(''); - // expect(al.packagesConfig).not.toContain('Microsoft.WinUI'); - //TODO: Evaluate properties using a different mechanism. - - done(); - }); - - test('ensureXAMLDialect - useWinUI3 not in react-native.config.js, useWinUI3=true in ExperimentalFeatures.props', async done => { - const folder = path.resolve('src/e2etest/projects/WithWinUI3'); - const rnc = require(path.join(folder, 'react-native.config.js')); - - const config = projectConfigWindows(folder, rnc.project.windows)!; - delete config.useWinUI3; - const al = new AutolinkTest( - {windows: config}, - {}, - { - check: false, - logging: false, - }, - ); - al.experimentalFeaturesProps = `true`; +test('ensureXAMLDialect - useWinUI3 not in react-native.config.js, useWinUI3=true in ExperimentalFeatures.props', async done => { + const folder = path.resolve('src/e2etest/projects/WithWinUI3'); + const rnc = require(path.join(folder, 'react-native.config.js')); - const exd = await al.ensureXAMLDialect(); - expect(exd).toBeTruthy(); + const config = projectConfigWindows(folder, rnc.project.windows)!; + delete config.useWinUI3; + const al = new AutolinkTest( + {windows: config}, + {}, + { + check: false, + logging: false, + }, + ); + al.experimentalFeaturesProps = `true`; - const expectedExperimentalFeatures = 'true'; - expect(al.experimentalFeaturesProps).toEqual(expectedExperimentalFeatures); + const exd = await al.ensureXAMLDialect(); + expect(exd).toBeTruthy(); - done(); - }); + const expectedExperimentalFeatures = + 'true'; + expect(al.experimentalFeaturesProps).toEqual(expectedExperimentalFeatures); - test('ensureXAMLDialect - useWinUI3 not in react-native.config.js, useWinUI3=false in ExperimentalFeatures.props', async done => { - const folder = path.resolve('src/e2etest/projects/WithWinUI3'); - const rnc = require(path.join(folder, 'react-native.config.js')); + done(); +}); - const config = projectConfigWindows(folder, rnc.project.windows)!; - delete config.useWinUI3; - const al = new AutolinkTest( - {windows: config}, - {}, - { - check: false, - logging: false, - }, - ); - al.experimentalFeaturesProps = `false`; +test('ensureXAMLDialect - useWinUI3 not in react-native.config.js, useWinUI3=false in ExperimentalFeatures.props', async done => { + const folder = path.resolve('src/e2etest/projects/WithWinUI3'); + const rnc = require(path.join(folder, 'react-native.config.js')); - const exd = await al.ensureXAMLDialect(); - expect(exd).toBeTruthy(); + const config = projectConfigWindows(folder, rnc.project.windows)!; + delete config.useWinUI3; + const al = new AutolinkTest( + {windows: config}, + {}, + { + check: false, + logging: false, + }, + ); + al.experimentalFeaturesProps = `false`; - const expectedExperimentalFeatures = 'false'; - expect(al.experimentalFeaturesProps).toEqual(expectedExperimentalFeatures); + const exd = await al.ensureXAMLDialect(); + expect(exd).toBeTruthy(); - done(); - }); + const expectedExperimentalFeatures = + 'false'; + expect(al.experimentalFeaturesProps).toEqual(expectedExperimentalFeatures); - test('Indirect autolink dependency', () => { - const autolink = new AutolinkTest( - {windows: {folder: __dirname, sourceDir: '.', solutionFile: 'foo.sln'}}, - { - superModule: { - name: 'superModule', - root: 'theRoot', - platforms: { - windows: { - sourceDir: __dirname, - projects: [ - { - directDependency: true, - projectFile: 'superModule.vcxproj', - cppHeaders: ['Garfield.h', 'Snoopy.h'], - cppPackageProviders: ['FamousAnimalCartoons'], - }, - { - directDependency: false, - projectFile: 'indirect.vcxproj', - }, - ], - }, + done(); +}); + +test('Indirect autolink dependency', () => { + const autolink = new AutolinkTest( + {windows: {folder: __dirname, sourceDir: '.', solutionFile: 'foo.sln'}}, + { + superModule: { + name: 'superModule', + root: 'theRoot', + platforms: { + windows: { + sourceDir: __dirname, + projects: [ + { + directDependency: true, + projectFile: 'superModule.vcxproj', + cppHeaders: ['Garfield.h', 'Snoopy.h'], + cppPackageProviders: ['FamousAnimalCartoons'], + }, + { + directDependency: false, + projectFile: 'indirect.vcxproj', + }, + ], }, + }, assets: [], hooks: {}, params: [], From 1a9393876b118ab607a5ab6f952d720a1c835ede Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Tue, 9 Nov 2021 16:16:27 -0800 Subject: [PATCH 108/149] Reference Hermes in Desktop.DLL --- vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj | 1 + 1 file changed, 1 insertion(+) diff --git a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj index 8efb6192b7c..00250beee31 100644 --- a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj +++ b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj @@ -151,6 +151,7 @@ + From 910270c8443480748156da95871a184661d33449 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Tue, 9 Nov 2021 17:17:00 -0800 Subject: [PATCH 109/149] Use parameters for SampleApps plaf/config --- .ado/jobs/sample-apps.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.ado/jobs/sample-apps.yml b/.ado/jobs/sample-apps.yml index c129669eb33..6d112c428fc 100644 --- a/.ado/jobs/sample-apps.yml +++ b/.ado/jobs/sample-apps.yml @@ -6,7 +6,7 @@ parameters: - PullRequest - Continuous - name: AgentPool - type: object + type: object - name: buildMatrix type: object default: @@ -79,8 +79,8 @@ jobs: inputs: solution: packages/sample-apps/windows/SampleApps.sln msbuildArchitecture: x64 - platform: $(BuildPlatform) - configuration: $(BuildConfiguration) + platform: ${{ matrix.BuildPlatform }} + configuration: ${{ matrix.BuildConfiguration }} msbuildArguments: /t:Restore - template: ../templates/run-windows-with-certificates.yml From 6b7aaa126680294c1854ed6425f0a5d8a3967fa7 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Tue, 9 Nov 2021 18:41:02 -0800 Subject: [PATCH 110/149] Revert Microsoft.Windows.CppWinRT to 2.0.210312.4 --- .../windows/AutomationChannel/AutomationChannel.vcxproj | 2 +- .../@react-native-windows/cli/src/generator-windows/index.ts | 2 +- .../windows/integrationtest/integrationtest.vcxproj | 2 +- .../windows/playground-win32/Playground-win32.vcxproj | 2 +- packages/playground/windows/playground/Playground.vcxproj | 2 +- packages/sample-apps/windows/SampleAppCPP/SampleAppCpp.vcxproj | 2 +- .../windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj | 2 +- vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj | 2 +- vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj | 2 +- vnext/Desktop/React.Windows.Desktop.vcxproj | 2 +- .../Microsoft.ReactNative.ComponentTests.vcxproj | 2 +- .../Microsoft.ReactNative.IntegrationTests.vcxproj | 2 +- .../Microsoft.ReactNative.Managed.CodeGen.UnitTests.csproj | 2 +- vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj | 2 +- vnext/Mso.UnitTests/Mso.UnitTests.vcxproj | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/@react-native-windows/automation-channel/windows/AutomationChannel/AutomationChannel.vcxproj b/packages/@react-native-windows/automation-channel/windows/AutomationChannel/AutomationChannel.vcxproj index 5243c470873..b0eeed0b241 100644 --- a/packages/@react-native-windows/automation-channel/windows/AutomationChannel/AutomationChannel.vcxproj +++ b/packages/@react-native-windows/automation-channel/windows/AutomationChannel/AutomationChannel.vcxproj @@ -142,7 +142,7 @@ - + diff --git a/packages/@react-native-windows/cli/src/generator-windows/index.ts b/packages/@react-native-windows/cli/src/generator-windows/index.ts index 780d5b69777..43908900981 100644 --- a/packages/@react-native-windows/cli/src/generator-windows/index.ts +++ b/packages/@react-native-windows/cli/src/generator-windows/index.ts @@ -165,7 +165,7 @@ export async function copyProjectTemplateAndReplace( const cppNugetPackages: NugetPackage[] = [ { id: 'Microsoft.Windows.CppWinRT', - version: '2.0.210708.4', + version: '2.0.210312.4', }, { id: 'ReactNative.Hermes.Windows', diff --git a/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj b/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj index 23b60f77a09..e457bfcb4c2 100644 --- a/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj +++ b/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj @@ -179,7 +179,7 @@ - + diff --git a/packages/playground/windows/playground-win32/Playground-win32.vcxproj b/packages/playground/windows/playground-win32/Playground-win32.vcxproj index 47ccb71395d..aa42a9ccc8d 100644 --- a/packages/playground/windows/playground-win32/Playground-win32.vcxproj +++ b/packages/playground/windows/playground-win32/Playground-win32.vcxproj @@ -177,7 +177,7 @@ --> - + diff --git a/packages/playground/windows/playground/Playground.vcxproj b/packages/playground/windows/playground/Playground.vcxproj index 32d78c15e4b..102d673f931 100644 --- a/packages/playground/windows/playground/Playground.vcxproj +++ b/packages/playground/windows/playground/Playground.vcxproj @@ -166,7 +166,7 @@ - + diff --git a/packages/sample-apps/windows/SampleAppCPP/SampleAppCpp.vcxproj b/packages/sample-apps/windows/SampleAppCPP/SampleAppCpp.vcxproj index 8640780cd92..f183c2fc23b 100644 --- a/packages/sample-apps/windows/SampleAppCPP/SampleAppCpp.vcxproj +++ b/packages/sample-apps/windows/SampleAppCPP/SampleAppCpp.vcxproj @@ -178,7 +178,7 @@ - + diff --git a/packages/sample-apps/windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj b/packages/sample-apps/windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj index 706c15040fd..c7558f217d5 100644 --- a/packages/sample-apps/windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj +++ b/packages/sample-apps/windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj @@ -153,7 +153,7 @@ - + diff --git a/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj b/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj index 0b7bb5dbdf1..b3a2e674cb9 100644 --- a/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj +++ b/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj @@ -164,7 +164,7 @@ - + \ No newline at end of file diff --git a/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj b/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj index 6cb9281804e..fdc3e6ba0f2 100644 --- a/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj +++ b/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj @@ -120,7 +120,7 @@ - + diff --git a/vnext/Desktop/React.Windows.Desktop.vcxproj b/vnext/Desktop/React.Windows.Desktop.vcxproj index 33fa432fade..d117e258824 100644 --- a/vnext/Desktop/React.Windows.Desktop.vcxproj +++ b/vnext/Desktop/React.Windows.Desktop.vcxproj @@ -324,7 +324,7 @@ - + diff --git a/vnext/Microsoft.ReactNative.ComponentTests/Microsoft.ReactNative.ComponentTests.vcxproj b/vnext/Microsoft.ReactNative.ComponentTests/Microsoft.ReactNative.ComponentTests.vcxproj index ed984d76aed..933de86640d 100644 --- a/vnext/Microsoft.ReactNative.ComponentTests/Microsoft.ReactNative.ComponentTests.vcxproj +++ b/vnext/Microsoft.ReactNative.ComponentTests/Microsoft.ReactNative.ComponentTests.vcxproj @@ -229,7 +229,7 @@ - + diff --git a/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj b/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj index 6a24630dd4b..b24738451cf 100644 --- a/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj +++ b/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj @@ -163,7 +163,7 @@ - + diff --git a/vnext/Microsoft.ReactNative.Managed.CodeGen.UnitTests/Microsoft.ReactNative.Managed.CodeGen.UnitTests.csproj b/vnext/Microsoft.ReactNative.Managed.CodeGen.UnitTests/Microsoft.ReactNative.Managed.CodeGen.UnitTests.csproj index c1a98887365..74424b08560 100644 --- a/vnext/Microsoft.ReactNative.Managed.CodeGen.UnitTests/Microsoft.ReactNative.Managed.CodeGen.UnitTests.csproj +++ b/vnext/Microsoft.ReactNative.Managed.CodeGen.UnitTests/Microsoft.ReactNative.Managed.CodeGen.UnitTests.csproj @@ -60,7 +60,7 @@ <_ReactNativeManagedCodeGenUnitTestRuntimeDependencies Include="..\Microsoft.ReactNative.Managed\Microsoft.ReactNative.Managed.csproj" /> $(MSBuildThisFileDirectory)vnext\ + + x64 + Debug + + $(ReactNativeWindowsDir)build + $(ReactNativeWindowsDir)target + + $(RootIntDir)\x86\$(Configuration) + $(RootIntDir)\$(Platform)\$(Configuration) + $(RootOutDir)\x86\$(Configuration) + $(RootOutDir)\$(Platform)\$(Configuration) + + $(BaseIntDir)\$(ProjectName)\ + $(BaseOutDir)\$(ProjectName)\ + + $(OutDir)\Publish\ + $(IntDir)Generated Files\ diff --git a/vnext/Directory.Build.props b/vnext/Directory.Build.props index c12b974bbbf..4a59f82e898 100644 --- a/vnext/Directory.Build.props +++ b/vnext/Directory.Build.props @@ -7,9 +7,6 @@ $(MSBuildThisFileDirectory) - x64 - Debug - true @@ -45,14 +42,4 @@ $([MSBuild]::NormalizeDirectory($(FmtDir))) - - x86 - $(Platform) - - $(ReactNativeWindowsDir)build\$(ReactNativeWindowsPlatform)\$(Configuration)\$(ProjectName)\ - $(ReactNativeWindowsDir)target\$(ReactNativeWindowsPlatform)\$(Configuration)\$(ProjectName)\ - $(OutDir)\Publish\ - $(IntDir)Generated Files\ - - From 6d26510b39b4234b9c156cf2cfa9370c79faaf69 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sat, 13 Nov 2021 02:35:39 -0800 Subject: [PATCH 112/149] Detect when ProjectName prop is set --- Directory.Build.props | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index cb07ced1aa0..ed7e6995ff8 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -22,15 +22,18 @@ $(RootOutDir)\x86\$(Configuration) $(RootOutDir)\$(Platform)\$(Configuration) - $(BaseIntDir)\$(ProjectName)\ - $(BaseOutDir)\$(ProjectName)\ + $(BaseIntDir)\$(ProjectName)\ + $(BaseIntDir)\$(MSBuildProjectName)\ + $(BaseOutDir)\$(ProjectName)\ + $(BaseOutDir)\$(MSBuildProjectName)\ $(OutDir)\Publish\ $(IntDir)Generated Files\ - $(RootIntDir)\ProjectExtensions\$(MSBuildProjectName)\ + $(RootIntDir)\ProjectExtensions\$(ProjectName)\ + $(RootIntDir)\ProjectExtensions\$(MSBuildProjectName)\ From 05817099849ddbfedbf69946131080f96e2e32e2 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sat, 13 Nov 2021 02:36:05 -0800 Subject: [PATCH 113/149] Upgrade to Microsoft.Windows.CppWinRT 2.0.211028.7 --- .../windows/AutomationChannel/AutomationChannel.vcxproj | 2 +- .../@react-native-windows/cli/src/generator-windows/index.ts | 2 +- .../windows/integrationtest/integrationtest.vcxproj | 2 +- .../windows/playground-win32/Playground-win32.vcxproj | 2 +- packages/playground/windows/playground/Playground.vcxproj | 2 +- .../sample-apps/windows/SampleAppCPP/SampleAppCpp.vcxproj | 2 +- .../windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj | 2 +- vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj | 2 +- .../Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj | 2 +- vnext/Desktop/React.Windows.Desktop.vcxproj | 2 +- .../Microsoft.ReactNative.ComponentTests.vcxproj | 4 +--- .../Microsoft.ReactNative.Cxx.UnitTests.vcxproj | 2 +- .../Microsoft.ReactNative.IntegrationTests.vcxproj | 2 +- .../Microsoft.ReactNative.Managed.CodeGen.UnitTests.csproj | 2 +- vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj | 3 +-- vnext/Mso.UnitTests/Mso.UnitTests.vcxproj | 2 +- 16 files changed, 16 insertions(+), 19 deletions(-) diff --git a/packages/@react-native-windows/automation-channel/windows/AutomationChannel/AutomationChannel.vcxproj b/packages/@react-native-windows/automation-channel/windows/AutomationChannel/AutomationChannel.vcxproj index b0eeed0b241..c64509115b6 100644 --- a/packages/@react-native-windows/automation-channel/windows/AutomationChannel/AutomationChannel.vcxproj +++ b/packages/@react-native-windows/automation-channel/windows/AutomationChannel/AutomationChannel.vcxproj @@ -142,7 +142,7 @@ - + diff --git a/packages/@react-native-windows/cli/src/generator-windows/index.ts b/packages/@react-native-windows/cli/src/generator-windows/index.ts index 43908900981..709f662c5dd 100644 --- a/packages/@react-native-windows/cli/src/generator-windows/index.ts +++ b/packages/@react-native-windows/cli/src/generator-windows/index.ts @@ -165,7 +165,7 @@ export async function copyProjectTemplateAndReplace( const cppNugetPackages: NugetPackage[] = [ { id: 'Microsoft.Windows.CppWinRT', - version: '2.0.210312.4', + version: '2.0.211028.7', }, { id: 'ReactNative.Hermes.Windows', diff --git a/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj b/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj index e457bfcb4c2..6dff47ca34d 100644 --- a/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj +++ b/packages/integration-test-app/windows/integrationtest/integrationtest.vcxproj @@ -179,7 +179,7 @@ - + diff --git a/packages/playground/windows/playground-win32/Playground-win32.vcxproj b/packages/playground/windows/playground-win32/Playground-win32.vcxproj index aa42a9ccc8d..ae7b2301d98 100644 --- a/packages/playground/windows/playground-win32/Playground-win32.vcxproj +++ b/packages/playground/windows/playground-win32/Playground-win32.vcxproj @@ -177,7 +177,7 @@ --> - + diff --git a/packages/playground/windows/playground/Playground.vcxproj b/packages/playground/windows/playground/Playground.vcxproj index 102d673f931..7e9597eed73 100644 --- a/packages/playground/windows/playground/Playground.vcxproj +++ b/packages/playground/windows/playground/Playground.vcxproj @@ -166,7 +166,7 @@ - + diff --git a/packages/sample-apps/windows/SampleAppCPP/SampleAppCpp.vcxproj b/packages/sample-apps/windows/SampleAppCPP/SampleAppCpp.vcxproj index f183c2fc23b..1b2a9b28a2c 100644 --- a/packages/sample-apps/windows/SampleAppCPP/SampleAppCpp.vcxproj +++ b/packages/sample-apps/windows/SampleAppCPP/SampleAppCpp.vcxproj @@ -178,7 +178,7 @@ - + diff --git a/packages/sample-apps/windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj b/packages/sample-apps/windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj index c7558f217d5..3d30e7a7a50 100644 --- a/packages/sample-apps/windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj +++ b/packages/sample-apps/windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj @@ -153,7 +153,7 @@ - + diff --git a/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj b/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj index b3a2e674cb9..556598fa53f 100644 --- a/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj +++ b/vnext/Desktop.ABITests/React.Windows.Desktop.ABITests.vcxproj @@ -164,7 +164,7 @@ - + \ No newline at end of file diff --git a/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj b/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj index fdc3e6ba0f2..8141b9e0853 100644 --- a/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj +++ b/vnext/Desktop.UnitTests/React.Windows.Desktop.UnitTests.vcxproj @@ -120,7 +120,7 @@ - + diff --git a/vnext/Desktop/React.Windows.Desktop.vcxproj b/vnext/Desktop/React.Windows.Desktop.vcxproj index d117e258824..8cfe11ac9d6 100644 --- a/vnext/Desktop/React.Windows.Desktop.vcxproj +++ b/vnext/Desktop/React.Windows.Desktop.vcxproj @@ -324,7 +324,7 @@ - + diff --git a/vnext/Microsoft.ReactNative.ComponentTests/Microsoft.ReactNative.ComponentTests.vcxproj b/vnext/Microsoft.ReactNative.ComponentTests/Microsoft.ReactNative.ComponentTests.vcxproj index 933de86640d..7638720d424 100644 --- a/vnext/Microsoft.ReactNative.ComponentTests/Microsoft.ReactNative.ComponentTests.vcxproj +++ b/vnext/Microsoft.ReactNative.ComponentTests/Microsoft.ReactNative.ComponentTests.vcxproj @@ -8,8 +8,6 @@ {93792779-4948-4A5D-8CA7-86ED5E3BEC27} Win32Proj ReactComponentTests - 10.0.19041.0 - 10.0.16299.0 2 @@ -229,7 +227,7 @@ - + diff --git a/vnext/Microsoft.ReactNative.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.vcxproj b/vnext/Microsoft.ReactNative.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.vcxproj index 59cf0bb6f9d..10d59041474 100644 --- a/vnext/Microsoft.ReactNative.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.vcxproj +++ b/vnext/Microsoft.ReactNative.Cxx.UnitTests/Microsoft.ReactNative.Cxx.UnitTests.vcxproj @@ -163,7 +163,7 @@ - + diff --git a/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj b/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj index b24738451cf..f1786d6d5c3 100644 --- a/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj +++ b/vnext/Microsoft.ReactNative.IntegrationTests/Microsoft.ReactNative.IntegrationTests.vcxproj @@ -163,7 +163,7 @@ - + diff --git a/vnext/Microsoft.ReactNative.Managed.CodeGen.UnitTests/Microsoft.ReactNative.Managed.CodeGen.UnitTests.csproj b/vnext/Microsoft.ReactNative.Managed.CodeGen.UnitTests/Microsoft.ReactNative.Managed.CodeGen.UnitTests.csproj index 74424b08560..1292e984bf0 100644 --- a/vnext/Microsoft.ReactNative.Managed.CodeGen.UnitTests/Microsoft.ReactNative.Managed.CodeGen.UnitTests.csproj +++ b/vnext/Microsoft.ReactNative.Managed.CodeGen.UnitTests/Microsoft.ReactNative.Managed.CodeGen.UnitTests.csproj @@ -60,7 +60,7 @@ <_ReactNativeManagedCodeGenUnitTestRuntimeDependencies Include="..\Microsoft.ReactNative.Managed\Microsoft.ReactNative.Managed.csproj" /> + ComputeXamlGeneratedCLOutputs;$(BeforeLinkTargets) + Use From 35eb7a6ee77d0248c14119d696b7971e36154247 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 17 Nov 2021 20:16:01 -0800 Subject: [PATCH 116/149] Restore playground/packages.config --- packages/playground/windows/playground/Playground.vcxproj | 1 + packages/playground/windows/playground/packages.config | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 packages/playground/windows/playground/packages.config diff --git a/packages/playground/windows/playground/Playground.vcxproj b/packages/playground/windows/playground/Playground.vcxproj index 7e9597eed73..1d8a3a463b4 100644 --- a/packages/playground/windows/playground/Playground.vcxproj +++ b/packages/playground/windows/playground/Playground.vcxproj @@ -150,6 +150,7 @@ + false diff --git a/packages/playground/windows/playground/packages.config b/packages/playground/windows/playground/packages.config new file mode 100644 index 00000000000..43aaf3a9380 --- /dev/null +++ b/packages/playground/windows/playground/packages.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file From 60207abd4bd41d025d577e990121ee333accf197 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 17 Nov 2021 21:20:28 -0800 Subject: [PATCH 117/149] Undelete packages.config in playground-win32 --- .../playground-win32/Playground-win32.vcxproj | 1 + .../windows/playground-win32/packages.config | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 packages/playground/windows/playground-win32/packages.config diff --git a/packages/playground/windows/playground-win32/Playground-win32.vcxproj b/packages/playground/windows/playground-win32/Playground-win32.vcxproj index ae7b2301d98..8fe724f0f21 100644 --- a/packages/playground/windows/playground-win32/Playground-win32.vcxproj +++ b/packages/playground/windows/playground-win32/Playground-win32.vcxproj @@ -105,6 +105,7 @@ + diff --git a/packages/playground/windows/playground-win32/packages.config b/packages/playground/windows/playground-win32/packages.config new file mode 100644 index 00000000000..6e79f83a53b --- /dev/null +++ b/packages/playground/windows/playground-win32/packages.config @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file From 6aa4b8f859886a03017aeb2134e8bc73627f773c Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 17 Nov 2021 22:45:57 -0800 Subject: [PATCH 118/149] Playground: Restore packages.config directly for compatibility --- .ado/jobs/playground.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.ado/jobs/playground.yml b/.ado/jobs/playground.yml index 0b39eeaa4fb..f7fa64d601e 100644 --- a/.ado/jobs/playground.yml +++ b/.ado/jobs/playground.yml @@ -96,6 +96,27 @@ jobs: parameters: certificateName: playgroundEncodedKey + # Workaround. + # NuGet 6 ignores packages.config if it detects . + # Use restore packages.config directly to keep compabitility with ReactNativePicker. + - task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2 + displayName: NuGet restore + inputs: + command: restore + restoreSolution: ${{ parameters.solutionDir }}/playground/packages.config + feedsToUse: config + nugetConfigPath: ${{ parameters.solutionDir }}/NuGet.config + verbosityRestore: Detailed + + - task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2 + displayName: NuGet restore + inputs: + command: restore + restoreSolution: ${{ parameters.solutionDir }}/playground-win32/packages.config + feedsToUse: config + nugetConfigPath: ${{ parameters.solutionDir }}/NuGet.config + verbosityRestore: Detailed + - template: ../templates/msbuild-sln.yml parameters: solutionDir: packages/playground/windows From 27cb262424c517da7bd0a9fa0fed99bbe15d9528 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 17 Nov 2021 22:59:25 -0800 Subject: [PATCH 119/149] Specify packages.config paths --- .ado/jobs/playground.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.ado/jobs/playground.yml b/.ado/jobs/playground.yml index f7fa64d601e..080218cec2d 100644 --- a/.ado/jobs/playground.yml +++ b/.ado/jobs/playground.yml @@ -103,18 +103,18 @@ jobs: displayName: NuGet restore inputs: command: restore - restoreSolution: ${{ parameters.solutionDir }}/playground/packages.config + restoreSolution: packages/playground/windows/playground/packages.config feedsToUse: config - nugetConfigPath: ${{ parameters.solutionDir }}/NuGet.config + nugetConfigPath: packages/playground/windows/NuGet.config verbosityRestore: Detailed - task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2 displayName: NuGet restore inputs: command: restore - restoreSolution: ${{ parameters.solutionDir }}/playground-win32/packages.config + restoreSolution: packages/playground/windows/playground-win32/packages.config feedsToUse: config - nugetConfigPath: ${{ parameters.solutionDir }}/NuGet.config + nugetConfigPath: packages/playground/windows/NuGet.config verbosityRestore: Detailed - template: ../templates/msbuild-sln.yml From 0a4ecc67e4a036fe63808c5d5cfc26634d8c6bf5 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 17 Nov 2021 23:23:30 -0800 Subject: [PATCH 120/149] Disable RestoreLockedMode for Sample Apps --- .ado/jobs/sample-apps.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.ado/jobs/sample-apps.yml b/.ado/jobs/sample-apps.yml index 6d112c428fc..6d5f06571fc 100644 --- a/.ado/jobs/sample-apps.yml +++ b/.ado/jobs/sample-apps.yml @@ -92,6 +92,7 @@ jobs: deployOption: ${{ matrix.DeployOption }} buildLogDirectory: ${{ variables['BuildLogDirectory'] }} workingDirectory: packages/sample-apps + restoreLockedMode: false - script: yarn bundle-cpp --verbose displayName: Create SampleApp bundle From 8e94a57b27c893075ae5207593f38da5680d982d Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 17 Nov 2021 23:28:07 -0800 Subject: [PATCH 121/149] Playground - add WinUI 3 package --- packages/playground/windows/playground/packages.config | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/playground/windows/playground/packages.config b/packages/playground/windows/playground/packages.config index 43aaf3a9380..2d8532bd223 100644 --- a/packages/playground/windows/playground/packages.config +++ b/packages/playground/windows/playground/packages.config @@ -2,5 +2,6 @@ + \ No newline at end of file From e538c43e189910c3317cc70cafe9e3631a9842d7 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Thu, 18 Nov 2021 01:49:58 -0800 Subject: [PATCH 122/149] Update E2E packages.config --- .ado/jobs/e2e-test.yml | 22 ++++++++++++++++++++++ Directory.Build.props | 8 -------- packages/e2e-test-app/packages.config | 4 +++- vnext/Directory.Build.props | 8 ++++++++ 4 files changed, 33 insertions(+), 9 deletions(-) diff --git a/.ado/jobs/e2e-test.yml b/.ado/jobs/e2e-test.yml index ac63a7a2725..4075b20ba34 100644 --- a/.ado/jobs/e2e-test.yml +++ b/.ado/jobs/e2e-test.yml @@ -79,6 +79,27 @@ jobs: feature: UseHermes value: ${{ matrix.UseHermes }} + # Workaround. + # NuGet 6 ignores packages.config if it detects . + # Use restore packages.config directly to keep compabitility with ReactNativePicker. + - task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2 + displayName: NuGet restore + inputs: + command: restore + restoreSolution: node_modules/react-native-xaml/windows/ReactNativeXaml/packages.config + feedsToUse: config + nugetConfigPath: packages/e2e-test-app/windows/NuGet.config + verbosityRestore: Detailed + + - task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2 + displayName: NuGet restore + inputs: + command: restore + restoreSolution: packages/e2e-test-app/packages.config + feedsToUse: config + nugetConfigPath: packages/e2e-test-app/windows/NuGet.config + verbosityRestore: Detailed + - template: ../templates/run-windows-with-certificates.yml parameters: buildEnvironment: ${{ parameters.BuildEnvironment }} @@ -87,6 +108,7 @@ jobs: buildPlatform: ${{ matrix.BuildPlatform }} buildLogDirectory: $(BuildLogDirectory) workingDirectory: packages/e2e-test-app + restoreLockedMode: false - script: | echo ##vso[task.setvariable variable=StartedTests]true diff --git a/Directory.Build.props b/Directory.Build.props index ed7e6995ff8..a140ef6f36b 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -21,14 +21,6 @@ $(RootIntDir)\$(Platform)\$(Configuration) $(RootOutDir)\x86\$(Configuration) $(RootOutDir)\$(Platform)\$(Configuration) - - $(BaseIntDir)\$(ProjectName)\ - $(BaseIntDir)\$(MSBuildProjectName)\ - $(BaseOutDir)\$(ProjectName)\ - $(BaseOutDir)\$(MSBuildProjectName)\ - - $(OutDir)\Publish\ - $(IntDir)Generated Files\ diff --git a/packages/e2e-test-app/packages.config b/packages/e2e-test-app/packages.config index ec800fea9cd..bbcadd73b0f 100644 --- a/packages/e2e-test-app/packages.config +++ b/packages/e2e-test-app/packages.config @@ -1,4 +1,6 @@  - + + + \ No newline at end of file diff --git a/vnext/Directory.Build.props b/vnext/Directory.Build.props index 4a59f82e898..8726f262386 100644 --- a/vnext/Directory.Build.props +++ b/vnext/Directory.Build.props @@ -21,6 +21,14 @@ $(MSBuildProjectName) + + $(BaseIntDir)\$(ProjectName)\ + $(BaseIntDir)\$(MSBuildProjectName)\ + $(BaseOutDir)\$(ProjectName)\ + $(BaseOutDir)\$(MSBuildProjectName)\ + + $(OutDir)\Publish\ + $(IntDir)Generated Files\ + $(RootIntDir)\x86\$(Configuration) + $(RootIntDir)\$(Platform)\$(Configuration) + $(RootOutDir)\x86\$(Configuration) + $(RootOutDir)\$(Platform)\$(Configuration) + $(BaseIntDir)\$(ProjectName)\ $(BaseIntDir)\$(MSBuildProjectName)\ $(BaseOutDir)\$(ProjectName)\ From 673c83e4997f5993d70342bc4a1bc9a52b92ddc2 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Thu, 18 Nov 2021 20:52:43 -0800 Subject: [PATCH 124/149] Revert changes to equals-foo test --- .../@react-native-windows/cli/src/e2etest/autolink.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts b/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts index c9bbab6779c..24a72e0f52a 100644 --- a/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts +++ b/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts @@ -60,9 +60,9 @@ class AutolinkTest extends AutolinkWindows { test('autolink fixup sln', () => { const autolink = new AutolinkTest( - {windows: {}}, + {windows: {folder: __dirname, sourceDir: '.'}}, {}, - {check: true, logging: false}, + {check: true, logging: false, sln: 'foo'}, ); expect(autolink.getWindowsProjectConfig().solutionFile).toBeUndefined(); expect(() => { From 0f275570a3c30e022d7449d4be47cec382c72803 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Thu, 18 Nov 2021 21:05:03 -0800 Subject: [PATCH 125/149] Sync autolink.test with main --- .../cli/src/e2etest/autolink.test.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts b/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts index 24a72e0f52a..33c8283c9d8 100644 --- a/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts +++ b/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts @@ -284,7 +284,7 @@ test('ensureXAMLDialect - useWinUI3=false in react-native.config.js, useWinUI3=t const rnc = require(path.join(folder, 'react-native.config.js')); const config = projectConfigWindows(folder, rnc.project.windows)!; - delete config.useWinUI3; + config.useWinUI3 = false; const al = new AutolinkTest( {windows: config}, {}, @@ -293,19 +293,20 @@ test('ensureXAMLDialect - useWinUI3=false in react-native.config.js, useWinUI3=t logging: false, }, ); - al.experimentalFeaturesProps = `false2.7.0-test`; + al.experimentalFeaturesProps = `true`; const exd = await al.ensureXAMLDialect(); expect(exd).toBeTruthy(); const expectedExperimentalFeatures = - 'false2.7.0-test'; + 'false'; + expect(al.experimentalFeaturesProps).toEqual(expectedExperimentalFeatures); // example packages.config: // // - // + // // // // expect(al.packagesConfig).toContain('Microsoft.UI.Xaml'); From cedbf93a5bb8561566d4e207bf69b7768155c0e9 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Thu, 18 Nov 2021 21:06:38 -0800 Subject: [PATCH 126/149] Format --- packages/@react-native-windows/cli/src/e2etest/autolink.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts b/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts index 33c8283c9d8..bce135bebff 100644 --- a/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts +++ b/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts @@ -306,7 +306,7 @@ test('ensureXAMLDialect - useWinUI3=false in react-native.config.js, useWinUI3=t // example packages.config: // // - // + // // // // expect(al.packagesConfig).toContain('Microsoft.UI.Xaml'); From d1c61dedbf59a1f5c30f3addc291bc2818bdedb4 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Thu, 18 Nov 2021 21:07:22 -0800 Subject: [PATCH 127/149] Format --- packages/@react-native-windows/cli/src/e2etest/autolink.test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts b/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts index bce135bebff..62a2e0794ef 100644 --- a/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts +++ b/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts @@ -300,7 +300,6 @@ test('ensureXAMLDialect - useWinUI3=false in react-native.config.js, useWinUI3=t const expectedExperimentalFeatures = 'false'; - expect(al.experimentalFeaturesProps).toEqual(expectedExperimentalFeatures); // example packages.config: From b3b1d5559a8355326bec909e64724b19c78e030f Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Fri, 19 Nov 2021 23:21:35 -0800 Subject: [PATCH 128/149] Refresh autolink source --- .../cli/src/e2etest/autolink.test.ts | 119 +++++++++++++++- .../cli/src/runWindows/utils/autolink.ts | 132 ++---------------- 2 files changed, 125 insertions(+), 126 deletions(-) diff --git a/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts b/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts index 62a2e0794ef..d61445b3017 100644 --- a/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts +++ b/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts @@ -276,6 +276,17 @@ test('ensureXAMLDialect - useWinUI3=true in react-native.config.js, useWinUI3=fa 'true'; expect(al.experimentalFeaturesProps).toEqual(expectedExperimentalFeatures); + // example packages.config: + // + // + // + // + // + // expect(al.packagesConfig).toContain('Microsoft.WinUI'); + // expect(al.packagesConfig).toContain(''); + // expect(al.packagesConfig).not.toContain('Microsoft.UI.Xaml'); + //TODO + done(); }); @@ -308,11 +319,10 @@ test('ensureXAMLDialect - useWinUI3=false in react-native.config.js, useWinUI3=t // // // - // expect(al.packagesConfig).toContain('Microsoft.UI.Xaml'); - // expect(al.packagesConfig).toContain('2.7.0-test'); - // expect(al.packagesConfig).toContain(''); // expect(al.packagesConfig).not.toContain('Microsoft.WinUI'); - //TODO: Evaluate properties using a different mechanism. + // expect(al.packagesConfig).toContain(''); + // expect(al.packagesConfig).toContain('Microsoft.UI.Xaml'); + //TODO done(); }); @@ -340,6 +350,17 @@ test('ensureXAMLDialect - useWinUI3 not in react-native.config.js, useWinUI3=tru 'true'; expect(al.experimentalFeaturesProps).toEqual(expectedExperimentalFeatures); + // example packages.config: + // + // + // + // + // + // expect(al.packagesConfig).toContain('Microsoft.WinUI'); + // expect(al.packagesConfig).toContain(''); + // expect(al.packagesConfig).not.toContain('Microsoft.UI.Xaml'); + //TODO + done(); }); @@ -366,6 +387,94 @@ test('ensureXAMLDialect - useWinUI3 not in react-native.config.js, useWinUI3=fal 'false'; expect(al.experimentalFeaturesProps).toEqual(expectedExperimentalFeatures); + // example packages.config: + // + // + // + // + // + // expect(al.packagesConfig).not.toContain('Microsoft.WinUI'); + // expect(al.packagesConfig).toContain(''); + // expect(al.packagesConfig).toContain('Microsoft.UI.Xaml'); + //TODO + + done(); +}); + +test('ensureXAMLDialect - WinUI2xVersion specified in ExperimentalFeatures.props', async done => { + const folder = path.resolve('src/e2etest/projects/WithWinUI3'); + const rnc = require(path.join(folder, 'react-native.config.js')); + + const config = projectConfigWindows(folder, rnc.project.windows)!; + delete config.useWinUI3; + const al = new AutolinkTest( + {windows: config}, + {}, + { + check: false, + logging: false, + }, + ); + al.experimentalFeaturesProps = `false2.7.0-test`; + + const exd = await al.ensureXAMLDialect(); + expect(exd).toBeTruthy(); + + const expectedExperimentalFeatures = + 'false2.7.0-test'; + expect(al.experimentalFeaturesProps).toEqual(expectedExperimentalFeatures); + + // example packages.config: + // + // + // + // + // + // expect(al.packagesConfig).toContain('Microsoft.UI.Xaml'); + // expect(al.packagesConfig).toContain('2.7.0-test'); + // expect(al.packagesConfig).toContain(''); + // expect(al.packagesConfig).not.toContain('Microsoft.WinUI'); + //TODO + + done(); +}); + +test('ensureXAMLDialect - WinUI3Version specified in ExperimentalFeatures.props', async done => { + const folder = path.resolve('src/e2etest/projects/WithWinUI3'); + const rnc = require(path.join(folder, 'react-native.config.js')); + + const config = projectConfigWindows(folder, rnc.project.windows)!; + + const al = new AutolinkTest( + {windows: config}, + {}, + { + check: false, + logging: false, + }, + ); + al.experimentalFeaturesProps = `true3.0.0-test`; + + const exd = await al.ensureXAMLDialect(); + expect(exd).toBeTruthy(); + + const expectedExperimentalFeatures = + 'true3.0.0-test'; + expect(al.experimentalFeaturesProps).toEqual(expectedExperimentalFeatures); + + // example packages.config: + // + // + // + // + // + + // expect(al.packagesConfig).toContain('Microsoft.WinUI'); + // expect(al.packagesConfig).toContain('3.0.0-test'); + // expect(al.packagesConfig).toContain(''); + // expect(al.packagesConfig).not.toContain('Microsoft.UI.Xaml'); + //TODO + done(); }); @@ -451,7 +560,7 @@ test('autolinkOptions - validate options', () => { expect(commandOption.description).not.toBeNull(); expect(commandOption.description!).toBe(commandOption.description!.trim()); - // Validate all command options are present in RunWindowsOptions + // Validate all command options are present in AutoLinkOptions const optionName = commanderNameToOptionName(commandOption.name); expect( validateOptionName( diff --git a/packages/@react-native-windows/cli/src/runWindows/utils/autolink.ts b/packages/@react-native-windows/cli/src/runWindows/utils/autolink.ts index 09f3dc4c3ca..e0cb2e0f124 100644 --- a/packages/@react-native-windows/cli/src/runWindows/utils/autolink.ts +++ b/packages/@react-native-windows/cli/src/runWindows/utils/autolink.ts @@ -684,7 +684,7 @@ export class AutolinkWindows { } public async ensureXAMLDialect() { - let changesNeeded = true; + let changesNeeded = false; const useWinUI3FromConfig = this.getWindowsConfig().useWinUI3; const experimentalFeatures = this.getExperimentalFeaturesPropsXml(); if (experimentalFeatures) { @@ -702,21 +702,22 @@ export class AutolinkWindows { experimentalFeatures.content, 'WinUI3Version', ); - // Use the UseWinUI3 value in react-native.config.js, or if not present, the value from ExperimentalFeatures.props - changesNeeded = await this.updatePackagesConfigXAMLDialect( - useWinUI3FromConfig !== undefined - ? useWinUI3FromConfig - : useWinUI3FromExperimentalFeatures, - targetWinUI2xVersion, - targetWinUI3xVersion, - ); + //TODO + // // Use the UseWinUI3 value in react-native.config.js, or if not present, the value from ExperimentalFeatures.props + // changesNeeded = await this.updatePackagesConfigXAMLDialect( + // useWinUI3FromConfig !== undefined + // ? useWinUI3FromConfig + // : useWinUI3FromExperimentalFeatures, + // targetWinUI2xVersion, + // targetWinUI3xVersion, + // ); if (useWinUI3FromConfig !== undefined) { // Make sure ExperimentalFeatures.props matches the value that comes from react-native.config.js const node = experimentalFeatures.content.getElementsByTagName( 'UseWinUI3', ); const newValue = useWinUI3FromConfig ? 'true' : 'false'; - changesNeeded = node.item(0)?.textContent !== newValue && changesNeeded; + changesNeeded = node.item(0)?.textContent !== newValue || changesNeeded; if (!this.options.check && changesNeeded) { node.item(0)!.textContent = newValue; const experimentalFeaturesOutput = new XMLSerializer().serializeToString( @@ -732,117 +733,6 @@ export class AutolinkWindows { return changesNeeded; } - protected getPackagesConfigXml() { - const projectFile = this.getProjectFile(); - const packagesConfig = path.join( - path.dirname(projectFile), - 'packages.config', - ); - - if (fs.existsSync(packagesConfig)) { - return { - path: packagesConfig, - content: configUtils.readProjectFile(packagesConfig), - }; - } - return undefined; - } - - private async updatePackagesConfigXAMLDialect( - useWinUI3: boolean, - targetWinUI2xVersion: string | null, - targetWinUI3xVersion: string | null, - ) { - let changed = false; - const packagesConfig = this.getPackagesConfigXml(); - if (packagesConfig) { - // if we don't have a packages.config, then this is a C# project, in which case we use and dynamically pick the right XAML package. - const project = this.getWindowsConfig(); - - const winUIPropsPath = path.join( - resolveRnwRoot(project), - 'PropertySheets/WinUI.props', - ); - const winuiPropsContents = configUtils.readProjectFile(winUIPropsPath); - - // Use the given WinUI2xVersion, otherwise fallback to WinUI.props - const winui2xVersion = - targetWinUI2xVersion ?? - configUtils.tryFindPropertyValue(winuiPropsContents, 'WinUI2xVersion'); - - // Use the given WinUI3Version, otherwise fallback to WinUI.props - const winui3Version = - targetWinUI3xVersion ?? - configUtils.tryFindPropertyValue(winuiPropsContents, 'WinUI3Version'); - - const dialects = [ - {id: 'Microsoft.WinUI', version: winui3Version!}, - {id: 'Microsoft.UI.Xaml', version: winui2xVersion!}, - ]; - const keepPkg = useWinUI3 ? dialects[0] : dialects[1]; - const removePkg = useWinUI3 ? dialects[1] : dialects[0]; - - changed = this.updatePackagesConfig( - packagesConfig, - [removePkg], - [keepPkg], - ); - - if (!this.options.check && changed) { - const serializer = new XMLSerializer(); - const output = serializer.serializeToString(packagesConfig.content); - const formattedXml = formatter(output, {indentation: ' '}); - await this.updateFile(packagesConfig.path, formattedXml); - } - } - return changed; - } - - private updatePackagesConfig( - packagesConfig: {path: string; content: Document}, - removePkgs: {id: string; version: string}[], - keepPkgs: {id: string; version: string}[], - ) { - let changed = false; - const packageElements = packagesConfig.content.documentElement.getElementsByTagName( - 'package', - ); - - const nodesToRemove: Element[] = []; - - for (let i = 0; i < packageElements.length; i++) { - const packageElement = packageElements.item(i)!; - const idAttr = packageElement!.getAttributeNode('id'); - const id = idAttr!.value; - const keepPkg = keepPkgs.find(pkg => pkg.id === id); - if (removePkgs.find(pkg => pkg.id === id)) { - nodesToRemove.push(packageElement); - changed = true; - } else if (keepPkg) { - changed = - changed || keepPkg.version !== packageElement.getAttribute('version'); - packageElement.setAttribute('version', keepPkg.version!); - keepPkgs = keepPkgs.filter(pkg => pkg.id !== keepPkg.id); - } - } - - nodesToRemove.forEach(pkg => - packagesConfig.content.documentElement.removeChild(pkg), - ); - - keepPkgs.forEach(keepPkg => { - const newPkg = packagesConfig.content.createElement('package'); - - Object.entries(keepPkg).forEach(([attr, value]) => { - newPkg.setAttribute(attr, value as string); - }); - newPkg.setAttribute('targetFramework', 'native'); - packagesConfig.content.documentElement.appendChild(newPkg); - changed = true; - }); - return changed; - } - /** @return The CLI command to invoke autolink-windows independently */ public getAutolinkWindowsCommand() { const folder = this.windowsAppConfig.folder; From 519dc531ffd769690f083c64fb852f1ea85a8ecb Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sat, 20 Nov 2021 00:17:05 -0800 Subject: [PATCH 129/149] Revert autolink changes --- .../cli/src/e2etest/autolink.test.ts | 66 +++++---- .../cli/src/runWindows/utils/autolink.ts | 128 ++++++++++++++++-- 2 files changed, 158 insertions(+), 36 deletions(-) diff --git a/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts b/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts index d61445b3017..965b3276ba9 100644 --- a/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts +++ b/packages/@react-native-windows/cli/src/e2etest/autolink.test.ts @@ -38,7 +38,17 @@ class AutolinkTest extends AutolinkWindows { public getWindowsProjectConfig() { return this.windowsAppConfig; } + public packagesConfig = ''; public experimentalFeaturesProps = ''; + protected getPackagesConfigXml() { + return { + path: 'packages.config', + content: new DOMParser().parseFromString( + this.packagesConfig, + 'application/xml', + ), + }; + } protected getExperimentalFeaturesPropsXml() { return { path: 'ExperimentalFeatures.props', @@ -49,7 +59,9 @@ class AutolinkTest extends AutolinkWindows { }; } protected async updateFile(filepath: string, content: string) { - if (filepath === 'ExperimentalFeatures.props') { + if (filepath === 'packages.config') { + this.packagesConfig = content; + } else if (filepath === 'ExperimentalFeatures.props') { this.experimentalFeaturesProps = content; } else { throw new Error(`Unknown path: ${filepath}`); @@ -268,6 +280,7 @@ test('ensureXAMLDialect - useWinUI3=true in react-native.config.js, useWinUI3=fa }, ); al.experimentalFeaturesProps = `false`; + al.packagesConfig = ``; const exd = await al.ensureXAMLDialect(); expect(exd).toBeTruthy(); @@ -282,10 +295,9 @@ test('ensureXAMLDialect - useWinUI3=true in react-native.config.js, useWinUI3=fa // // // - // expect(al.packagesConfig).toContain('Microsoft.WinUI'); - // expect(al.packagesConfig).toContain(''); - // expect(al.packagesConfig).not.toContain('Microsoft.UI.Xaml'); - //TODO + expect(al.packagesConfig).toContain('Microsoft.WinUI'); + expect(al.packagesConfig).toContain(''); + expect(al.packagesConfig).not.toContain('Microsoft.UI.Xaml'); done(); }); @@ -305,6 +317,7 @@ test('ensureXAMLDialect - useWinUI3=false in react-native.config.js, useWinUI3=t }, ); al.experimentalFeaturesProps = `true`; + al.packagesConfig = ``; const exd = await al.ensureXAMLDialect(); expect(exd).toBeTruthy(); @@ -319,10 +332,9 @@ test('ensureXAMLDialect - useWinUI3=false in react-native.config.js, useWinUI3=t // // // - // expect(al.packagesConfig).not.toContain('Microsoft.WinUI'); - // expect(al.packagesConfig).toContain(''); - // expect(al.packagesConfig).toContain('Microsoft.UI.Xaml'); - //TODO + expect(al.packagesConfig).not.toContain('Microsoft.WinUI'); + expect(al.packagesConfig).toContain(''); + expect(al.packagesConfig).toContain('Microsoft.UI.Xaml'); done(); }); @@ -342,6 +354,7 @@ test('ensureXAMLDialect - useWinUI3 not in react-native.config.js, useWinUI3=tru }, ); al.experimentalFeaturesProps = `true`; + al.packagesConfig = ``; const exd = await al.ensureXAMLDialect(); expect(exd).toBeTruthy(); @@ -356,10 +369,9 @@ test('ensureXAMLDialect - useWinUI3 not in react-native.config.js, useWinUI3=tru // // // - // expect(al.packagesConfig).toContain('Microsoft.WinUI'); - // expect(al.packagesConfig).toContain(''); - // expect(al.packagesConfig).not.toContain('Microsoft.UI.Xaml'); - //TODO + expect(al.packagesConfig).toContain('Microsoft.WinUI'); + expect(al.packagesConfig).toContain(''); + expect(al.packagesConfig).not.toContain('Microsoft.UI.Xaml'); done(); }); @@ -379,6 +391,7 @@ test('ensureXAMLDialect - useWinUI3 not in react-native.config.js, useWinUI3=fal }, ); al.experimentalFeaturesProps = `false`; + al.packagesConfig = ``; const exd = await al.ensureXAMLDialect(); expect(exd).toBeTruthy(); @@ -393,10 +406,9 @@ test('ensureXAMLDialect - useWinUI3 not in react-native.config.js, useWinUI3=fal // // // - // expect(al.packagesConfig).not.toContain('Microsoft.WinUI'); - // expect(al.packagesConfig).toContain(''); - // expect(al.packagesConfig).toContain('Microsoft.UI.Xaml'); - //TODO + expect(al.packagesConfig).not.toContain('Microsoft.WinUI'); + expect(al.packagesConfig).toContain(''); + expect(al.packagesConfig).toContain('Microsoft.UI.Xaml'); done(); }); @@ -416,6 +428,7 @@ test('ensureXAMLDialect - WinUI2xVersion specified in ExperimentalFeatures.props }, ); al.experimentalFeaturesProps = `false2.7.0-test`; + al.packagesConfig = ``; const exd = await al.ensureXAMLDialect(); expect(exd).toBeTruthy(); @@ -430,11 +443,10 @@ test('ensureXAMLDialect - WinUI2xVersion specified in ExperimentalFeatures.props // // // - // expect(al.packagesConfig).toContain('Microsoft.UI.Xaml'); - // expect(al.packagesConfig).toContain('2.7.0-test'); - // expect(al.packagesConfig).toContain(''); - // expect(al.packagesConfig).not.toContain('Microsoft.WinUI'); - //TODO + expect(al.packagesConfig).toContain('Microsoft.UI.Xaml'); + expect(al.packagesConfig).toContain('2.7.0-test'); + expect(al.packagesConfig).toContain(''); + expect(al.packagesConfig).not.toContain('Microsoft.WinUI'); done(); }); @@ -454,6 +466,7 @@ test('ensureXAMLDialect - WinUI3Version specified in ExperimentalFeatures.props' }, ); al.experimentalFeaturesProps = `true3.0.0-test`; + al.packagesConfig = ``; const exd = await al.ensureXAMLDialect(); expect(exd).toBeTruthy(); @@ -469,11 +482,10 @@ test('ensureXAMLDialect - WinUI3Version specified in ExperimentalFeatures.props' // // - // expect(al.packagesConfig).toContain('Microsoft.WinUI'); - // expect(al.packagesConfig).toContain('3.0.0-test'); - // expect(al.packagesConfig).toContain(''); - // expect(al.packagesConfig).not.toContain('Microsoft.UI.Xaml'); - //TODO + expect(al.packagesConfig).toContain('Microsoft.WinUI'); + expect(al.packagesConfig).toContain('3.0.0-test'); + expect(al.packagesConfig).toContain(''); + expect(al.packagesConfig).not.toContain('Microsoft.UI.Xaml'); done(); }); diff --git a/packages/@react-native-windows/cli/src/runWindows/utils/autolink.ts b/packages/@react-native-windows/cli/src/runWindows/utils/autolink.ts index e0cb2e0f124..8abc01fd2ed 100644 --- a/packages/@react-native-windows/cli/src/runWindows/utils/autolink.ts +++ b/packages/@react-native-windows/cli/src/runWindows/utils/autolink.ts @@ -702,15 +702,14 @@ export class AutolinkWindows { experimentalFeatures.content, 'WinUI3Version', ); - //TODO - // // Use the UseWinUI3 value in react-native.config.js, or if not present, the value from ExperimentalFeatures.props - // changesNeeded = await this.updatePackagesConfigXAMLDialect( - // useWinUI3FromConfig !== undefined - // ? useWinUI3FromConfig - // : useWinUI3FromExperimentalFeatures, - // targetWinUI2xVersion, - // targetWinUI3xVersion, - // ); + // Use the UseWinUI3 value in react-native.config.js, or if not present, the value from ExperimentalFeatures.props + changesNeeded = await this.updatePackagesConfigXAMLDialect( + useWinUI3FromConfig !== undefined + ? useWinUI3FromConfig + : useWinUI3FromExperimentalFeatures, + targetWinUI2xVersion, + targetWinUI3xVersion, + ); if (useWinUI3FromConfig !== undefined) { // Make sure ExperimentalFeatures.props matches the value that comes from react-native.config.js const node = experimentalFeatures.content.getElementsByTagName( @@ -733,6 +732,117 @@ export class AutolinkWindows { return changesNeeded; } + protected getPackagesConfigXml() { + const projectFile = this.getProjectFile(); + const packagesConfig = path.join( + path.dirname(projectFile), + 'packages.config', + ); + + if (fs.existsSync(packagesConfig)) { + return { + path: packagesConfig, + content: configUtils.readProjectFile(packagesConfig), + }; + } + return undefined; + } + + private async updatePackagesConfigXAMLDialect( + useWinUI3: boolean, + targetWinUI2xVersion: string | null, + targetWinUI3xVersion: string | null, + ) { + let changed = false; + const packagesConfig = this.getPackagesConfigXml(); + if (packagesConfig) { + // if we don't have a packages.config, then this is a C# project, in which case we use and dynamically pick the right XAML package. + const project = this.getWindowsConfig(); + + const winUIPropsPath = path.join( + resolveRnwRoot(project), + 'PropertySheets/WinUI.props', + ); + const winuiPropsContents = configUtils.readProjectFile(winUIPropsPath); + + // Use the given WinUI2xVersion, otherwise fallback to WinUI.props + const winui2xVersion = + targetWinUI2xVersion ?? + configUtils.tryFindPropertyValue(winuiPropsContents, 'WinUI2xVersion'); + + // Use the given WinUI3Version, otherwise fallback to WinUI.props + const winui3Version = + targetWinUI3xVersion ?? + configUtils.tryFindPropertyValue(winuiPropsContents, 'WinUI3Version'); + + const dialects = [ + {id: 'Microsoft.WinUI', version: winui3Version!}, + {id: 'Microsoft.UI.Xaml', version: winui2xVersion!}, + ]; + const keepPkg = useWinUI3 ? dialects[0] : dialects[1]; + const removePkg = useWinUI3 ? dialects[1] : dialects[0]; + + changed = this.updatePackagesConfig( + packagesConfig, + [removePkg], + [keepPkg], + ); + + if (!this.options.check && changed) { + const serializer = new XMLSerializer(); + const output = serializer.serializeToString(packagesConfig.content); + const formattedXml = formatter(output, {indentation: ' '}); + await this.updateFile(packagesConfig.path, formattedXml); + } + } + return changed; + } + + private updatePackagesConfig( + packagesConfig: {path: string; content: Document}, + removePkgs: {id: string; version: string}[], + keepPkgs: {id: string; version: string}[], + ) { + let changed = false; + const packageElements = packagesConfig.content.documentElement.getElementsByTagName( + 'package', + ); + + const nodesToRemove: Element[] = []; + + for (let i = 0; i < packageElements.length; i++) { + const packageElement = packageElements.item(i)!; + const idAttr = packageElement!.getAttributeNode('id'); + const id = idAttr!.value; + const keepPkg = keepPkgs.find(pkg => pkg.id === id); + if (removePkgs.find(pkg => pkg.id === id)) { + nodesToRemove.push(packageElement); + changed = true; + } else if (keepPkg) { + changed = + changed || keepPkg.version !== packageElement.getAttribute('version'); + packageElement.setAttribute('version', keepPkg.version!); + keepPkgs = keepPkgs.filter(pkg => pkg.id !== keepPkg.id); + } + } + + nodesToRemove.forEach(pkg => + packagesConfig.content.documentElement.removeChild(pkg), + ); + + keepPkgs.forEach(keepPkg => { + const newPkg = packagesConfig.content.createElement('package'); + + Object.entries(keepPkg).forEach(([attr, value]) => { + newPkg.setAttribute(attr, value as string); + }); + newPkg.setAttribute('targetFramework', 'native'); + packagesConfig.content.documentElement.appendChild(newPkg); + changed = true; + }); + return changed; + } + /** @return The CLI command to invoke autolink-windows independently */ public getAutolinkWindowsCommand() { const folder = this.windowsAppConfig.folder; From 81304559d3602cdc34a9e7147076c4faa61b8c65 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Mon, 22 Nov 2021 12:00:50 -0800 Subject: [PATCH 130/149] Revert msbuildtools.ts --- .../cli/src/runWindows/utils/msbuildtools.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@react-native-windows/cli/src/runWindows/utils/msbuildtools.ts b/packages/@react-native-windows/cli/src/runWindows/utils/msbuildtools.ts index 13221c2ca87..f875aea0bd4 100644 --- a/packages/@react-native-windows/cli/src/runWindows/utils/msbuildtools.ts +++ b/packages/@react-native-windows/cli/src/runWindows/utils/msbuildtools.ts @@ -104,7 +104,7 @@ export default class MSBuildTools { } if (target === 'build') { - args.push('/restore'); + args.push('/restore', '/p:RestorePackagesConfig=true'); } else { args.push(`/t:Deploy`); } From cd7b4c273831361c19919b1b6800acd27e236aa2 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Mon, 22 Nov 2021 13:45:01 -0800 Subject: [PATCH 131/149] Use Choose group for conditional PackageReference items --- .../React.Windows.Desktop.DLL.vcxproj | 16 ++++++++++++---- vnext/Desktop/React.Windows.Desktop.vcxproj | 16 ++++++++++++---- .../Microsoft.ReactNative.vcxproj | 16 ++++++++++++---- 3 files changed, 36 insertions(+), 12 deletions(-) diff --git a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj index 00250beee31..fa08951cc2e 100644 --- a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj +++ b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj @@ -148,13 +148,21 @@ - - - - + + + + + + + + + + + + true diff --git a/vnext/Desktop/React.Windows.Desktop.vcxproj b/vnext/Desktop/React.Windows.Desktop.vcxproj index 8cfe11ac9d6..ee6293598f3 100644 --- a/vnext/Desktop/React.Windows.Desktop.vcxproj +++ b/vnext/Desktop/React.Windows.Desktop.vcxproj @@ -321,14 +321,22 @@ - - - - + + + + + + + + + + + + diff --git a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj index 6cecb927ae3..dd4ee7a5a4f 100644 --- a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +++ b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj @@ -803,14 +803,22 @@ - - - - + + + + + + + + + + + + From 7144b68016ea6c1bda32e8c88b5f3c4b6e4aa155 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Mon, 22 Nov 2021 14:01:41 -0800 Subject: [PATCH 132/149] Use one PackageReference Choos per variable --- vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj | 4 +++- vnext/Desktop/React.Windows.Desktop.vcxproj | 4 +++- vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj index fa08951cc2e..ab8a1b721fe 100644 --- a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj +++ b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj @@ -151,7 +151,7 @@ - + @@ -159,6 +159,8 @@ + + diff --git a/vnext/Desktop/React.Windows.Desktop.vcxproj b/vnext/Desktop/React.Windows.Desktop.vcxproj index ee6293598f3..805e130849b 100644 --- a/vnext/Desktop/React.Windows.Desktop.vcxproj +++ b/vnext/Desktop/React.Windows.Desktop.vcxproj @@ -325,7 +325,7 @@ - + @@ -333,6 +333,8 @@ + + diff --git a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj index dd4ee7a5a4f..608f2a85672 100644 --- a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +++ b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj @@ -815,6 +815,8 @@ + + From c2ac06dc389e330dcb704ad097a597cf473d16b5 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Mon, 22 Nov 2021 14:18:32 -0800 Subject: [PATCH 133/149] Add missing --- vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj | 4 +++- vnext/Desktop/React.Windows.Desktop.vcxproj | 4 +++- vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj | 6 ++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj index ab8a1b721fe..b799b92974b 100644 --- a/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj +++ b/vnext/Desktop.DLL/React.Windows.Desktop.DLL.vcxproj @@ -162,7 +162,9 @@ - + + + diff --git a/vnext/Desktop/React.Windows.Desktop.vcxproj b/vnext/Desktop/React.Windows.Desktop.vcxproj index 805e130849b..9fba43ab878 100644 --- a/vnext/Desktop/React.Windows.Desktop.vcxproj +++ b/vnext/Desktop/React.Windows.Desktop.vcxproj @@ -336,7 +336,9 @@ - + + + diff --git a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj index 608f2a85672..6c8f54151a2 100644 --- a/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +++ b/vnext/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj @@ -807,7 +807,7 @@ - + @@ -818,7 +818,9 @@ - + + + From 6a1baacd22f2a96cd9393422d8d3df2200da9514 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Mon, 22 Nov 2021 23:54:26 -0800 Subject: [PATCH 134/149] Drop common,fmt,folly from managed packages lock --- .../packages.lock.json | 25 +------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/vnext/Microsoft.ReactNative.Managed/packages.lock.json b/vnext/Microsoft.ReactNative.Managed/packages.lock.json index 4696088be3f..04e54db679e 100644 --- a/vnext/Microsoft.ReactNative.Managed/packages.lock.json +++ b/vnext/Microsoft.ReactNative.Managed/packages.lock.json @@ -135,31 +135,8 @@ "resolved": "2.2.9", "contentHash": "qF6RRZKaflI+LR1YODNyWYjq5YoX8IJ2wx5y8O+AW2xO+1t/Q6Mm+jQ38zJbWnmXbrcOqUYofn7Y3/KC6lTLBQ==" }, - "common": { - "type": "Project" - }, - "fmt": { - "type": "Project" - }, - "folly": { - "type": "Project", - "dependencies": { - "fmt": "1.0.0" - } - }, "microsoft.reactnative": { - "type": "Project", - "dependencies": { - "Common": "1.0.0", - "Folly": "1.0.0", - "ReactCommon": "1.0.0" - } - }, - "reactcommon": { - "type": "Project", - "dependencies": { - "Folly": "1.0.0" - } + "type": "Project" } }, "UAP,Version=v10.0.16299/win10-arm": { From 1093bff6c357073be37dd60535c9c65b4a725a35 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Tue, 23 Nov 2021 00:06:51 -0800 Subject: [PATCH 135/149] Enable RestoreForceEvaluate with RestoreLockedMode --- .ado/jobs/e2e-test.yml | 1 - .ado/jobs/sample-apps.yml | 10 ---------- .ado/templates/msbuild-sln.yml | 2 ++ .ado/templates/run-windows-with-certificates.yml | 9 ++++++--- 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/.ado/jobs/e2e-test.yml b/.ado/jobs/e2e-test.yml index 4075b20ba34..71f69d1e160 100644 --- a/.ado/jobs/e2e-test.yml +++ b/.ado/jobs/e2e-test.yml @@ -108,7 +108,6 @@ jobs: buildPlatform: ${{ matrix.BuildPlatform }} buildLogDirectory: $(BuildLogDirectory) workingDirectory: packages/e2e-test-app - restoreLockedMode: false - script: | echo ##vso[task.setvariable variable=StartedTests]true diff --git a/.ado/jobs/sample-apps.yml b/.ado/jobs/sample-apps.yml index 6d5f06571fc..ced608e914b 100644 --- a/.ado/jobs/sample-apps.yml +++ b/.ado/jobs/sample-apps.yml @@ -74,15 +74,6 @@ jobs: configuration: ${{ matrix.BuildConfiguration }} buildEnvironment: ${{ config.BuildEnvironment }} - - task: MSBuild@1 - displayName: Restore NuGet packages - inputs: - solution: packages/sample-apps/windows/SampleApps.sln - msbuildArchitecture: x64 - platform: ${{ matrix.BuildPlatform }} - configuration: ${{ matrix.BuildConfiguration }} - msbuildArguments: /t:Restore - - template: ../templates/run-windows-with-certificates.yml parameters: buildEnvironment: ${{ parameters.BuildEnvironment }} @@ -92,7 +83,6 @@ jobs: deployOption: ${{ matrix.DeployOption }} buildLogDirectory: ${{ variables['BuildLogDirectory'] }} workingDirectory: packages/sample-apps - restoreLockedMode: false - script: yarn bundle-cpp --verbose displayName: Create SampleApp bundle diff --git a/.ado/templates/msbuild-sln.yml b/.ado/templates/msbuild-sln.yml index 47fc22052c9..e2e92050f66 100644 --- a/.ado/templates/msbuild-sln.yml +++ b/.ado/templates/msbuild-sln.yml @@ -50,6 +50,8 @@ steps: /p:PlatformToolset=${{parameters.platformToolset}} /p:PublishToolDuringBuild=true /p:EnableSourceLink=true + /p:RestoreLockedMode=true + /p:RestoreForceEvaluate=true /bl:$(BuildLogDirectory)\MsBuild.binlog /flp1:errorsonly;logfile=$(BuildLogDirectory)\MsBuild.err /flp2:warningsonly;logfile=$(BuildLogDirectory)\MsBuild.wrn diff --git a/.ado/templates/run-windows-with-certificates.yml b/.ado/templates/run-windows-with-certificates.yml index 739e6613efc..328a8a9e380 100644 --- a/.ado/templates/run-windows-with-certificates.yml +++ b/.ado/templates/run-windows-with-certificates.yml @@ -24,6 +24,9 @@ parameters: - name: restoreLockedMode type: boolean default: true + - name: restoreForceEvaluate + type: boolean + default: true steps: - ${{ if eq(parameters.buildConfiguration, 'Debug') }}: @@ -33,7 +36,7 @@ steps: --no-launch --logging --buildLogDirectory ${{ parameters.buildLogDirectory }} - --msbuildprops RestoreLockedMode=${{ parameters.restoreLockedMode }} + --msbuildprops RestoreLockedMode=${{ parameters.restoreLockedMode }},RestoreForceEvaluate=${{ restoreLockedMode }} ${{ parameters.deployOption }} displayName: run-windows (Debug) workingDirectory: ${{ parameters.workingDirectory }} @@ -46,7 +49,7 @@ steps: --no-launch --logging --buildLogDirectory ${{ parameters.buildLogDirectory }} - --msbuildprops RestoreLockedMode=${{ parameters.restoreLockedMode }} + --msbuildprops RestoreLockedMode=${{ parameters.restoreLockedMode }},RestoreForceEvaluate=${{ restoreLockedMode }} ${{ parameters.deployOption }} displayName: run-windows (Release) - PR workingDirectory: ${{ parameters.workingDirectory }} @@ -63,7 +66,7 @@ steps: --no-launch --logging --buildLogDirectory ${{ parameters.buildLogDirectory }} - --msbuildprops RestoreLockedMode=${{ parameters.restoreLockedMode }},PackageCertificateKeyFile=$(Build.SourcesDirectory)\EncodedKey.pfx + --msbuildprops RestoreLockedMode=${{ parameters.restoreLockedMode }},RestoreForceEvaluate=${{ restoreLockedMode }},PackageCertificateKeyFile=$(Build.SourcesDirectory)\EncodedKey.pfx ${{ parameters.deployOption }} displayName: run-windows (Release) - CI workingDirectory: ${{ parameters.workingDirectory }} From 757b6791f1cfb80f887bb338572440c188a3f35c Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Tue, 23 Nov 2021 00:23:50 -0800 Subject: [PATCH 136/149] Update / trim Managed.UnitTests lock file --- .../packages.lock.json | 31 +------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/vnext/Microsoft.ReactNative.Managed.UnitTests/packages.lock.json b/vnext/Microsoft.ReactNative.Managed.UnitTests/packages.lock.json index ebc589958d4..aa158c683bd 100644 --- a/vnext/Microsoft.ReactNative.Managed.UnitTests/packages.lock.json +++ b/vnext/Microsoft.ReactNative.Managed.UnitTests/packages.lock.json @@ -26,12 +26,6 @@ "NETStandard.Library": "2.0.3" } }, - "Microsoft.UI.Xaml": { - "type": "Direct", - "requested": "[2.7.0, )", - "resolved": "2.7.0", - "contentHash": "dB4im13tfmMgL/V3Ei+3kD2rUF+/lTxAmR4gjJ45l577eljHfdo/KUrxpq/3I1Vp6e5GCDG1evDaEGuDxypLMg==" - }, "MSTest.TestAdapter": { "type": "Direct", "requested": "[2.1.2, )", @@ -274,25 +268,8 @@ "System.Runtime": "4.1.0" } }, - "common": { - "type": "Project" - }, - "fmt": { - "type": "Project" - }, - "folly": { - "type": "Project", - "dependencies": { - "fmt": "1.0.0" - } - }, "microsoft.reactnative": { - "type": "Project", - "dependencies": { - "Common": "1.0.0", - "Folly": "1.0.0", - "ReactCommon": "1.0.0" - } + "type": "Project" }, "microsoft.reactnative.managed": { "type": "Project", @@ -300,12 +277,6 @@ "Microsoft.NETCore.UniversalWindowsPlatform": "6.2.9", "Microsoft.ReactNative": "1.0.0" } - }, - "reactcommon": { - "type": "Project", - "dependencies": { - "Folly": "1.0.0" - } } }, "UAP,Version=v10.0.16299/win10-arm": { From 64153df9037cc01c5c4a69e0100ec3764a62ce3f Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Tue, 23 Nov 2021 00:32:31 -0800 Subject: [PATCH 137/149] Correct parameters.restoreForceEvaluate usage --- .ado/jobs/universal.yml | 9 +-------- .ado/templates/run-windows-with-certificates.yml | 6 +++--- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.ado/jobs/universal.yml b/.ado/jobs/universal.yml index df47c431f5c..5718d99aee1 100644 --- a/.ado/jobs/universal.yml +++ b/.ado/jobs/universal.yml @@ -145,14 +145,7 @@ filePath: $(Build.SourcesDirectory)\vnext\Scripts\rnw-dependencies.ps1 arguments: -NoPrompt -Tags buildLab - - task: MSBuild@1 - displayName: Restore NuGet packages - inputs: - solution: vnext/Microsoft.ReactNative.sln - msbuildArchitecture: x64 - platform: ${{ matrix.BuildPlatform }} - configuration: ${{ matrix.BuildConfiguration }} - msbuildArguments: /t:Restore + - template: ../templates/restore-sln.yml parameters: diff --git a/.ado/templates/run-windows-with-certificates.yml b/.ado/templates/run-windows-with-certificates.yml index 328a8a9e380..b32f40b5791 100644 --- a/.ado/templates/run-windows-with-certificates.yml +++ b/.ado/templates/run-windows-with-certificates.yml @@ -36,7 +36,7 @@ steps: --no-launch --logging --buildLogDirectory ${{ parameters.buildLogDirectory }} - --msbuildprops RestoreLockedMode=${{ parameters.restoreLockedMode }},RestoreForceEvaluate=${{ restoreLockedMode }} + --msbuildprops RestoreLockedMode=${{ parameters.restoreLockedMode }},RestoreForceEvaluate=${{ parameters.restoreForceEvaluate }} ${{ parameters.deployOption }} displayName: run-windows (Debug) workingDirectory: ${{ parameters.workingDirectory }} @@ -49,7 +49,7 @@ steps: --no-launch --logging --buildLogDirectory ${{ parameters.buildLogDirectory }} - --msbuildprops RestoreLockedMode=${{ parameters.restoreLockedMode }},RestoreForceEvaluate=${{ restoreLockedMode }} + --msbuildprops RestoreLockedMode=${{ parameters.restoreLockedMode }},RestoreForceEvaluate=${{ parameters.restoreForceEvaluate }} ${{ parameters.deployOption }} displayName: run-windows (Release) - PR workingDirectory: ${{ parameters.workingDirectory }} @@ -66,7 +66,7 @@ steps: --no-launch --logging --buildLogDirectory ${{ parameters.buildLogDirectory }} - --msbuildprops RestoreLockedMode=${{ parameters.restoreLockedMode }},RestoreForceEvaluate=${{ restoreLockedMode }},PackageCertificateKeyFile=$(Build.SourcesDirectory)\EncodedKey.pfx + --msbuildprops RestoreLockedMode=${{ parameters.restoreLockedMode }},RestoreForceEvaluate=${{ parameters.restoreForceEvaluate }},PackageCertificateKeyFile=$(Build.SourcesDirectory)\EncodedKey.pfx ${{ parameters.deployOption }} displayName: run-windows (Release) - CI workingDirectory: ${{ parameters.workingDirectory }} From 9e60c66297bad28e8d1d0a26125c45ddf44b1f4c Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Tue, 23 Nov 2021 03:30:58 -0800 Subject: [PATCH 138/149] Update comments on ad-hoc NuGet restore tasks --- .ado/jobs/e2e-test.yml | 5 ++++- .ado/jobs/playground.yml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.ado/jobs/e2e-test.yml b/.ado/jobs/e2e-test.yml index 71f69d1e160..746bb2a6747 100644 --- a/.ado/jobs/e2e-test.yml +++ b/.ado/jobs/e2e-test.yml @@ -80,7 +80,10 @@ jobs: value: ${{ matrix.UseHermes }} # Workaround. - # NuGet 6 ignores packages.config if it detects . + # TODO: Replace with Get-ChildItem -Recurse -File packages.config | %{ nuget restore $_ } + # Make this an implicit step for run-windows. + # + # NuGet ignores packages.config if it detects . # Use restore packages.config directly to keep compabitility with ReactNativePicker. - task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2 displayName: NuGet restore diff --git a/.ado/jobs/playground.yml b/.ado/jobs/playground.yml index 080218cec2d..ee52ea2a2fa 100644 --- a/.ado/jobs/playground.yml +++ b/.ado/jobs/playground.yml @@ -97,7 +97,10 @@ jobs: certificateName: playgroundEncodedKey # Workaround. - # NuGet 6 ignores packages.config if it detects . + # TODO: Replace with Get-ChildItem -Recurse -File packages.config | %{ nuget restore $_ } + # Make this an implicit step for run-windows. + # + # NuGet ignores packages.config if it detects . # Use restore packages.config directly to keep compabitility with ReactNativePicker. - task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2 displayName: NuGet restore From 45d717da8c645029c4e81e4b57bd89f8eefe0da4 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Tue, 23 Nov 2021 14:22:04 -0800 Subject: [PATCH 139/149] Place NuGet packages in agent tmp folder --- .ado/jobs/universal.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ado/jobs/universal.yml b/.ado/jobs/universal.yml index 5718d99aee1..a042d53146e 100644 --- a/.ado/jobs/universal.yml +++ b/.ado/jobs/universal.yml @@ -51,7 +51,7 @@ # Some tasks run on a different user (VssAdministrator) instead of the default user (AzDevOps). # Keep NuGet cache independent from the user directory. - name: NUGET_PACKAGES - value: D:\NugetPackages + value: $(Agent.TempDirectory)/NuGetPackages displayName: Universal Build ${{ matrix.Name }} pool: ${{ parameters.AgentPool.Large }} timeoutInMinutes: 60 @@ -118,7 +118,7 @@ # Some tasks run on a different user (VssAdministrator) instead of the default user (AzDevOps). # Keep NuGet cache independent from the user directory. - name: NUGET_PACKAGES - value: D:\NugetPackages + value: $(Agent.TempDirectory)/NuGetPackages displayName: Universal Test ${{ matrix.Name }} dependsOn: - UniversalBuild${{ matrix.BuildPlatform }}${{ matrix.BuildConfiguration }} From 2f196119b9dc63b04ad886a0b0ea45df661e370e Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Tue, 23 Nov 2021 16:14:01 -0800 Subject: [PATCH 140/149] Update E2E nuget lock --- .../windows/RNTesterApp/packages.lock.json | 28 +------------------ 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/packages/e2e-test-app/windows/RNTesterApp/packages.lock.json b/packages/e2e-test-app/windows/RNTesterApp/packages.lock.json index 171a0979a0c..21fb881f78b 100644 --- a/packages/e2e-test-app/windows/RNTesterApp/packages.lock.json +++ b/packages/e2e-test-app/windows/RNTesterApp/packages.lock.json @@ -134,30 +134,10 @@ "contentHash": "qF6RRZKaflI+LR1YODNyWYjq5YoX8IJ2wx5y8O+AW2xO+1t/Q6Mm+jQ38zJbWnmXbrcOqUYofn7Y3/KC6lTLBQ==" }, "automationchannel": { - "type": "Project", - "dependencies": { - "Microsoft.ReactNative": "1.0.0" - } - }, - "common": { "type": "Project" }, - "fmt": { - "type": "Project" - }, - "folly": { - "type": "Project", - "dependencies": { - "fmt": "1.0.0" - } - }, "microsoft.reactnative": { - "type": "Project", - "dependencies": { - "Common": "1.0.0", - "Folly": "1.0.0", - "ReactCommon": "1.0.0" - } + "type": "Project" }, "microsoft.reactnative.managed": { "type": "Project", @@ -166,12 +146,6 @@ "Microsoft.ReactNative": "1.0.0" } }, - "reactcommon": { - "type": "Project", - "dependencies": { - "Folly": "1.0.0" - } - }, "reactnativepicker": { "type": "Project", "dependencies": { From 2f5af0cd440cb25c9d392727754fd2d1a7121aad Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 24 Nov 2021 15:42:40 -0800 Subject: [PATCH 141/149] Don't restore ReactNativeXaml/packages.config directly --- .ado/jobs/e2e-test.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.ado/jobs/e2e-test.yml b/.ado/jobs/e2e-test.yml index 746bb2a6747..bc004cf30de 100644 --- a/.ado/jobs/e2e-test.yml +++ b/.ado/jobs/e2e-test.yml @@ -85,15 +85,6 @@ jobs: # # NuGet ignores packages.config if it detects . # Use restore packages.config directly to keep compabitility with ReactNativePicker. - - task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2 - displayName: NuGet restore - inputs: - command: restore - restoreSolution: node_modules/react-native-xaml/windows/ReactNativeXaml/packages.config - feedsToUse: config - nugetConfigPath: packages/e2e-test-app/windows/NuGet.config - verbosityRestore: Detailed - - task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2 displayName: NuGet restore inputs: From 08f18c0dc72fdfe4a6c905e760c6f947ef6c2d1a Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Wed, 24 Nov 2021 19:02:32 -0800 Subject: [PATCH 142/149] Define function restorePackageConfigs --- .../cli/src/runWindows/utils/build.ts | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/packages/@react-native-windows/cli/src/runWindows/utils/build.ts b/packages/@react-native-windows/cli/src/runWindows/utils/build.ts index 01ea7c70c84..096f3c681cb 100644 --- a/packages/@react-native-windows/cli/src/runWindows/utils/build.ts +++ b/packages/@react-native-windows/cli/src/runWindows/utils/build.ts @@ -78,6 +78,31 @@ export function getAppSolutionFile(options: RunWindowsOptions, config: Config) { } } +export function restorePackageConfigs(options: RunWindowsOptions) { + const pkgConfigs = new Array(); + + if (!options.sln) { + return; + } + + findFiles('TODO:GET SLN DIR', 'packages.config', pkgConfigs); +} + +const fs = require('fs').fs; +function findFiles(dir: any, name: string, result: Array) { + fs.readdirSync(dir).forEach((file: any) => { + const stat = fs.lstatSync(file); + if (stat.isDirectory()) { + findFiles(file, name, result); + } else if ( + (stat.isFile() || stat.isSymbolicLink()) && + `${file}`.endsWith('packages.config') + ) { + result.push(file); + } + }); +} + export function getAppProjectFile(options: RunWindowsOptions, config: Config) { // Use the project file if specified if (options.proj) { From 51f0faae5397dc77c65422f80e71acd2d8c41447 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Fri, 3 Dec 2021 14:19:33 -0800 Subject: [PATCH 143/149] Managed.UnitTests/packages.lock.json --- .../packages.lock.json | 80 +++++++++---------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/vnext/Microsoft.ReactNative.Managed.UnitTests/packages.lock.json b/vnext/Microsoft.ReactNative.Managed.UnitTests/packages.lock.json index 5c3c55af094..aa158c683bd 100644 --- a/vnext/Microsoft.ReactNative.Managed.UnitTests/packages.lock.json +++ b/vnext/Microsoft.ReactNative.Managed.UnitTests/packages.lock.json @@ -175,7 +175,7 @@ "System.IO": { "type": "Transitive", "resolved": "4.1.0", - "contentHash": "4BtDLz1xXzyI1dfz58wc7ueMr5lAehHDMG+RA67niWP4GEF/FO7FLwCW+iR5AKMeU70yJuBvDA+Thw2wsreDMQ==", + "contentHash": "3KlTJceQc3gnGIaHZ7UBZO26SHL1SHE4ddrmiwumFnId+CEHP+O8r386tZKaE6zlk5/mF8vifMBzHj9SaXN+mQ==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -209,7 +209,7 @@ "System.Resources.ResourceManager": { "type": "Transitive", "resolved": "4.0.1", - "contentHash": "UWWRbiWN04+oMnj7mNzicaleAJHBJ0uM9fF9iLnmKE96e/FFGUr+TyAlDMMa1xQUH54Gh88jX/BUYPtHzqDFJQ==", + "contentHash": "TxwVeUNoTgUOdQ09gfTjvW411MF+w9MBYL7AtNVc+HtBCFlutPLhUCdZjNkjbhj3bNQWMdHboF0KIWEOjJssbA==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -221,7 +221,7 @@ "System.Runtime": { "type": "Transitive", "resolved": "4.1.0", - "contentHash": "SwXraLtIWEZwfE/jOT+WFtP/tsX2KhIdgRQt330CQckx/pbRk7e/Aigak2hFjgdkRmdmVXz6lwkDXcdtj913Bg==", + "contentHash": "v6c/4Yaa9uWsq+JMhnOFewrYkgdNHNG2eMKuNqRn8P733rNXeRCGvV5FkkjBXn2dbVkPXOsO0xjsEeM1q2zC0g==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1" @@ -252,7 +252,7 @@ "System.Threading": { "type": "Transitive", "resolved": "4.0.11", - "contentHash": "BcDdG7z87bb8bF8xHEGSCkd1+KKKYcoka2xlrYr9mwSIHTNXiArwAKwFb9Eh/Fw+wLVtb9YH4MJ+emORV8hePg==", + "contentHash": "N+3xqIcg3VDKyjwwCGaZ9HawG9aC6cSDI+s7ROma310GQo8vilFZa86hqKppwTHleR/G0sfOzhvgnUxWCR/DrQ==", "dependencies": { "System.Runtime": "4.1.0", "System.Threading.Tasks": "4.0.11" @@ -261,7 +261,7 @@ "System.Threading.Tasks": { "type": "Transitive", "resolved": "4.0.11", - "contentHash": "+2bElqW0yIxctunXt9Ig4Q8vwK7RgUIDkPEvjZmGob0oKenxvwgLtjYc2Li0/8m2IiiN+kISSFnhvh6YG1z6ew==", + "contentHash": "k1S4Gc6IGwtHGT8188RSeGaX86Qw/wnrgNLshJvsdNUOPP9etMmo8S07c+UlOAx4K/xLuN9ivA1bD0LVurtIxQ==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -360,7 +360,7 @@ "System.IO": { "type": "Transitive", "resolved": "4.1.0", - "contentHash": "4BtDLz1xXzyI1dfz58wc7ueMr5lAehHDMG+RA67niWP4GEF/FO7FLwCW+iR5AKMeU70yJuBvDA+Thw2wsreDMQ==", + "contentHash": "3KlTJceQc3gnGIaHZ7UBZO26SHL1SHE4ddrmiwumFnId+CEHP+O8r386tZKaE6zlk5/mF8vifMBzHj9SaXN+mQ==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -407,7 +407,7 @@ "System.Resources.ResourceManager": { "type": "Transitive", "resolved": "4.0.1", - "contentHash": "UWWRbiWN04+oMnj7mNzicaleAJHBJ0uM9fF9iLnmKE96e/FFGUr+TyAlDMMa1xQUH54Gh88jX/BUYPtHzqDFJQ==", + "contentHash": "TxwVeUNoTgUOdQ09gfTjvW411MF+w9MBYL7AtNVc+HtBCFlutPLhUCdZjNkjbhj3bNQWMdHboF0KIWEOjJssbA==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -420,7 +420,7 @@ "System.Runtime": { "type": "Transitive", "resolved": "4.1.0", - "contentHash": "SwXraLtIWEZwfE/jOT+WFtP/tsX2KhIdgRQt330CQckx/pbRk7e/Aigak2hFjgdkRmdmVXz6lwkDXcdtj913Bg==", + "contentHash": "v6c/4Yaa9uWsq+JMhnOFewrYkgdNHNG2eMKuNqRn8P733rNXeRCGvV5FkkjBXn2dbVkPXOsO0xjsEeM1q2zC0g==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -453,7 +453,7 @@ "System.Threading": { "type": "Transitive", "resolved": "4.0.11", - "contentHash": "BcDdG7z87bb8bF8xHEGSCkd1+KKKYcoka2xlrYr9mwSIHTNXiArwAKwFb9Eh/Fw+wLVtb9YH4MJ+emORV8hePg==", + "contentHash": "N+3xqIcg3VDKyjwwCGaZ9HawG9aC6cSDI+s7ROma310GQo8vilFZa86hqKppwTHleR/G0sfOzhvgnUxWCR/DrQ==", "dependencies": { "System.Runtime": "4.1.0", "System.Threading.Tasks": "4.0.11" @@ -462,7 +462,7 @@ "System.Threading.Tasks": { "type": "Transitive", "resolved": "4.0.11", - "contentHash": "+2bElqW0yIxctunXt9Ig4Q8vwK7RgUIDkPEvjZmGob0oKenxvwgLtjYc2Li0/8m2IiiN+kISSFnhvh6YG1z6ew==", + "contentHash": "k1S4Gc6IGwtHGT8188RSeGaX86Qw/wnrgNLshJvsdNUOPP9etMmo8S07c+UlOAx4K/xLuN9ivA1bD0LVurtIxQ==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -574,7 +574,7 @@ "System.IO": { "type": "Transitive", "resolved": "4.1.0", - "contentHash": "4BtDLz1xXzyI1dfz58wc7ueMr5lAehHDMG+RA67niWP4GEF/FO7FLwCW+iR5AKMeU70yJuBvDA+Thw2wsreDMQ==", + "contentHash": "3KlTJceQc3gnGIaHZ7UBZO26SHL1SHE4ddrmiwumFnId+CEHP+O8r386tZKaE6zlk5/mF8vifMBzHj9SaXN+mQ==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -621,7 +621,7 @@ "System.Resources.ResourceManager": { "type": "Transitive", "resolved": "4.0.1", - "contentHash": "UWWRbiWN04+oMnj7mNzicaleAJHBJ0uM9fF9iLnmKE96e/FFGUr+TyAlDMMa1xQUH54Gh88jX/BUYPtHzqDFJQ==", + "contentHash": "TxwVeUNoTgUOdQ09gfTjvW411MF+w9MBYL7AtNVc+HtBCFlutPLhUCdZjNkjbhj3bNQWMdHboF0KIWEOjJssbA==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -634,7 +634,7 @@ "System.Runtime": { "type": "Transitive", "resolved": "4.1.0", - "contentHash": "SwXraLtIWEZwfE/jOT+WFtP/tsX2KhIdgRQt330CQckx/pbRk7e/Aigak2hFjgdkRmdmVXz6lwkDXcdtj913Bg==", + "contentHash": "v6c/4Yaa9uWsq+JMhnOFewrYkgdNHNG2eMKuNqRn8P733rNXeRCGvV5FkkjBXn2dbVkPXOsO0xjsEeM1q2zC0g==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -679,7 +679,7 @@ "System.Threading": { "type": "Transitive", "resolved": "4.0.11", - "contentHash": "BcDdG7z87bb8bF8xHEGSCkd1+KKKYcoka2xlrYr9mwSIHTNXiArwAKwFb9Eh/Fw+wLVtb9YH4MJ+emORV8hePg==", + "contentHash": "N+3xqIcg3VDKyjwwCGaZ9HawG9aC6cSDI+s7ROma310GQo8vilFZa86hqKppwTHleR/G0sfOzhvgnUxWCR/DrQ==", "dependencies": { "System.Runtime": "4.1.0", "System.Threading.Tasks": "4.0.11" @@ -688,7 +688,7 @@ "System.Threading.Tasks": { "type": "Transitive", "resolved": "4.0.11", - "contentHash": "+2bElqW0yIxctunXt9Ig4Q8vwK7RgUIDkPEvjZmGob0oKenxvwgLtjYc2Li0/8m2IiiN+kISSFnhvh6YG1z6ew==", + "contentHash": "k1S4Gc6IGwtHGT8188RSeGaX86Qw/wnrgNLshJvsdNUOPP9etMmo8S07c+UlOAx4K/xLuN9ivA1bD0LVurtIxQ==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -800,7 +800,7 @@ "System.IO": { "type": "Transitive", "resolved": "4.1.0", - "contentHash": "4BtDLz1xXzyI1dfz58wc7ueMr5lAehHDMG+RA67niWP4GEF/FO7FLwCW+iR5AKMeU70yJuBvDA+Thw2wsreDMQ==", + "contentHash": "3KlTJceQc3gnGIaHZ7UBZO26SHL1SHE4ddrmiwumFnId+CEHP+O8r386tZKaE6zlk5/mF8vifMBzHj9SaXN+mQ==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -847,7 +847,7 @@ "System.Resources.ResourceManager": { "type": "Transitive", "resolved": "4.0.1", - "contentHash": "UWWRbiWN04+oMnj7mNzicaleAJHBJ0uM9fF9iLnmKE96e/FFGUr+TyAlDMMa1xQUH54Gh88jX/BUYPtHzqDFJQ==", + "contentHash": "TxwVeUNoTgUOdQ09gfTjvW411MF+w9MBYL7AtNVc+HtBCFlutPLhUCdZjNkjbhj3bNQWMdHboF0KIWEOjJssbA==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -860,7 +860,7 @@ "System.Runtime": { "type": "Transitive", "resolved": "4.1.0", - "contentHash": "SwXraLtIWEZwfE/jOT+WFtP/tsX2KhIdgRQt330CQckx/pbRk7e/Aigak2hFjgdkRmdmVXz6lwkDXcdtj913Bg==", + "contentHash": "v6c/4Yaa9uWsq+JMhnOFewrYkgdNHNG2eMKuNqRn8P733rNXeRCGvV5FkkjBXn2dbVkPXOsO0xjsEeM1q2zC0g==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -905,7 +905,7 @@ "System.Threading": { "type": "Transitive", "resolved": "4.0.11", - "contentHash": "BcDdG7z87bb8bF8xHEGSCkd1+KKKYcoka2xlrYr9mwSIHTNXiArwAKwFb9Eh/Fw+wLVtb9YH4MJ+emORV8hePg==", + "contentHash": "N+3xqIcg3VDKyjwwCGaZ9HawG9aC6cSDI+s7ROma310GQo8vilFZa86hqKppwTHleR/G0sfOzhvgnUxWCR/DrQ==", "dependencies": { "System.Runtime": "4.1.0", "System.Threading.Tasks": "4.0.11" @@ -914,7 +914,7 @@ "System.Threading.Tasks": { "type": "Transitive", "resolved": "4.0.11", - "contentHash": "+2bElqW0yIxctunXt9Ig4Q8vwK7RgUIDkPEvjZmGob0oKenxvwgLtjYc2Li0/8m2IiiN+kISSFnhvh6YG1z6ew==", + "contentHash": "k1S4Gc6IGwtHGT8188RSeGaX86Qw/wnrgNLshJvsdNUOPP9etMmo8S07c+UlOAx4K/xLuN9ivA1bD0LVurtIxQ==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -1004,7 +1004,7 @@ "System.IO": { "type": "Transitive", "resolved": "4.1.0", - "contentHash": "4BtDLz1xXzyI1dfz58wc7ueMr5lAehHDMG+RA67niWP4GEF/FO7FLwCW+iR5AKMeU70yJuBvDA+Thw2wsreDMQ==", + "contentHash": "3KlTJceQc3gnGIaHZ7UBZO26SHL1SHE4ddrmiwumFnId+CEHP+O8r386tZKaE6zlk5/mF8vifMBzHj9SaXN+mQ==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -1051,7 +1051,7 @@ "System.Resources.ResourceManager": { "type": "Transitive", "resolved": "4.0.1", - "contentHash": "UWWRbiWN04+oMnj7mNzicaleAJHBJ0uM9fF9iLnmKE96e/FFGUr+TyAlDMMa1xQUH54Gh88jX/BUYPtHzqDFJQ==", + "contentHash": "TxwVeUNoTgUOdQ09gfTjvW411MF+w9MBYL7AtNVc+HtBCFlutPLhUCdZjNkjbhj3bNQWMdHboF0KIWEOjJssbA==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -1064,7 +1064,7 @@ "System.Runtime": { "type": "Transitive", "resolved": "4.1.0", - "contentHash": "SwXraLtIWEZwfE/jOT+WFtP/tsX2KhIdgRQt330CQckx/pbRk7e/Aigak2hFjgdkRmdmVXz6lwkDXcdtj913Bg==", + "contentHash": "v6c/4Yaa9uWsq+JMhnOFewrYkgdNHNG2eMKuNqRn8P733rNXeRCGvV5FkkjBXn2dbVkPXOsO0xjsEeM1q2zC0g==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -1097,7 +1097,7 @@ "System.Threading": { "type": "Transitive", "resolved": "4.0.11", - "contentHash": "BcDdG7z87bb8bF8xHEGSCkd1+KKKYcoka2xlrYr9mwSIHTNXiArwAKwFb9Eh/Fw+wLVtb9YH4MJ+emORV8hePg==", + "contentHash": "N+3xqIcg3VDKyjwwCGaZ9HawG9aC6cSDI+s7ROma310GQo8vilFZa86hqKppwTHleR/G0sfOzhvgnUxWCR/DrQ==", "dependencies": { "System.Runtime": "4.1.0", "System.Threading.Tasks": "4.0.11" @@ -1106,7 +1106,7 @@ "System.Threading.Tasks": { "type": "Transitive", "resolved": "4.0.11", - "contentHash": "+2bElqW0yIxctunXt9Ig4Q8vwK7RgUIDkPEvjZmGob0oKenxvwgLtjYc2Li0/8m2IiiN+kISSFnhvh6YG1z6ew==", + "contentHash": "k1S4Gc6IGwtHGT8188RSeGaX86Qw/wnrgNLshJvsdNUOPP9etMmo8S07c+UlOAx4K/xLuN9ivA1bD0LVurtIxQ==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -1218,7 +1218,7 @@ "System.IO": { "type": "Transitive", "resolved": "4.1.0", - "contentHash": "4BtDLz1xXzyI1dfz58wc7ueMr5lAehHDMG+RA67niWP4GEF/FO7FLwCW+iR5AKMeU70yJuBvDA+Thw2wsreDMQ==", + "contentHash": "3KlTJceQc3gnGIaHZ7UBZO26SHL1SHE4ddrmiwumFnId+CEHP+O8r386tZKaE6zlk5/mF8vifMBzHj9SaXN+mQ==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -1265,7 +1265,7 @@ "System.Resources.ResourceManager": { "type": "Transitive", "resolved": "4.0.1", - "contentHash": "UWWRbiWN04+oMnj7mNzicaleAJHBJ0uM9fF9iLnmKE96e/FFGUr+TyAlDMMa1xQUH54Gh88jX/BUYPtHzqDFJQ==", + "contentHash": "TxwVeUNoTgUOdQ09gfTjvW411MF+w9MBYL7AtNVc+HtBCFlutPLhUCdZjNkjbhj3bNQWMdHboF0KIWEOjJssbA==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -1278,7 +1278,7 @@ "System.Runtime": { "type": "Transitive", "resolved": "4.1.0", - "contentHash": "SwXraLtIWEZwfE/jOT+WFtP/tsX2KhIdgRQt330CQckx/pbRk7e/Aigak2hFjgdkRmdmVXz6lwkDXcdtj913Bg==", + "contentHash": "v6c/4Yaa9uWsq+JMhnOFewrYkgdNHNG2eMKuNqRn8P733rNXeRCGvV5FkkjBXn2dbVkPXOsO0xjsEeM1q2zC0g==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -1323,7 +1323,7 @@ "System.Threading": { "type": "Transitive", "resolved": "4.0.11", - "contentHash": "BcDdG7z87bb8bF8xHEGSCkd1+KKKYcoka2xlrYr9mwSIHTNXiArwAKwFb9Eh/Fw+wLVtb9YH4MJ+emORV8hePg==", + "contentHash": "N+3xqIcg3VDKyjwwCGaZ9HawG9aC6cSDI+s7ROma310GQo8vilFZa86hqKppwTHleR/G0sfOzhvgnUxWCR/DrQ==", "dependencies": { "System.Runtime": "4.1.0", "System.Threading.Tasks": "4.0.11" @@ -1332,7 +1332,7 @@ "System.Threading.Tasks": { "type": "Transitive", "resolved": "4.0.11", - "contentHash": "+2bElqW0yIxctunXt9Ig4Q8vwK7RgUIDkPEvjZmGob0oKenxvwgLtjYc2Li0/8m2IiiN+kISSFnhvh6YG1z6ew==", + "contentHash": "k1S4Gc6IGwtHGT8188RSeGaX86Qw/wnrgNLshJvsdNUOPP9etMmo8S07c+UlOAx4K/xLuN9ivA1bD0LVurtIxQ==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -1422,7 +1422,7 @@ "System.IO": { "type": "Transitive", "resolved": "4.1.0", - "contentHash": "4BtDLz1xXzyI1dfz58wc7ueMr5lAehHDMG+RA67niWP4GEF/FO7FLwCW+iR5AKMeU70yJuBvDA+Thw2wsreDMQ==", + "contentHash": "3KlTJceQc3gnGIaHZ7UBZO26SHL1SHE4ddrmiwumFnId+CEHP+O8r386tZKaE6zlk5/mF8vifMBzHj9SaXN+mQ==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -1469,7 +1469,7 @@ "System.Resources.ResourceManager": { "type": "Transitive", "resolved": "4.0.1", - "contentHash": "UWWRbiWN04+oMnj7mNzicaleAJHBJ0uM9fF9iLnmKE96e/FFGUr+TyAlDMMa1xQUH54Gh88jX/BUYPtHzqDFJQ==", + "contentHash": "TxwVeUNoTgUOdQ09gfTjvW411MF+w9MBYL7AtNVc+HtBCFlutPLhUCdZjNkjbhj3bNQWMdHboF0KIWEOjJssbA==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -1482,7 +1482,7 @@ "System.Runtime": { "type": "Transitive", "resolved": "4.1.0", - "contentHash": "SwXraLtIWEZwfE/jOT+WFtP/tsX2KhIdgRQt330CQckx/pbRk7e/Aigak2hFjgdkRmdmVXz6lwkDXcdtj913Bg==", + "contentHash": "v6c/4Yaa9uWsq+JMhnOFewrYkgdNHNG2eMKuNqRn8P733rNXeRCGvV5FkkjBXn2dbVkPXOsO0xjsEeM1q2zC0g==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -1515,7 +1515,7 @@ "System.Threading": { "type": "Transitive", "resolved": "4.0.11", - "contentHash": "BcDdG7z87bb8bF8xHEGSCkd1+KKKYcoka2xlrYr9mwSIHTNXiArwAKwFb9Eh/Fw+wLVtb9YH4MJ+emORV8hePg==", + "contentHash": "N+3xqIcg3VDKyjwwCGaZ9HawG9aC6cSDI+s7ROma310GQo8vilFZa86hqKppwTHleR/G0sfOzhvgnUxWCR/DrQ==", "dependencies": { "System.Runtime": "4.1.0", "System.Threading.Tasks": "4.0.11" @@ -1524,7 +1524,7 @@ "System.Threading.Tasks": { "type": "Transitive", "resolved": "4.0.11", - "contentHash": "+2bElqW0yIxctunXt9Ig4Q8vwK7RgUIDkPEvjZmGob0oKenxvwgLtjYc2Li0/8m2IiiN+kISSFnhvh6YG1z6ew==", + "contentHash": "k1S4Gc6IGwtHGT8188RSeGaX86Qw/wnrgNLshJvsdNUOPP9etMmo8S07c+UlOAx4K/xLuN9ivA1bD0LVurtIxQ==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -1636,7 +1636,7 @@ "System.IO": { "type": "Transitive", "resolved": "4.1.0", - "contentHash": "4BtDLz1xXzyI1dfz58wc7ueMr5lAehHDMG+RA67niWP4GEF/FO7FLwCW+iR5AKMeU70yJuBvDA+Thw2wsreDMQ==", + "contentHash": "3KlTJceQc3gnGIaHZ7UBZO26SHL1SHE4ddrmiwumFnId+CEHP+O8r386tZKaE6zlk5/mF8vifMBzHj9SaXN+mQ==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -1683,7 +1683,7 @@ "System.Resources.ResourceManager": { "type": "Transitive", "resolved": "4.0.1", - "contentHash": "UWWRbiWN04+oMnj7mNzicaleAJHBJ0uM9fF9iLnmKE96e/FFGUr+TyAlDMMa1xQUH54Gh88jX/BUYPtHzqDFJQ==", + "contentHash": "TxwVeUNoTgUOdQ09gfTjvW411MF+w9MBYL7AtNVc+HtBCFlutPLhUCdZjNkjbhj3bNQWMdHboF0KIWEOjJssbA==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -1696,7 +1696,7 @@ "System.Runtime": { "type": "Transitive", "resolved": "4.1.0", - "contentHash": "SwXraLtIWEZwfE/jOT+WFtP/tsX2KhIdgRQt330CQckx/pbRk7e/Aigak2hFjgdkRmdmVXz6lwkDXcdtj913Bg==", + "contentHash": "v6c/4Yaa9uWsq+JMhnOFewrYkgdNHNG2eMKuNqRn8P733rNXeRCGvV5FkkjBXn2dbVkPXOsO0xjsEeM1q2zC0g==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", @@ -1741,7 +1741,7 @@ "System.Threading": { "type": "Transitive", "resolved": "4.0.11", - "contentHash": "BcDdG7z87bb8bF8xHEGSCkd1+KKKYcoka2xlrYr9mwSIHTNXiArwAKwFb9Eh/Fw+wLVtb9YH4MJ+emORV8hePg==", + "contentHash": "N+3xqIcg3VDKyjwwCGaZ9HawG9aC6cSDI+s7ROma310GQo8vilFZa86hqKppwTHleR/G0sfOzhvgnUxWCR/DrQ==", "dependencies": { "System.Runtime": "4.1.0", "System.Threading.Tasks": "4.0.11" @@ -1750,7 +1750,7 @@ "System.Threading.Tasks": { "type": "Transitive", "resolved": "4.0.11", - "contentHash": "+2bElqW0yIxctunXt9Ig4Q8vwK7RgUIDkPEvjZmGob0oKenxvwgLtjYc2Li0/8m2IiiN+kISSFnhvh6YG1z6ew==", + "contentHash": "k1S4Gc6IGwtHGT8188RSeGaX86Qw/wnrgNLshJvsdNUOPP9etMmo8S07c+UlOAx4K/xLuN9ivA1bD0LVurtIxQ==", "dependencies": { "Microsoft.NETCore.Platforms": "1.0.1", "Microsoft.NETCore.Targets": "1.0.1", From 0cdacf8a18c9df15c3eefbac5b91711d9258f84d Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Fri, 3 Dec 2021 16:03:24 -0800 Subject: [PATCH 144/149] Automatically locate packages.config items in Playground and E2E CI --- .ado/jobs/e2e-test.yml | 19 +++++++------------ .ado/jobs/playground.yml | 28 +++++++--------------------- .ado/jobs/universal.yml | 4 +--- 3 files changed, 15 insertions(+), 36 deletions(-) diff --git a/.ado/jobs/e2e-test.yml b/.ado/jobs/e2e-test.yml index bc004cf30de..53772a9903d 100644 --- a/.ado/jobs/e2e-test.yml +++ b/.ado/jobs/e2e-test.yml @@ -79,20 +79,15 @@ jobs: feature: UseHermes value: ${{ matrix.UseHermes }} - # Workaround. - # TODO: Replace with Get-ChildItem -Recurse -File packages.config | %{ nuget restore $_ } - # Make this an implicit step for run-windows. - # # NuGet ignores packages.config if it detects . # Use restore packages.config directly to keep compabitility with ReactNativePicker. - - task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2 - displayName: NuGet restore - inputs: - command: restore - restoreSolution: packages/e2e-test-app/packages.config - feedsToUse: config - nugetConfigPath: packages/e2e-test-app/windows/NuGet.config - verbosityRestore: Detailed + - pwsh: | + Get-ChildItem -Recurse -Path packages.config |` + Foreach-Item {` + NuGet.exe Restore -PackagesDirectory windows\packages` + } + workingDirectory: packages/e2e-test-app + displayName: Restore packages.config items - template: ../templates/run-windows-with-certificates.yml parameters: diff --git a/.ado/jobs/playground.yml b/.ado/jobs/playground.yml index ee52ea2a2fa..ebb1e885e18 100644 --- a/.ado/jobs/playground.yml +++ b/.ado/jobs/playground.yml @@ -96,29 +96,15 @@ jobs: parameters: certificateName: playgroundEncodedKey - # Workaround. - # TODO: Replace with Get-ChildItem -Recurse -File packages.config | %{ nuget restore $_ } - # Make this an implicit step for run-windows. - # # NuGet ignores packages.config if it detects . # Use restore packages.config directly to keep compabitility with ReactNativePicker. - - task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2 - displayName: NuGet restore - inputs: - command: restore - restoreSolution: packages/playground/windows/playground/packages.config - feedsToUse: config - nugetConfigPath: packages/playground/windows/NuGet.config - verbosityRestore: Detailed - - - task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2 - displayName: NuGet restore - inputs: - command: restore - restoreSolution: packages/playground/windows/playground-win32/packages.config - feedsToUse: config - nugetConfigPath: packages/playground/windows/NuGet.config - verbosityRestore: Detailed + - pwsh: | + Get-ChildItem -Recurse -Path packages.config |` + Foreach-Item {` + NuGet.exe Restore -PackagesDirectory packages` + } + workingDirectory: packages/playground/windows + displayName: Restore packages.config items - template: ../templates/msbuild-sln.yml parameters: diff --git a/.ado/jobs/universal.yml b/.ado/jobs/universal.yml index 38cf65d1ebc..3e8141543f1 100644 --- a/.ado/jobs/universal.yml +++ b/.ado/jobs/universal.yml @@ -76,7 +76,7 @@ solutionName: Microsoft.ReactNative.sln buildPlatform: ${{ matrix.BuildPlatform }} buildConfiguration: ${{ matrix.BuildConfiguration }} - + - ${{ if eq(config.BuildEnvironment, 'Continuous') }}: - template: ../templates/component-governance.yml @@ -148,8 +148,6 @@ filePath: $(Build.SourcesDirectory)\vnext\Scripts\rnw-dependencies.ps1 arguments: -NoPrompt -Tags buildLab - - - template: ../templates/restore-sln.yml parameters: solutionDir: vnext From 440ded9ec9c10213632b99dcd1d6151047f2000b Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Fri, 3 Dec 2021 16:16:51 -0800 Subject: [PATCH 145/149] Use Foreach-Object --- .ado/jobs/e2e-test.yml | 2 +- .ado/jobs/playground.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.ado/jobs/e2e-test.yml b/.ado/jobs/e2e-test.yml index 53772a9903d..71b04adcfda 100644 --- a/.ado/jobs/e2e-test.yml +++ b/.ado/jobs/e2e-test.yml @@ -83,7 +83,7 @@ jobs: # Use restore packages.config directly to keep compabitility with ReactNativePicker. - pwsh: | Get-ChildItem -Recurse -Path packages.config |` - Foreach-Item {` + Foreach-Object {` NuGet.exe Restore -PackagesDirectory windows\packages` } workingDirectory: packages/e2e-test-app diff --git a/.ado/jobs/playground.yml b/.ado/jobs/playground.yml index ebb1e885e18..cf6a8d15e29 100644 --- a/.ado/jobs/playground.yml +++ b/.ado/jobs/playground.yml @@ -100,7 +100,7 @@ jobs: # Use restore packages.config directly to keep compabitility with ReactNativePicker. - pwsh: | Get-ChildItem -Recurse -Path packages.config |` - Foreach-Item {` + Foreach-Object {` NuGet.exe Restore -PackagesDirectory packages` } workingDirectory: packages/playground/windows From 9d4c7581a5415669fdde911ed6b21c61810aa940 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Fri, 3 Dec 2021 16:33:49 -0800 Subject: [PATCH 146/149] Pass the iterated packages.config instance --- .ado/jobs/e2e-test.yml | 2 +- .ado/jobs/playground.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.ado/jobs/e2e-test.yml b/.ado/jobs/e2e-test.yml index 71b04adcfda..0b5f1b12e78 100644 --- a/.ado/jobs/e2e-test.yml +++ b/.ado/jobs/e2e-test.yml @@ -84,7 +84,7 @@ jobs: - pwsh: | Get-ChildItem -Recurse -Path packages.config |` Foreach-Object {` - NuGet.exe Restore -PackagesDirectory windows\packages` + NuGet.exe Restore -PackagesDirectory windows\packages $_` } workingDirectory: packages/e2e-test-app displayName: Restore packages.config items diff --git a/.ado/jobs/playground.yml b/.ado/jobs/playground.yml index cf6a8d15e29..cf98734b9ee 100644 --- a/.ado/jobs/playground.yml +++ b/.ado/jobs/playground.yml @@ -101,7 +101,7 @@ jobs: - pwsh: | Get-ChildItem -Recurse -Path packages.config |` Foreach-Object {` - NuGet.exe Restore -PackagesDirectory packages` + NuGet.exe Restore -PackagesDirectory packages $_` } workingDirectory: packages/playground/windows displayName: Restore packages.config items From 7dd9244744eadd3a8f29a2b92bc11baa56f5508d Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Fri, 3 Dec 2021 17:41:20 -0800 Subject: [PATCH 147/149] Implement NuGet restore special logic --- .../cli/src/runWindows/utils/build.ts | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/@react-native-windows/cli/src/runWindows/utils/build.ts b/packages/@react-native-windows/cli/src/runWindows/utils/build.ts index 799ec4f8333..33865f0af21 100644 --- a/packages/@react-native-windows/cli/src/runWindows/utils/build.ts +++ b/packages/@react-native-windows/cli/src/runWindows/utils/build.ts @@ -6,12 +6,16 @@ import path from 'path'; +import {EOL} from 'os'; +import fs from '@react-native-windows/fs'; import MSBuildTools from './msbuildtools'; import Version from './version'; +import {execSync} from 'child_process'; import {newError} from './commandWithProgress'; import {RunWindowsOptions, BuildConfig, BuildArch} from '../runWindowsOptions'; import {Config} from '@react-native-community/cli-types'; import {CodedError} from '@react-native-windows/telemetry'; +import chalk from 'chalk'; export async function buildSolution( buildTools: MSBuildTools, @@ -85,10 +89,19 @@ export function restorePackageConfigs(options: RunWindowsOptions) { return; } - findFiles('TODO:GET SLN DIR', 'packages.config', pkgConfigs); + findFiles(options.root, 'packages.config', pkgConfigs); + + for (const pkgConfig of pkgConfigs) { + const cmd = `NuGet.exe Restore -PackagesDirectory ${path.join( + options.root, + 'packages', + )} + ${pkgConfig}`; + const results = execSync(cmd).toString().split(EOL); + results.forEach((result) => console.log(chalk.white(result))); + } } -const fs = require('fs').fs; function findFiles(dir: any, name: string, result: Array) { fs.readdirSync(dir).forEach((file: any) => { const stat = fs.lstatSync(file); From 1f23e1a1fcb3d0f85365311ddd7828aa0b2b29f6 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Fri, 3 Dec 2021 17:48:02 -0800 Subject: [PATCH 148/149] Add packages.config lookup for mixed NuGet dependencies --- .../cli/src/runWindows/runWindows.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/@react-native-windows/cli/src/runWindows/runWindows.ts b/packages/@react-native-windows/cli/src/runWindows/runWindows.ts index 0f93def32f1..aea18924326 100644 --- a/packages/@react-native-windows/cli/src/runWindows/runWindows.ts +++ b/packages/@react-native-windows/cli/src/runWindows/runWindows.ts @@ -207,6 +207,18 @@ async function runWindowsInternal( throw e; } + // Restore packages.config files for dependencies that don't support PackageReference. + try { + build.restorePackageConfigs(options); + } catch (e) { + newError( + `Couldn't restore found packages.config instances. ${ + (e as Error).message + }`, + ); + throw e; + } + try { if (options.autolink) { const autolinkArgs: string[] = []; From 7caf74727cc70e2ddb3adfee9b1e67c436081239 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Fri, 3 Dec 2021 18:15:43 -0800 Subject: [PATCH 149/149] Remove hard-coded system.debug --- .ado/windows-vs-pr.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.ado/windows-vs-pr.yml b/.ado/windows-vs-pr.yml index 13e47663eaf..1f81fd4699a 100644 --- a/.ado/windows-vs-pr.yml +++ b/.ado/windows-vs-pr.yml @@ -9,9 +9,6 @@ pr: variables: - group: platform-override-zero-permission-token - #TODO: DELETE BEFORE MERGING - - name: system.debug - value: true parameters: - name: AgentPool