diff --git a/change/react-native-windows-2020-05-29-09-01-34-master.json b/change/react-native-windows-2020-05-29-09-01-34-master.json new file mode 100644 index 00000000000..04cdedcfbef --- /dev/null +++ b/change/react-native-windows-2020-05-29-09-01-34-master.json @@ -0,0 +1,8 @@ +{ + "type": "prerelease", + "comment": "Update projects to use shared props/targets", + "packageName": "react-native-windows", + "email": "dannyvv@microsoft.com", + "dependentChangeType": "patch", + "date": "2020-05-29T16:01:34.813Z" +} diff --git a/packages/E2ETest/windows/ReactUWPTestApp/ReactUWPTestApp.csproj b/packages/E2ETest/windows/ReactUWPTestApp/ReactUWPTestApp.csproj index 71294f03bc1..8d576e3807e 100644 --- a/packages/E2ETest/windows/ReactUWPTestApp/ReactUWPTestApp.csproj +++ b/packages/E2ETest/windows/ReactUWPTestApp/ReactUWPTestApp.csproj @@ -1,5 +1,9 @@  + + $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\ + + Debug @@ -114,9 +118,6 @@ prompt true - - $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\ - PackageReference @@ -168,16 +169,6 @@ - - - {f7d32bd0-2749-483e-9a0d-1635ef7e3136} - Microsoft.ReactNative - - - {F2824844-CE15-4242-9420-308923CD76C3} - Microsoft.ReactNative.Managed - - Designer @@ -188,10 +179,8 @@ 16.0 - dist/app/index.js - \ No newline at end of file diff --git a/packages/microsoft-reactnative-sampleapps/windows/SampleAppCPP/SampleAppCpp.vcxproj b/packages/microsoft-reactnative-sampleapps/windows/SampleAppCPP/SampleAppCpp.vcxproj index 95bb7890470..4c6c2f30ef1 100644 --- a/packages/microsoft-reactnative-sampleapps/windows/SampleAppCPP/SampleAppCpp.vcxproj +++ b/packages/microsoft-reactnative-sampleapps/windows/SampleAppCPP/SampleAppCpp.vcxproj @@ -95,15 +95,15 @@ - - - + + + @@ -197,9 +197,6 @@ - - {f7d32bd0-2749-483e-9a0d-1635ef7e3136} - {47eec7f3-40d3-49ba-82c1-eaf103b54215} @@ -217,8 +214,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}. diff --git a/packages/microsoft-reactnative-sampleapps/windows/SampleAppCS/SampleAppCS.csproj b/packages/microsoft-reactnative-sampleapps/windows/SampleAppCS/SampleAppCS.csproj index bcbba5a61b3..97cd2ca5ed4 100644 --- a/packages/microsoft-reactnative-sampleapps/windows/SampleAppCS/SampleAppCS.csproj +++ b/packages/microsoft-reactnative-sampleapps/windows/SampleAppCS/SampleAppCS.csproj @@ -1,5 +1,9 @@  + + $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\ + + Debug @@ -114,9 +118,6 @@ true true - - $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\ - PackageReference @@ -157,14 +158,6 @@ - - {F2824844-CE15-4242-9420-308923CD76C3} - Microsoft.ReactNative.Managed - - - {f7d32bd0-2749-483e-9a0d-1635ef7e3136} - Microsoft.ReactNative - {47eec7f3-40d3-49ba-82c1-eaf103b54215} SampleLibraryCpp @@ -184,13 +177,6 @@ 16.0 - - - + + \ No newline at end of file diff --git a/packages/microsoft-reactnative-sampleapps/windows/SampleApps.sln b/packages/microsoft-reactnative-sampleapps/windows/SampleApps.sln index 120f05548bf..bea0a19b681 100644 --- a/packages/microsoft-reactnative-sampleapps/windows/SampleApps.sln +++ b/packages/microsoft-reactnative-sampleapps/windows/SampleApps.sln @@ -44,15 +44,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ReactNative.Manag EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution - ..\..\..\vnext\JSI\Shared\JSI.Shared.vcxitems*{0cc28589-39e4-4288-b162-97b959f8b843}*SharedItemsImports = 9 - ..\..\..\vnext\Shared\Shared.vcxitems*{2049dbe9-8d13-42c9-ae4b-413ae38fffd0}*SharedItemsImports = 9 - ..\..\..\vnext\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems*{47eec7f3-40d3-49ba-82c1-eaf103b54215}*SharedItemsImports = 4 - ..\..\..\vnext\Mso\Mso.vcxitems*{84e05bfa-cbaf-4f0d-bfb6-4ce85742a57e}*SharedItemsImports = 9 - ..\..\..\vnext\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems*{93f7572c-64b9-4096-9ef9-6ba0ede2b50d}*SharedItemsImports = 4 + ..\..\..\vnext\ReactWindowsCore\ReactWindowsCore.vcxitems*{11c084a3-a57c-4296-a679-cac17b603144}*SharedItemsImports = 4 ..\..\..\vnext\JSI\Shared\JSI.Shared.vcxitems*{a62d504a-16b8-41d2-9f19-e2e86019e5e4}*SharedItemsImports = 4 ..\..\..\vnext\Chakra\Chakra.vcxitems*{c38970c0-5fbf-4d69-90d8-cbac225ae895}*SharedItemsImports = 9 - ..\..\..\vnext\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems*{da8b35b3-da00-4b02-bde6-6a397b3fd46b}*SharedItemsImports = 9 - ..\..\..\vnext\include\Include.vcxitems*{ef074ba1-2d54-4d49-a28e-5e040b47cd2e}*SharedItemsImports = 9 ..\..\..\vnext\Chakra\Chakra.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4 ..\..\..\vnext\JSI\Shared\JSI.Shared.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4 ..\..\..\vnext\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4 diff --git a/packages/microsoft-reactnative-sampleapps/windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj b/packages/microsoft-reactnative-sampleapps/windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj index bb3b37cbd45..4fd0628e51b 100644 --- a/packages/microsoft-reactnative-sampleapps/windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj +++ b/packages/microsoft-reactnative-sampleapps/windows/SampleLibraryCPP/SampleLibraryCPP.vcxproj @@ -17,6 +17,9 @@ 10.0.16299.0 + + $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\ + Debug @@ -68,15 +71,15 @@ - - - + + + @@ -150,18 +153,13 @@ false - - - {f7d32bd0-2749-483e-9a0d-1635ef7e3136} - false - - true + diff --git a/packages/microsoft-reactnative-sampleapps/windows/SampleLibraryCS/SampleLibraryCS.csproj b/packages/microsoft-reactnative-sampleapps/windows/SampleLibraryCS/SampleLibraryCS.csproj index 90b0fb7c276..aeaf8ea1215 100644 --- a/packages/microsoft-reactnative-sampleapps/windows/SampleLibraryCS/SampleLibraryCS.csproj +++ b/packages/microsoft-reactnative-sampleapps/windows/SampleLibraryCS/SampleLibraryCS.csproj @@ -1,6 +1,9 @@  - + + + $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\ + + Debug @@ -119,17 +122,6 @@ 6.2.9 - - - {F2824844-CE15-4242-9420-308923CD76C3} - Microsoft.ReactNative.Managed - - - {f7d32bd0-2749-483e-9a0d-1635ef7e3136} - Microsoft.ReactNative - False - - MSBuild:Compile @@ -140,11 +132,5 @@ 16.0 - + \ No newline at end of file diff --git a/packages/playground/windows/playground-win32/Playground-win32.vcxproj b/packages/playground/windows/playground-win32/Playground-win32.vcxproj index 60bb691b19c..1f25148fa39 100644 --- a/packages/playground/windows/playground-win32/Playground-win32.vcxproj +++ b/packages/playground/windows/playground-win32/Playground-win32.vcxproj @@ -56,8 +56,8 @@ - - + + False @@ -112,19 +112,13 @@ - - - {f7d32bd0-2749-483e-9a0d-1635ef7e3136} - - - - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\AppxPackage\Microsoft.AppXPackage.Targets resources.pri + diff --git a/packages/playground/windows/playground/Playground.vcxproj b/packages/playground/windows/playground/Playground.vcxproj index ceabc30d1e6..d76cf0f013c 100644 --- a/packages/playground/windows/playground/Playground.vcxproj +++ b/packages/playground/windows/playground/Playground.vcxproj @@ -88,20 +88,19 @@ true false - + - - - + + + @@ -192,20 +191,13 @@ false - - - {f7d32bd0-2749-483e-9a0d-1635ef7e3136} - - - Samples/rntester.tsx - diff --git a/vnext/PropertySheets/External/Microsoft.ReactNative.Common.props b/vnext/PropertySheets/External/Microsoft.ReactNative.Common.props new file mode 100644 index 00000000000..8a2f97c13c6 --- /dev/null +++ b/vnext/PropertySheets/External/Microsoft.ReactNative.Common.props @@ -0,0 +1,12 @@ + + + + + $([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)\..\..')) + $(MSBuildProjectDirectory)\ + false + + diff --git a/vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpApp.props b/vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpApp.props index 507b242e185..7d29286b191 100644 --- a/vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpApp.props +++ b/vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpApp.props @@ -4,8 +4,5 @@ Licensed under the MIT License. --> - - $([MSBuild]::NormalizePath('$(MSBuildThisFileDirectory)\..\..'))\ - - + diff --git a/vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpApp.targets b/vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpApp.targets index ce5f4fe3c72..826c2fe818e 100644 --- a/vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpApp.targets +++ b/vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpApp.targets @@ -5,11 +5,11 @@ --> - + {f7d32bd0-2749-483e-9a0d-1635ef7e3136} Microsoft.ReactNative - + {F2824844-CE15-4242-9420-308923CD76C3} Microsoft.ReactNative.Managed @@ -17,20 +17,24 @@ 2.3.191129002 - - - + + + + + + + - + DestinationFiles="$(MSBuildProjectDirectory)$(OutputPath)Appx\%(AppxPackagedFile.PackagePath)" /> - diff --git a/vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpLib.props b/vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpLib.props new file mode 100644 index 00000000000..7d29286b191 --- /dev/null +++ b/vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpLib.props @@ -0,0 +1,8 @@ + + + + + diff --git a/vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpLib.targets b/vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpLib.targets new file mode 100644 index 00000000000..a2ca20969ea --- /dev/null +++ b/vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpLib.targets @@ -0,0 +1,20 @@ + + + + + + {f7d32bd0-2749-483e-9a0d-1635ef7e3136} + Microsoft.ReactNative + false + + + + {F2824844-CE15-4242-9420-308923CD76C3} + Microsoft.ReactNative.Managed + false + + + diff --git a/vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CppApp.props b/vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CppApp.props index fcc4b9abb6d..7d29286b191 100644 --- a/vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CppApp.props +++ b/vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CppApp.props @@ -4,9 +4,5 @@ Licensed under the MIT License. --> - - $([MSBuild]::NormalizePath('$(MSBuildThisFileDirectory)\..\..'))\ - false - - + diff --git a/vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CppApp.targets b/vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CppApp.targets index 9aad8acc30f..511da2d41c8 100644 --- a/vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CppApp.targets +++ b/vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CppApp.targets @@ -5,20 +5,27 @@ --> - + + - + {f7d32bd0-2749-483e-9a0d-1635ef7e3136} - - - + + + + + + + + - diff --git a/vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CppLib.props b/vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CppLib.props new file mode 100644 index 00000000000..7d29286b191 --- /dev/null +++ b/vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CppLib.props @@ -0,0 +1,8 @@ + + + + + diff --git a/vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CppLib.targets b/vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CppLib.targets new file mode 100644 index 00000000000..c88a3751d10 --- /dev/null +++ b/vnext/PropertySheets/External/Microsoft.ReactNative.Uwp.CppLib.targets @@ -0,0 +1,17 @@ + + + + + + + + + + {f7d32bd0-2749-483e-9a0d-1635ef7e3136} + false + + + diff --git a/vnext/local-cli/generator-windows/templates/cpp/proj-experimental/MyApp.vcxproj b/vnext/local-cli/generator-windows/templates/cpp/proj-experimental/MyApp.vcxproj index 5ecf444ad69..bfbaac7574e 100644 --- a/vnext/local-cli/generator-windows/templates/cpp/proj-experimental/MyApp.vcxproj +++ b/vnext/local-cli/generator-windows/templates/cpp/proj-experimental/MyApp.vcxproj @@ -20,6 +20,10 @@ password + + $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\ + true + Debug @@ -77,6 +81,9 @@ + + + @@ -164,15 +171,10 @@ - - $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\ - true - - - + - + This project references targets in your node_modules\react-native-windows folder. The missing file is {0}. diff --git a/vnext/local-cli/generator-windows/templates/cpp/proj/MyApp.vcxproj b/vnext/local-cli/generator-windows/templates/cpp/proj/MyApp.vcxproj index 78c57198545..b61a21812e1 100644 --- a/vnext/local-cli/generator-windows/templates/cpp/proj/MyApp.vcxproj +++ b/vnext/local-cli/generator-windows/templates/cpp/proj/MyApp.vcxproj @@ -20,6 +20,9 @@ password + + $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\ + Debug @@ -77,6 +80,9 @@ + + + @@ -164,14 +170,10 @@ - - $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\ - - - + - + This project references targets in your node_modules\react-native-windows folder. The missing file is {0}. diff --git a/vnext/local-cli/generator-windows/templates/cs/proj/MyApp.csproj b/vnext/local-cli/generator-windows/templates/cs/proj/MyApp.csproj index f54fbf520ff..639d3f5d02d 100644 --- a/vnext/local-cli/generator-windows/templates/cs/proj/MyApp.csproj +++ b/vnext/local-cli/generator-windows/templates/cs/proj/MyApp.csproj @@ -1,5 +1,9 @@  + + $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\ + + Debug @@ -163,14 +167,8 @@ 16.0 - - $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\ - - - - - - + + This project references targets in your node_modules\react-native-windows folder. The missing file is {0}.