From 5abd563aad654ef7da65d81e9b486bf8f4cc3dbb Mon Sep 17 00:00:00 2001 From: Anukrati Agrawal Date: Fri, 29 May 2026 13:18:47 -0700 Subject: [PATCH 1/2] Fix playground-composition build failures - Add missing 'Global' line to playground-composition.sln that caused autolink to corrupt the solution file (MSB5010) - Update SampleCustomComponent path to node_modules and remove ProjectSection to prevent autolink from adding duplicate entries (MSB5004) - Exclude @react-native-picker/picker from autolinking when targeting composition, as it is a UWP/Paper component incompatible with Win32/WinAppSDK (WindowsAppSDK transitive dependency error) - Use $(DefaultPlatformToolset) instead of hardcoded v143 in Playground-Composition.vcxproj and SampleCustomComponent.vcxproj for forward compatibility with newer VS versions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- packages/playground/react-native.config.js | 4 ++++ packages/playground/windows/playground-composition.sln | 6 ++---- .../playground-composition/Playground-Composition.vcxproj | 2 +- .../SampleCustomComponent/SampleCustomComponent.vcxproj | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/playground/react-native.config.js b/packages/playground/react-native.config.js index 7ca6b8cc9ee..8fabccf6d4b 100644 --- a/packages/playground/react-native.config.js +++ b/packages/playground/react-native.config.js @@ -3,6 +3,10 @@ const targetComposition = true; module.exports = { + dependencies: { + // Picker is a UWP/Paper component not compatible with the composition playground + ...(targetComposition && {'@react-native-picker/picker': {platforms: {windows: null}}}), + }, project: { windows: { sourceDir: 'windows', diff --git a/packages/playground/windows/playground-composition.sln b/packages/playground/windows/playground-composition.sln index 7948bdf2265..984704fe404 100644 --- a/packages/playground/windows/playground-composition.sln +++ b/packages/playground/windows/playground-composition.sln @@ -28,11 +28,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mso", "..\..\..\vnext\Mso\M EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Include", "..\..\..\vnext\include\Include.vcxitems", "{EF074BA1-2D54-4D49-A28E-5E040B47CD2E}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SampleCustomComponent", "..\..\sample-custom-component\windows\SampleCustomComponent\SampleCustomComponent.vcxproj", "{A8DA218C-4CB5-48CB-A9EE-9E6337165D07}" - ProjectSection(ProjectDependencies) = postProject - {F7D32BD0-2749-483E-9A0D-1635EF7E3136} = {F7D32BD0-2749-483E-9A0D-1635EF7E3136} - EndProjectSection +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SampleCustomComponent", "..\..\..\node_modules\@rnw-scripts\sample-custom-component\windows\SampleCustomComponent\SampleCustomComponent.vcxproj", "{A8DA218C-4CB5-48CB-A9EE-9E6337165D07}" EndProject +Global GlobalSection(SharedMSBuildProjectFiles) = preSolution ..\..\..\vnext\Shared\Shared.vcxitems*{2049dbe9-8d13-42c9-ae4b-413ae38fffd0}*SharedItemsImports = 9 ..\..\..\vnext\Mso\Mso.vcxitems*{84e05bfa-cbaf-4f0d-bfb6-4ce85742a57e}*SharedItemsImports = 9 diff --git a/packages/playground/windows/playground-composition/Playground-Composition.vcxproj b/packages/playground/windows/playground-composition/Playground-Composition.vcxproj index 00c95d3315c..e9a8a53c8cd 100644 --- a/packages/playground/windows/playground-composition/Playground-Composition.vcxproj +++ b/packages/playground/windows/playground-composition/Playground-Composition.vcxproj @@ -54,7 +54,7 @@ Application Unicode - v143 + $(DefaultPlatformToolset) true diff --git a/packages/sample-custom-component/windows/SampleCustomComponent/SampleCustomComponent.vcxproj b/packages/sample-custom-component/windows/SampleCustomComponent/SampleCustomComponent.vcxproj index bd3c90fdde2..fc306e7198b 100644 --- a/packages/sample-custom-component/windows/SampleCustomComponent/SampleCustomComponent.vcxproj +++ b/packages/sample-custom-component/windows/SampleCustomComponent/SampleCustomComponent.vcxproj @@ -48,7 +48,7 @@ DynamicLibrary Unicode - v143 + $(DefaultPlatformToolset) false From a3a2f9979a8f3feeca722be15d62b6630c990a96 Mon Sep 17 00:00:00 2001 From: Anukrati Agrawal Date: Fri, 29 May 2026 16:05:03 -0700 Subject: [PATCH 2/2] Fix playground-composition parallel build and lock file issues - Align ProjectReference in Playground-Composition.vcxproj to use the same node_modules path as the .sln, preventing parallel build collisions when MSBuild resolves the same project via two different paths (C1041/FTK1011) - Add /FS flag to SampleCustomComponent for synchronized PDB writes - Disable RestoreLockedMode for playground-composition local dev builds to prevent NU1004 errors from stale lock files Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- packages/playground/windows/ExperimentalFeatures.props | 2 ++ .../playground-composition/Playground-Composition.vcxproj | 2 +- .../windows/SampleCustomComponent/SampleCustomComponent.vcxproj | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/playground/windows/ExperimentalFeatures.props b/packages/playground/windows/ExperimentalFeatures.props index 4e46de48644..c3a3cd72043 100644 --- a/packages/playground/windows/ExperimentalFeatures.props +++ b/packages/playground/windows/ExperimentalFeatures.props @@ -11,6 +11,8 @@ true false + + false diff --git a/packages/playground/windows/playground-composition/Playground-Composition.vcxproj b/packages/playground/windows/playground-composition/Playground-Composition.vcxproj index e9a8a53c8cd..20d8539ffd8 100644 --- a/packages/playground/windows/playground-composition/Playground-Composition.vcxproj +++ b/packages/playground/windows/playground-composition/Playground-Composition.vcxproj @@ -158,7 +158,7 @@ - + {a8da218c-4cb5-48cb-a9ee-9e6337165d07} diff --git a/packages/sample-custom-component/windows/SampleCustomComponent/SampleCustomComponent.vcxproj b/packages/sample-custom-component/windows/SampleCustomComponent/SampleCustomComponent.vcxproj index fc306e7198b..4a070673193 100644 --- a/packages/sample-custom-component/windows/SampleCustomComponent/SampleCustomComponent.vcxproj +++ b/packages/sample-custom-component/windows/SampleCustomComponent/SampleCustomComponent.vcxproj @@ -76,7 +76,7 @@ $(IntDir)pch.pch Level4 true - %(AdditionalOptions) /bigobj + %(AdditionalOptions) /bigobj /FS 4453;28204 _WINRT_DLL;%(PreprocessorDefinitions) $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)