2020-07-06 23:27:12 +03:00
<?xml version="1.0" encoding="utf-8"?>
2021-06-30 04:43:29 +03:00
<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE-CODE in the project root for license information. -->
2020-07-06 23:27:12 +03:00
<!-- This is a special MSBuild file that is parsed before everything else when MSBuild detects it in our directory structure.
Adding Sdk="Microsoft.NET.Sdk" to a project causes NuGet files to be generated very early on, so we need these defines to be here
2021-06-30 04:43:29 +03:00
to ensure that all of our build output files end up in the same location. -->
2021-05-18 20:18:39 +03:00
<Project InitialTargets="DirectoryBuildPropsInfo" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2023-01-04 22:46:40 +03:00
<Import Project="eng\Version.Dependencies.props" />
2021-06-29 03:54:05 +03:00
<!-- Due to import ordering inconsistencies between different project types, we import this file from multiple places. -->
<Import Project="$(MSBuildThisFileDirectory)build\EnsureOutputLayout.props" Condition="$(EnsureOutputLayoutPropsIncluded) == ''" />
2020-07-06 23:27:12 +03:00
2021-07-16 08:30:19 +03:00
<PropertyGroup>
2021-06-29 03:54:05 +03:00
<IsTDPConfiguration>false</IsTDPConfiguration>
2020-07-06 23:27:12 +03:00
<GeneratedFilesDir>$(BaseIntermediateOutputPath)Generated Files\</GeneratedFilesDir>
<GenerateProjectSpecificOutputFolder>True</GenerateProjectSpecificOutputFolder>
2021-06-29 03:54:05 +03:00
<ForceImportAfterCppTargets>$(BuildRoot)AfterCpp.targets</ForceImportAfterCppTargets>
2022-12-02 20:02:30 +03:00
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
2021-07-15 22:29:42 +03:00
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2023-01-30 04:01:14 +03:00
<NugetPackageDirectory>$(RepoRoot)\packages</NugetPackageDirectory>
2020-07-06 23:27:12 +03:00
</PropertyGroup>
2021-05-18 20:18:39 +03:00
<!-- Compilation differs for the build pipeline vs local development -->
2021-07-16 08:30:19 +03:00
<PropertyGroup Condition="$(WindowsAppSDKBuildPipeline) != '1'">
2021-05-18 20:18:39 +03:00
<!-- If not set, default it to no . -->
2021-07-16 08:30:19 +03:00
<WindowsAppSDKBuildPipeline>0</WindowsAppSDKBuildPipeline>
2021-05-18 20:18:39 +03:00
</PropertyGroup>
2021-06-29 03:54:05 +03:00
<Target Name="DirectoryBuildPropsInfo">
2022-05-03 11:13:36 +03:00
<Message Condition="'$(WindowsAppSDKBuildPipeline)' == '1'" Importance="High" Text="Directory.Build.props detects WindowsAppSDKBuildPipeline=$(WindowsAppSDKBuildPipeline)"/>
2022-01-26 09:41:38 +03:00
2022-10-20 22:31:25 +03:00
<Error Condition="!Exists('$(RepoTestCertificatePFX)')" Text="$(RepoTestCertificatePFX) not found. Run '$(RepoRoot)\DevCheck.cmd' to generate the test certificate." />
<Error Condition="!Exists('$(RepoTestCertificatePWD)')" Text="$(RepoTestCertificatePWD) not found. Run '$(RepoRoot)\DevCheck.cmd' to generate the test certificate." />
2021-05-18 20:18:39 +03:00
</Target>
<!-- Conditional behavior for build pipeline vs local development -->
2021-07-16 08:30:19 +03:00
<ItemDefinitionGroup Condition="$(WindowsAppSDKBuildPipeline) == '1'">
2021-05-18 20:18:39 +03:00
<ClCompile>
2021-07-16 08:30:19 +03:00
<PreprocessorDefinitions>WINDOWSAPPSDK_BUILD_PIPELINE=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
2021-05-18 20:18:39 +03:00
<AdditionalIncludeDirectories>$(SolutionDir)\build\override;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<ResourceCompile>
2021-07-16 08:30:19 +03:00
<PreprocessorDefinitions>WINDOWSAPPSDK_BUILD_PIPELINE=1;%(PreprocessorDefinitions);</PreprocessorDefinitions>
2021-05-18 20:18:39 +03:00
<AdditionalIncludeDirectories>$(SolutionDir)\build\override;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
<Midl>
2021-07-16 08:30:19 +03:00
<PreprocessorDefinitions>WINDOWSAPPSDK_BUILD_PIPELINE=1;%(PreprocessorDefinitions);</PreprocessorDefinitions>
2021-05-18 20:18:39 +03:00
<AdditionalIncludeDirectories>$(SolutionDir)\build\override;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</Midl>
</ItemDefinitionGroup>
2021-08-17 23:17:35 +03:00
2023-01-04 22:46:40 +03:00
<!-- The standard props files do not set _DEBUG for the resource compiler, but we need that to build the correct file
2022-12-09 03:31:00 +03:00
flags in the version info resource -->
<ItemDefinitionGroup Condition="$(Configuration) == 'Debug'">
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions);</PreprocessorDefinitions>
</ResourceCompile>
2023-01-04 22:46:40 +03:00
</ItemDefinitionGroup>
2022-12-09 03:31:00 +03:00
2022-06-16 20:57:32 +03:00
<!-- Define our standardardized options for C/C++ builds -->
<Import Project="$(MSBuildThisFileDirectory)WindowsAppSDK.Build.Cpp.props" />
2022-02-02 22:11:56 +03:00
2022-01-26 09:41:38 +03:00
<!-- Load the test certificate's password (so we do it once for reuse across projects) -->
<PropertyGroup Condition="'$(RepoTestCertificatePFX)' == ''">
<RepoTestCertificatePFX>$(RepoRoot)\.user\winappsdk.certificate.test.pfx</RepoTestCertificatePFX>
</PropertyGroup>
<PropertyGroup Condition="'$(RepoTestCertificatePWD)' == ''">
<RepoTestCertificatePWD>$(RepoRoot)\.user\winappsdk.certificate.test.pwd</RepoTestCertificatePWD>
</PropertyGroup>
<PropertyGroup Condition="('$(RepoTestCertificatePWD)' != '') and Exists('$(RepoTestCertificatePWD)')">
<RepoTestCertificatePassword>$([System.IO.File]::ReadAllText('$(RepoTestCertificatePWD)').TrimEnd())</RepoTestCertificatePassword>
<RepoTestCertificatePasswordRedacted>...redacted...</RepoTestCertificatePasswordRedacted>
</PropertyGroup>
2022-05-03 11:13:36 +03:00
<!-- 'Clean As We Go' if necessary (specified). Prevents build agents from running out of disk space -->
<Target Name="CleanIntermediateFiles" AfterTargets="Build" Condition="'$(WindowsAppSDKCleanIntermediateFiles)' == 'true'">
<RemoveDir Directories="$(IntermediateOutputPath)" />
</Target>
2020-07-06 23:27:12 +03:00
</Project>