From fd5e966b2bf89a869ed8018412a173bf274a36d7 Mon Sep 17 00:00:00 2001
From: Andrew Coates <30809111+acoates-ms@users.noreply.github.com>
Date: Sun, 17 May 2026 16:57:55 -0700
Subject: [PATCH 1/2] Template should import Microsoft.Cpp.Default.props before
setting ReactNativeWindowsDir
---
vnext/template/cpp-app/proj/MyApp.vcxproj | 2 +-
vnext/template/cpp-lib/proj/MyLib.vcxproj | 2 +-
vnext/templates/cpp-app/windows/MyApp/MyApp.vcxproj | 2 +-
vnext/templates/cpp-lib/windows/MyLib/MyLib.vcxproj | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/vnext/template/cpp-app/proj/MyApp.vcxproj b/vnext/template/cpp-app/proj/MyApp.vcxproj
index dffb3175d3f..3f6f32e0846 100644
--- a/vnext/template/cpp-app/proj/MyApp.vcxproj
+++ b/vnext/template/cpp-app/proj/MyApp.vcxproj
@@ -15,11 +15,11 @@
Windows Store
10.0
+
$([MSBuild]::GetDirectoryNameOfFileAbove($(SolutionDir), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\
-
Debug
diff --git a/vnext/template/cpp-lib/proj/MyLib.vcxproj b/vnext/template/cpp-lib/proj/MyLib.vcxproj
index 71e8f394146..c2ce9c7ff31 100644
--- a/vnext/template/cpp-lib/proj/MyLib.vcxproj
+++ b/vnext/template/cpp-lib/proj/MyLib.vcxproj
@@ -15,6 +15,7 @@
Windows Store
10.0
+
$([MSBuild]::GetDirectoryNameOfFileAbove($(SolutionDir), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\
@@ -23,7 +24,6 @@
10.0.22621.0
10.0.17763.0
-
Debug
diff --git a/vnext/templates/cpp-app/windows/MyApp/MyApp.vcxproj b/vnext/templates/cpp-app/windows/MyApp/MyApp.vcxproj
index a605b34aaa1..85d8e4775b5 100644
--- a/vnext/templates/cpp-app/windows/MyApp/MyApp.vcxproj
+++ b/vnext/templates/cpp-app/windows/MyApp/MyApp.vcxproj
@@ -14,11 +14,11 @@
17.0
false
+
$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\
-
Debug
diff --git a/vnext/templates/cpp-lib/windows/MyLib/MyLib.vcxproj b/vnext/templates/cpp-lib/windows/MyLib/MyLib.vcxproj
index 09df9a72e4b..51d143f25b6 100644
--- a/vnext/templates/cpp-lib/windows/MyLib/MyLib.vcxproj
+++ b/vnext/templates/cpp-lib/windows/MyLib/MyLib.vcxproj
@@ -14,12 +14,12 @@
17.0
false
+
$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\
false
-
Debug
From 69aa1d2cc8ffc20aa474cc624dd35b37a181a8aa Mon Sep 17 00:00:00 2001
From: Andrew Coates <30809111+acoates-ms@users.noreply.github.com>
Date: Sun, 17 May 2026 16:58:05 -0700
Subject: [PATCH 2/2] Change files
---
...ative-windows-6cd4f931-1b4e-4127-ba02-3b4bb01b2645.json | 7 +++++++
1 file changed, 7 insertions(+)
create mode 100644 change/react-native-windows-6cd4f931-1b4e-4127-ba02-3b4bb01b2645.json
diff --git a/change/react-native-windows-6cd4f931-1b4e-4127-ba02-3b4bb01b2645.json b/change/react-native-windows-6cd4f931-1b4e-4127-ba02-3b4bb01b2645.json
new file mode 100644
index 00000000000..3c529ef9d01
--- /dev/null
+++ b/change/react-native-windows-6cd4f931-1b4e-4127-ba02-3b4bb01b2645.json
@@ -0,0 +1,7 @@
+{
+ "type": "prerelease",
+ "comment": "Template should import Microsoft.Cpp.Default.props before setting ReactNativeWindowsDir",
+ "packageName": "react-native-windows",
+ "email": "30809111+acoates-ms@users.noreply.github.com",
+ "dependentChangeType": "patch"
+}