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" +} 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 f0a3399164c..5da9e535819 100644 --- a/vnext/templates/cpp-app/windows/MyApp/MyApp.vcxproj +++ b/vnext/templates/cpp-app/windows/MyApp/MyApp.vcxproj @@ -16,11 +16,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 067a586aa81..ba68cffa9de 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