Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
874bb71
Auto-linking for native modules (source-based)
jonthysell May 11, 2020
0efda8d
Change files
jonthysell May 28, 2020
e3ddf46
Addressing feedback: fix check description
jonthysell May 28, 2020
4b24f68
Addressing feedback: remove ConsoleToMsBuild
jonthysell May 28, 2020
d4602d0
Addressing feedback: fix changelog entry
jonthysell May 29, 2020
9209a73
Addressing feedback: autolink nit
jonthysell May 29, 2020
bc5df11
Addressing feedback: project type guids const
jonthysell May 29, 2020
c5c2d57
Addressing feedback: name args when runWindows calls autolinkWindows
jonthysell May 29, 2020
62cfeaa
Addressing feedback: simplified config schema
jonthysell Jun 1, 2020
c0d6856
Merge branch 'master' into autolink
jonthysell Jun 1, 2020
14c9f12
Merge branch 'master' into autolink
jonthysell Jun 2, 2020
72a046e
Addressing feedback: fixing RegisterAutolinkedNativeModulePackages
jonthysell Jun 2, 2020
a56d757
Merge branch 'master' into autolink
jonthysell Jun 2, 2020
2577747
Addressing feedback: vstools function names and comments
jonthysell Jun 3, 2020
606ae09
Addressing feedback: switching to template files
jonthysell Jun 3, 2020
95aad10
Addressing feedback: fix cpp/cs namespace normalization
jonthysell Jun 3, 2020
264c487
Addressing feedback: add timer to measure autolink performance
jonthysell Jun 3, 2020
e730769
Addressing feedback: update config heurestics
jonthysell Jun 4, 2020
d86c73c
Merge branch 'master' into autolink
jonthysell Jun 4, 2020
d8b9cde
Fixing propagation of run-windows --no-autolink to skip check during …
jonthysell Jun 4, 2020
1ee351b
Merge branch 'master' into autolink
jonthysell Jun 5, 2020
0efe81c
Addressing feedback: JSDoc comments
jonthysell Jun 5, 2020
da80e91
Fixing config schema for direct dependencies, adding examples of over…
jonthysell Jun 6, 2020
a4f4ee3
Fixed bug: a null userConfig should prevent auto-linking
jonthysell Jun 6, 2020
81390ec
Addressing feedback: validate output from react-native config
jonthysell Jun 8, 2020
cedfce5
Addressing feedback: consolidating solution searching
jonthysell Jun 8, 2020
f3cb305
Merge branch 'master' into autolink
jonthysell Jun 9, 2020
9a631e9
Fixed build error in run-windows
jonthysell Jun 9, 2020
f018c0a
Fixed run-windows getting project root
jonthysell Jun 9, 2020
df666e2
Pass through sln and proj flags to autolinking, process errors
jonthysell Jun 9, 2020
46b5c33
Addressing feedback: proper xml parsing
jonthysell Jun 11, 2020
919cbdb
Update sln/proj args to better explain their behavior
jonthysell Jun 11, 2020
1fe5ec9
Fix to make sure autolink check always runs on the correct sln/proj
jonthysell Jun 15, 2020
8a99753
Merge branch 'master' into autolink
jonthysell Jun 19, 2020
e30305f
yarn lock fix
jonthysell Jun 19, 2020
8b116fb
Merge branch 'master' into autolink
jonthysell Jun 19, 2020
cdfe4c9
Merge branch 'master' into autolink
jonthysell Jun 19, 2020
d2d8431
Merge branch 'master' into autolink
jonthysell Jun 19, 2020
1eb05a7
Merge branch 'master' into autolink
jonthysell Jun 19, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions change/react-native-windows-2020-05-28-13-42-40-autolink.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "prerelease",
"comment": "Auto-linking for native modules (source-based)",
"packageName": "react-native-windows",
"email": "jthysell@microsoft.com",
"dependentChangeType": "patch",
"date": "2020-05-28T20:42:40.417Z"
}
2 changes: 2 additions & 0 deletions packages/E2ETest/windows/ReactUWPTestApp/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ public App()
InstanceSettings.UseDeveloperSupport = false;
#endif

Microsoft.ReactNative.Managed.AutolinkedNativeModules.RegisterAutolinkedNativeModulePackages(PackageProviders); // Includes any autolinked modules

PackageProviders.Add(new Microsoft.ReactNative.Managed.ReactPackageProvider());
PackageProviders.Add(new ReflectionReactPackageProvider<App>());
PackageProviders.Add(new TreeDumpLibrary.ReactPackageProvider());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// AutolinkedNativeModules.g.cs contents generated by "react-native autolink-windows"

using System.Collections.Generic;

namespace Microsoft.ReactNative.Managed
{
internal static class AutolinkedNativeModules
{
internal static void RegisterAutolinkedNativeModulePackages(IList<IReactPackageProvider> packageProviders)
{
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- AutolinkedNativeModules.g.targets contents generated by "react-native autolink-windows" -->
<ItemGroup>
</ItemGroup>
</Project>
23 changes: 16 additions & 7 deletions packages/E2ETest/windows/ReactUWPTestApp/ReactUWPTestApp.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="16.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup Label="ReactNativeWindowsProps">
<ReactNativeWindowsDir Condition="'$(ReactNativeWindowsDir)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\</ReactNativeWindowsDir>
</PropertyGroup>
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\external\Microsoft.ReactNative.Uwp.CSharpApp.props"/>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
Expand Down Expand Up @@ -125,6 +124,7 @@
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="AutolinkedNativeModules.g.cs" />
<Compile Include="MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -159,9 +159,6 @@
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>6.2.9</Version>
</PackageReference>
<PackageReference Include="Microsoft.UI.Xaml">
<Version>2.3.191129002</Version>
</PackageReference>
<PackageReference Include="XamlTreeDump">
<Version>1.0.3</Version>
</PackageReference>
Expand All @@ -182,5 +179,17 @@
<PropertyGroup>
<BundleEntryFile>dist/app/index.js</BundleEntryFile>
</PropertyGroup>
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\external\Microsoft.ReactNative.Uwp.CSharpApp.targets"/>
<ImportGroup Label="ReactNativeWindowsPropertySheets">
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CSharpApp.props" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CSharpApp.props')" />
</ImportGroup>
<ImportGroup Label="ReactNativeWindowsTargets">
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CSharpApp.targets" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CSharpApp.targets')" />
</ImportGroup>
<Target Name="EnsureReactNativeWindowsTargets" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references targets in your node_modules\react-native-windows folder. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CSharpApp.props')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CSharpApp.props'))" />
<Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CSharpApp.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CSharpApp.targets'))" />
</Target>
</Project>
13 changes: 13 additions & 0 deletions packages/microsoft-reactnative-sampleapps/react-native.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
// Change the below to true for autolink to target SampleAppCS instead of SampleAppCPP.
// Then run `npx react-native autolink-windows` to actually run the autolink.
const targetCS = false;

module.exports = {
reactNativePath: '../../vnext',
project: {
windows: {
sourceDir: 'windows',
solutionFile: 'SampleApps.sln',
project: {
projectFile: targetCS ? 'SampleAppCS\\SampleAppCS.csproj' : 'SampleAppCPP\\SampleAppCPP.vcxproj',
},
},
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
// Licensed under the MIT License.

#include "pch.h"

#include "App.h"

#include "AutolinkedNativeModules.g.h"
#include <CppWinRTIncludes.h>
#include <ReactPackageProvider.h>
#include <ReactPropertyBag.h>
Expand Down Expand Up @@ -42,6 +45,8 @@ App::App() noexcept {
ReactPropertyBag::Set(InstanceSettings().Properties(), ReactPropertyId<int>{L"Prop1"}, 42);
ReactPropertyBag::Set(InstanceSettings().Properties(), ReactPropertyId<hstring>{L"Prop2"}, L"Hello World!");

RegisterAutolinkedNativeModulePackages(PackageProviders()); // Includes any autolinked modules

PackageProviders().Append(make<ReactPackageProvider>()); // Includes all modules in this project
PackageProviders().Append(winrt::SampleLibraryCpp::ReactPackageProvider());
PackageProviders().Append(winrt::SampleLibraryCS::ReactPackageProvider());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// AutolinkedNativeModules.g.cpp contents generated by "react-native autolink-windows"
// clang-format off
#include "pch.h"
#include "AutolinkedNativeModules.g.h"

namespace winrt::Microsoft::ReactNative
{

void RegisterAutolinkedNativeModulePackages(winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::ReactNative::IReactPackageProvider> const& packageProviders)
{
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// AutolinkedNativeModules.g.h contents generated by "react-native autolink-windows"
#pragma once

// clang-format off
namespace winrt::Microsoft::ReactNative
{

void RegisterAutolinkedNativeModulePackages(winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::ReactNative::IReactPackageProvider> const& packageProviders);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- AutolinkedNativeModules.g.targets contents generated by "react-native autolink-windows" -->
<ItemGroup>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<!-- End Custom .NET Native targets -->
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.props')" />
<PropertyGroup>
<PropertyGroup Label="ReactNativeWindowsProps">
<ReactNativeWindowsDir Condition="'$(ReactNativeWindowsDir)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\</ReactNativeWindowsDir>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
Expand Down Expand Up @@ -102,7 +102,7 @@
<Import Project="PropertySheet.props" />
</ImportGroup>
<ImportGroup Label="ReactNativeWindowsPropertySheets">
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\external\Microsoft.ReactNative.Uwp.CppApp.props"/>
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppApp.props" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppApp.props')" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup>
Expand Down Expand Up @@ -139,6 +139,7 @@
<SubType>Code</SubType>
</ClInclude>
<ClInclude Include="ReactPackageProvider.h" />
<ClInclude Include="AutolinkedNativeModules.g.h" />
<ClInclude Include="pch.h" />
<ClInclude Include="App.h">
<DependentUpon>App.xaml</DependentUpon>
Expand Down Expand Up @@ -170,6 +171,7 @@
<SubType>Code</SubType>
</ClCompile>
<ClCompile Include="ReactPackageProvider.cpp" />
<ClCompile Include="AutolinkedNativeModules.g.cpp" />
<ClCompile Include="pch.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
Expand All @@ -193,9 +195,6 @@
<DeploymentContent>false</DeploymentContent>
</Text>
</ItemGroup>
<ItemGroup>
<Natvis Include="$(ReactNativeWindowsDir)\Folly\Folly.natvis" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SampleLibraryCpp\SampleLibraryCpp.vcxproj">
<Project>{47eec7f3-40d3-49ba-82c1-eaf103b54215}</Project>
Expand All @@ -210,11 +209,20 @@
</Page>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ReactNativeWindowsTargets">
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppApp.targets" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppApp.targets')" />
</ImportGroup>
<Target Name="EnsureReactNativeWindowsTargets" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references targets in your node_modules\react-native-windows folder. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppApp.props')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppApp.props'))" />
<Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppApp.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppApp.targets'))" />
</Target>
<ImportGroup Label="ExtensionTargets">
<Import Project="..\packages\Microsoft.UI.Xaml.2.3.191129002\build\native\Microsoft.UI.Xaml.targets" Condition="Exists('..\packages\Microsoft.UI.Xaml.2.3.191129002\build\native\Microsoft.UI.Xaml.targets')" />
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.targets')" />
</ImportGroup>
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\external\Microsoft.ReactNative.Uwp.CppApp.targets"/>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>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}.</ErrorText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@
<ClCompile Include="App.cpp" />
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
<ClCompile Include="ReactPackageProvider.cpp" />
<ClCompile Include="AutolinkedNativeModules.g.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="pch.h" />
<ClInclude Include="App.h" />
<ClInclude Include="DebugConsole.h" />
<ClInclude Include="ReactPackageProvider.h" />
<ClInclude Include="AutolinkedNativeModules.g.h" />
</ItemGroup>
<ItemGroup>
<Image Include="Assets\Wide310x150Logo.scale-200.png">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ public App()
InstanceSettings.Properties.Set(ReactPropertyBagHelper.GetName(null, "Prop1"), 43);
InstanceSettings.Properties.Set(ReactPropertyBagHelper.GetName(null, "Prop2"), "Hello RNW!");

PackageProviders.Add(new ReactPackageProvider()); // Includes any modules in this project
Microsoft.ReactNative.Managed.AutolinkedNativeModules.RegisterAutolinkedNativeModulePackages(PackageProviders); // Includes any autolinked modules

PackageProviders.Add(new Microsoft.ReactNative.Managed.ReactPackageProvider());
PackageProviders.Add(new ReflectionReactPackageProvider<App>());
PackageProviders.Add(new SampleLibraryCS.ReactPackageProvider());
PackageProviders.Add(new SampleLibraryCpp.ReactPackageProvider());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// AutolinkedNativeModules.g.cs contents generated by "react-native autolink-windows"

using System.Collections.Generic;

namespace Microsoft.ReactNative.Managed
{
internal static class AutolinkedNativeModules
{
internal static void RegisterAutolinkedNativeModulePackages(IList<IReactPackageProvider> packageProviders)
{
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- AutolinkedNativeModules.g.targets contents generated by "react-native autolink-windows" -->
<ItemGroup>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="16.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup Label="ReactNativeWindowsProps">
<ReactNativeWindowsDir Condition="'$(ReactNativeWindowsDir)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\</ReactNativeWindowsDir>
</PropertyGroup>
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\external\Microsoft.ReactNative.Uwp.CSharpApp.props"/>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
Expand Down Expand Up @@ -125,6 +124,7 @@
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="AutolinkedNativeModules.g.cs" />
<Compile Include="DebugConsole.cs" />
<Compile Include="MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
Expand Down Expand Up @@ -177,5 +177,17 @@
<VisualStudioVersion>16.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\external\Microsoft.ReactNative.Uwp.CSharpApp.targets"/>
</Project>
<ImportGroup Label="ReactNativeWindowsPropertySheets">
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CSharpApp.props" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CSharpApp.props')" />
</ImportGroup>
<ImportGroup Label="ReactNativeWindowsTargets">
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CSharpApp.targets" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CSharpApp.targets')" />
</ImportGroup>
<Target Name="EnsureReactNativeWindowsTargets" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references targets in your node_modules\react-native-windows folder. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CSharpApp.props')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CSharpApp.props'))" />
<Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CSharpApp.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CSharpApp.targets'))" />
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.props')" />
<PropertyGroup>
<PropertyGroup Label="ReactNativeWindowsProps">
<ReactNativeWindowsDir Condition="'$(ReactNativeWindowsDir)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\</ReactNativeWindowsDir>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
Expand Down Expand Up @@ -78,7 +78,7 @@
<Import Project="PropertySheet.props" />
</ImportGroup>
<ImportGroup Label="ReactNativeWindowsPropertySheets">
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\external\Microsoft.ReactNative.Uwp.CppLib.props"/>
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.props" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.props')" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
Expand Down Expand Up @@ -159,7 +159,16 @@
</Page>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\external\Microsoft.ReactNative.Uwp.CppLib.targets"/>
<ImportGroup Label="ReactNativeWindowsTargets">
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets')" />
</ImportGroup>
<Target Name="EnsureReactNativeWindowsTargets" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references targets in your node_modules\react-native-windows folder. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.props')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.props'))" />
<Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets'))" />
</Target>
<ImportGroup Label="ExtensionTargets">
<Import Project="$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.targets')" />
</ImportGroup>
Expand Down
Loading