|
18 | 18 | <WindowsTargetPlatformMinVersion>10.0.17134.0</WindowsTargetPlatformMinVersion> |
19 | 19 | </PropertyGroup> |
20 | 20 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
| 21 | + <PropertyGroup Label="ReactNativeWindowsProps"> |
| 22 | + <ReactNativeWindowsDir Condition="'$(ReactNativeWindowsDir)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(SolutionDir), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\</ReactNativeWindowsDir> |
| 23 | + </PropertyGroup> |
21 | 24 | <ItemGroup Label="ProjectConfigurations"> |
22 | 25 | <ProjectConfiguration Include="Debug|ARM"> |
23 | 26 | <Configuration>Debug</Configuration> |
|
82 | 85 | <ImportGroup Label="PropertySheets"> |
83 | 86 | <Import Project="PropertySheet.props" /> |
84 | 87 | </ImportGroup> |
| 88 | + <ImportGroup Label="ReactNativeWindowsPropertySheets"> |
| 89 | + <Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.props" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.props')" /> |
| 90 | + </ImportGroup> |
85 | 91 | <PropertyGroup Label="UserMacros" /> |
86 | 92 | <PropertyGroup /> |
87 | 93 | <ItemDefinitionGroup> |
|
162 | 168 | </ProjectReference> |
163 | 169 | </ItemGroup> |
164 | 170 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
| 171 | + <ImportGroup Label="ReactNativeWindowsTargets"> |
| 172 | + <Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets')" /> |
| 173 | + </ImportGroup> |
| 174 | + <Target Name="EnsureReactNativeWindowsTargets" BeforeTargets="PrepareForBuild"> |
| 175 | + <PropertyGroup> |
| 176 | + <ErrorText>This project references targets in your node_modules\react-native-windows folder that are missing. The missing file is {0}.</ErrorText> |
| 177 | + </PropertyGroup> |
| 178 | + <Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.props')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.props'))" /> |
| 179 | + <Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets'))" /> |
| 180 | + </Target> |
165 | 181 | <ImportGroup Label="ExtensionTargets"> |
166 | 182 | <Import Project="$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.targets')" /> |
167 | 183 | </ImportGroup> |
|
0 commit comments