<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (c) Microsoft Corporation.
  Licensed under the MIT License.

  This file will be consumed by C++ ALL UWP module projects (both inside
  and outside of this repo) that build on top of Microsoft.ReactNative.
  Do not make any changes here unless it applies to ALL such projects.
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <!-- Check that the correct props have already been imported. -->
  <Target Name="EnsureRnwExternalPropsLoadedTarget" BeforeTargets="PrepareForBuild" Condition="'$(RnwExternalPropsLoaded)'!='Microsoft.ReactNative.Uwp.CppLib.props'">
    <Warning Text="Property `RnwExternalPropsLoaded` was incorrectly set to '$(RnwExternalPropsLoaded)'. Please ensure your project imports 'Microsoft.ReactNative.Uwp.CppLib.props' before importing this prop sheet." />
  </Target>

  <!-- Import targets common to all projects. -->
  <Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Common.targets" />

  <!-- Due to visual studio unconditionally showing references, we have to trick it by making it impossible for VS to find the reference differences between building as source and building as NuGet -->
  <Import Project="$(ReactNativeWindowsDir)PropertySheets\External\Microsoft.ReactNative.Cpp.ProjectReferences.props" Condition="!$(UseExperimentalNuget)" />
  <Import Project="$(ReactNativeWindowsDir)PropertySheets\External\Microsoft.ReactNative.Cpp.PackageReferences.props" Condition="$(UseExperimentalNuget)" />

  <ItemGroup>
    <PackageReference Include="Microsoft.Windows.CppWinRT" Version="$(CppWinRTVersion)" PrivateAssets="all" />
    <!-- WinUI package name and version are set by WinUI.props -->
    <PackageReference Include="$(WinUIPackageName)" Version="$(WinUIPackageVersion)" Condition="'$(OverrideWinUIPackage)'!='true'" />
  </ItemGroup>

  <Target Name="Deploy" />

  <Import Project="$(ReactNativeWindowsDir)\PropertySheets\RequireSolution.targets" />

  <ItemDefinitionGroup>
    <Reference>
        <Private Condition="'$(ConfigurationType)' != 'Application'">false</Private>
    </Reference>
  </ItemDefinitionGroup>
</Project>
