2014-07-18 03:32:19 +04:00
<?xml version="1.0" encoding="utf-8"?>
<!--
Master script for building all permutations of project * platform * configuration.
For best performance, enable parallel builds:
2015-04-24 22:07:11 +03:00
msbuild Win2D.proj /maxcpucount /nr:false
2014-07-18 03:32:19 +04:00
-->
2023-02-09 20:43:20 +03:00
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="17.0" DefaultTargets="Build">
2014-07-18 03:32:19 +04:00
2018-02-22 21:55:59 +03:00
<!-- Parameters that can be configured by the caller, eg. "msbuild Win2D.proj /p:BuildTests=false" -->
2014-07-18 03:32:19 +04:00
<PropertyGroup>
2020-06-12 23:50:52 +03:00
<BuildPlatforms>Win32;x64;ARM64;AnyCPU</BuildPlatforms>
2014-07-18 03:32:19 +04:00
<BuildConfigurations>Debug;Release</BuildConfigurations>
<BuildTests>true</BuildTests>
<BuildTools>true</BuildTools>
2022-04-28 18:37:47 +03:00
<BuildDocs>false</BuildDocs>
2014-07-26 01:52:36 +04:00
<RunTests>true</RunTests>
2014-07-18 03:32:19 +04:00
</PropertyGroup>
2015-01-28 00:28:54 +03:00
<PropertyGroup>
2015-04-16 01:39:12 +03:00
<ShouldRunUAPTests>false</ShouldRunUAPTests>
2015-04-16 20:03:52 +03:00
<ShouldRunUAPTests Condition="'$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion@CurrentBuildNumber)' >= '10000'">true</ShouldRunUAPTests>
2015-01-28 00:28:54 +03:00
</PropertyGroup>
2014-07-26 01:52:36 +04:00
<!-- Set default platforms for each project type -->
2014-07-18 03:32:19 +04:00
<ItemDefinitionGroup>
2015-01-28 00:28:54 +03:00
<UAPProject>
2020-06-12 23:50:52 +03:00
<Platforms>Win32;x64;ARM64</Platforms>
2015-01-28 00:28:54 +03:00
<BinDir>UAP</BinDir>
</UAPProject>
2014-07-18 03:32:19 +04:00
<AnyCPUProject>
<Platforms>AnyCPU</Platforms>
2015-01-28 00:28:54 +03:00
<BinDir>Windows</BinDir>
2014-07-18 03:32:19 +04:00
</AnyCPUProject>
</ItemDefinitionGroup>
2014-07-26 01:52:36 +04:00
2018-02-22 21:55:59 +03:00
<!-- Projects implementing the Canvas API -->
<ItemGroup>
2015-01-28 00:28:54 +03:00
<UAPProject Include="winrt\lib\winrt.lib.uap.vcxproj" />
<UAPProject Include="winrt\dll\winrt.dll.uap.vcxproj" />
2023-02-21 18:52:32 +03:00
<AnyCPUProject Include="winrt\projection\winrt.projection.csproj" />
2015-01-28 00:28:54 +03:00
</ItemGroup>
2018-02-22 21:55:59 +03:00
<!-- Test projects -->
<ItemGroup Condition="$(BuildTests)">
2015-01-28 00:28:54 +03:00
<UAPProject Include="winrt\test.internal\winrt.test.internal.uap.vcxproj">
<Platforms>Win32;x64</Platforms>
2015-04-16 01:39:12 +03:00
<AutomatedTests Condition="$(ShouldRunUAPTests)">desktop</AutomatedTests>
2015-01-28 00:28:54 +03:00
</UAPProject>
</ItemGroup>
2014-07-18 03:32:19 +04:00
<!-- Tools projects -->
<ItemGroup Condition="$(BuildTools)">
2016-01-09 00:35:42 +03:00
<AnyCPUProject Include="tools\checkcode\checkcode.csproj" />
2014-07-18 03:32:19 +04:00
<AnyCPUProject Include="tools\codegen\exe\codegen.exe.csproj" />
2014-07-26 01:52:36 +04:00
<AnyCPUProject Include="tools\codegen\test\codegen.test.csproj" Condition="$(BuildTests)">
<AutomatedTests>desktop</AutomatedTests>
2014-07-18 03:32:19 +04:00
</AnyCPUProject>
2015-02-26 03:20:43 +03:00
<AnyCPUProject Include="tools\mock\exe\mock.exe.csproj" />
<AnyCPUProject Include="tools\mock\test\mock.test.csproj" Condition="$(BuildTests)">
<AutomatedTests>desktop</AutomatedTests>
</AnyCPUProject>
2014-07-18 03:32:19 +04:00
</ItemGroup>
2014-07-26 01:52:36 +04:00
<!-- Master target just chains to a bunch of workers -->
<Target Name="Build"
2022-04-28 18:37:47 +03:00
DependsOnTargets="BuildProjects; CheckCode; RunTests" />
2014-07-26 01:52:36 +04:00
Add ARM64 support (#722)
* Add ARM64 entries where ARM entries are
This change adds ARM64 entries where ARM(32) entries already exist.
In the case of certain test configurations, ARM is set to use the x86
configuration so ARM64 imitates this.
Since winrt.test.managed.uap.csproj is not compatible with .NET Native
and the ARM64 UWP does not support .NET other than Native, it is
omitted.
* Upgrade DirectXTK_UWP dep to 2019.4.26.1
This takes care of unresolved externals in the Direct3DInterop library
by updating to a version of directxtk_uwp that has ARM64 support.
* Bump UniversalWindowsPlatform to 6.2.8
This change fixes the Nuget Restore error
The local source 'C:\Users\jkunkee\source\repos\Win2D\bin' doesn't exist.
Incidentally, it also pulls in a version with official ARM64 support:
https://github.com/Microsoft/dotnet/blob/master/releases/UWP/net-native2.2/README.md#uwp-627-march-12th-2019
* Set TargetPlatformMinVersion to 10.0.16299.0 for ARM64
This change fixes errors about ARM64 not being supported before 16299.
* Work around NuGet TargetPlatformMinVersion limits
This change accomodates Visual Studio's lack of support for multiple
TargetPlatformMinVersion values in one project by separating the NuGet
restore and the build operations that depend on it.
UWAs that intend to support ARM64 must have a TargetPlatformMinVersion
of at least 10.0.16299.0, while UWAs that intend to support all past
versions of Windows 10 must set it to 10.0.10240.0. The Win2D sample
and test UWAs need to do both, but NuGet restore only takes one. This
this change copies the restore and build operations into two such that
the 16299 restore runs, the 16299 (ARM64) builds run, then the 10240
restore runs, and finally the 10240 builds run. This builds
everything, including tests, for all architectures. One side effect is
that the NuGet package state is left in a state that supports building
the most common Platforms from Visual Studio.
A corrolary to this is that exported sample projects will require
similar arrangements to build for both full Windows 10 backwards
compatibility and for ARM64.
Since BuildDocs.proj also uses NuGet Restore, it specifically uses the
more general 10240 restore target.
* Drop WorkAroundNuGetRestoreBug
As of Visual Studio 2017 and this point in the commit history, this
workaround is no longer necessary.
2019-09-07 01:30:24 +03:00
<!-- TargetPlatformMinVersion 10.0.16299.0 and 10.0.10240 Platforms must be build separately. -->
2022-04-28 18:37:47 +03:00
<Target Name="BuildProjects" DependsOnTargets="BuildProjects18362" />
Add ARM64 support (#722)
* Add ARM64 entries where ARM entries are
This change adds ARM64 entries where ARM(32) entries already exist.
In the case of certain test configurations, ARM is set to use the x86
configuration so ARM64 imitates this.
Since winrt.test.managed.uap.csproj is not compatible with .NET Native
and the ARM64 UWP does not support .NET other than Native, it is
omitted.
* Upgrade DirectXTK_UWP dep to 2019.4.26.1
This takes care of unresolved externals in the Direct3DInterop library
by updating to a version of directxtk_uwp that has ARM64 support.
* Bump UniversalWindowsPlatform to 6.2.8
This change fixes the Nuget Restore error
The local source 'C:\Users\jkunkee\source\repos\Win2D\bin' doesn't exist.
Incidentally, it also pulls in a version with official ARM64 support:
https://github.com/Microsoft/dotnet/blob/master/releases/UWP/net-native2.2/README.md#uwp-627-march-12th-2019
* Set TargetPlatformMinVersion to 10.0.16299.0 for ARM64
This change fixes errors about ARM64 not being supported before 16299.
* Work around NuGet TargetPlatformMinVersion limits
This change accomodates Visual Studio's lack of support for multiple
TargetPlatformMinVersion values in one project by separating the NuGet
restore and the build operations that depend on it.
UWAs that intend to support ARM64 must have a TargetPlatformMinVersion
of at least 10.0.16299.0, while UWAs that intend to support all past
versions of Windows 10 must set it to 10.0.10240.0. The Win2D sample
and test UWAs need to do both, but NuGet restore only takes one. This
this change copies the restore and build operations into two such that
the 16299 restore runs, the 16299 (ARM64) builds run, then the 10240
restore runs, and finally the 10240 builds run. This builds
everything, including tests, for all architectures. One side effect is
that the NuGet package state is left in a state that supports building
the most common Platforms from Visual Studio.
A corrolary to this is that exported sample projects will require
similar arrangements to build for both full Windows 10 backwards
compatibility and for ARM64.
Since BuildDocs.proj also uses NuGet Restore, it specifically uses the
more general 10240 restore target.
* Drop WorkAroundNuGetRestoreBug
As of Visual Studio 2017 and this point in the commit history, this
workaround is no longer necessary.
2019-09-07 01:30:24 +03:00
<Target Name="BuildProjectsPrelim" DependsOnTargets="PrepareVersionInfo; ChooseProjectsToBuild; ChooseConfigurationsToRestore" />
2014-07-26 01:52:36 +04:00
<!-- Use batching to build each project in turn -->
2022-04-28 18:37:47 +03:00
<Target Name="BuildProjects18362"
DependsOnTargets="BuildProjectsPrelim; RestoreNuGetPackages18362"
2014-07-26 01:52:36 +04:00
Inputs="@(ProjectsToBuild)"
Outputs="%(PlatformIndependentName)">
2022-04-28 18:37:47 +03:00
<Message Importance="High" Text="Building TargetPlatformMinVersion 18362 variants of project %(ProjectsToBuild.PlatformIndependentName):" />
<Message Importance="High" Text=" %(ProjectsToBuild.Filename) (%(ProjectsToBuild.Configuration)|%(ProjectsToBuild.Platform))" />
2014-07-26 01:52:36 +04:00
2015-04-24 22:07:11 +03:00
<!-- All the variants (platform and configuration) of most projects can be built in parallel -->
Add ARM64 support (#722)
* Add ARM64 entries where ARM entries are
This change adds ARM64 entries where ARM(32) entries already exist.
In the case of certain test configurations, ARM is set to use the x86
configuration so ARM64 imitates this.
Since winrt.test.managed.uap.csproj is not compatible with .NET Native
and the ARM64 UWP does not support .NET other than Native, it is
omitted.
* Upgrade DirectXTK_UWP dep to 2019.4.26.1
This takes care of unresolved externals in the Direct3DInterop library
by updating to a version of directxtk_uwp that has ARM64 support.
* Bump UniversalWindowsPlatform to 6.2.8
This change fixes the Nuget Restore error
The local source 'C:\Users\jkunkee\source\repos\Win2D\bin' doesn't exist.
Incidentally, it also pulls in a version with official ARM64 support:
https://github.com/Microsoft/dotnet/blob/master/releases/UWP/net-native2.2/README.md#uwp-627-march-12th-2019
* Set TargetPlatformMinVersion to 10.0.16299.0 for ARM64
This change fixes errors about ARM64 not being supported before 16299.
* Work around NuGet TargetPlatformMinVersion limits
This change accomodates Visual Studio's lack of support for multiple
TargetPlatformMinVersion values in one project by separating the NuGet
restore and the build operations that depend on it.
UWAs that intend to support ARM64 must have a TargetPlatformMinVersion
of at least 10.0.16299.0, while UWAs that intend to support all past
versions of Windows 10 must set it to 10.0.10240.0. The Win2D sample
and test UWAs need to do both, but NuGet restore only takes one. This
this change copies the restore and build operations into two such that
the 16299 restore runs, the 16299 (ARM64) builds run, then the 10240
restore runs, and finally the 10240 builds run. This builds
everything, including tests, for all architectures. One side effect is
that the NuGet package state is left in a state that supports building
the most common Platforms from Visual Studio.
A corrolary to this is that exported sample projects will require
similar arrangements to build for both full Windows 10 backwards
compatibility and for ARM64.
Since BuildDocs.proj also uses NuGet Restore, it specifically uses the
more general 10240 restore target.
* Drop WorkAroundNuGetRestoreBug
As of Visual Studio 2017 and this point in the commit history, this
workaround is no longer necessary.
2019-09-07 01:30:24 +03:00
<MSBuild Projects="@(ProjectsToBuild)"
BuildInParallel="%(ProjectsToBuild.BuildInParallel)"
2022-04-28 18:37:47 +03:00
Properties="IncludeVersionInfo=true" />
2014-07-26 01:52:36 +04:00
</Target>
2014-07-18 03:32:19 +04:00
<Target Name="ChooseProjectsToBuild">
<ItemGroup>
<!-- Expand parameter properties into item groups, so we can batch over them -->
<BuildPlatform Include="$(BuildPlatforms)" />
<BuildConfiguration Include="$(BuildConfigurations)" />
<!-- Generate the cartesian product of all projects * all platforms we are building -->
2018-02-22 21:55:59 +03:00
<CandidateProjects Include="@(UAPProject);@(AnyCPUProject)">
2014-07-18 03:32:19 +04:00
<Platform>%(BuildPlatform.Identity)</Platform>
</CandidateProjects>
<!-- Filter the list to include only project/platform pairs where the project actually supports that platform -->
<FilteredProjects Include="@(CandidateProjects)" Condition="$([System.String]::new('%(CandidateProjects.Platforms)').Contains('%(CandidateProjects.Platform)'))" />
<!-- Generate the cartesian product of our filtered project list * the configurations we are building -->
<ProjectsPerConfig Include="@(FilteredProjects)">
<Configuration>%(BuildConfiguration.Identity)</Configuration>
</ProjectsPerConfig>
2014-07-26 01:52:36 +04:00
<!-- Move platform and configuration into the AdditionalProperties metadata, and generate a
2015-03-13 20:12:45 +03:00
platform independent name that will be the same for Windows, Phone and UAP project variants -->
2014-07-18 03:32:19 +04:00
<ProjectsToBuild Include="@(ProjectsPerConfig)">
<AdditionalProperties>Platform=%(ProjectsPerConfig.Platform);Configuration=%(ProjectsPerConfig.Configuration)</AdditionalProperties>
2015-03-13 20:12:45 +03:00
<PlatformIndependentName>$([System.String]::new('%(ProjectsPerConfig.Filename)').Replace('Windows', '').Replace('Phone', '').Replace('uap', '').TrimEnd('.'))</PlatformIndependentName>
2015-04-24 22:07:11 +03:00
<BuildInParallel Condition="'%(ProjectsPerConfig.BuildInParallel)' == ''">true</BuildInParallel>
2014-07-18 03:32:19 +04:00
</ProjectsToBuild>
</ItemGroup>
</Target>
2014-10-31 00:45:51 +03:00
<Target Name="PrepareVersionInfo">
<MakeDir Directories="obj" />
<!-- Read the current Win2D version number -->
<ReadLinesFromFile File="build\nuget\VERSION">
<Output TaskParameter="Lines" PropertyName="Win2DVersion" />
</ReadLinesFromFile>
<!-- Read the SHA-1 hash for git HEAD, so we can later identify exactly what code went into this build -->
<Exec Command="git rev-parse --verify HEAD > obj\Win2D.githash.txt" IgnoreExitCode="true">
<Output TaskParameter="ExitCode" PropertyName="GitExitCode" />
</Exec>
<WriteLinesToFile Condition="$(GitExitCode) != 0" File ="obj\Win2D.githash.txt" Lines="unknown git hash" />
<ReadLinesFromFile File="obj\Win2D.githash.txt">
<Output TaskParameter="Lines" PropertyName="GitHash" />
</ReadLinesFromFile>
<!-- Generate AssemblyVersion.cs, which adds the latest version info to managed assembly outputs -->
<ItemGroup>
<AssemblyVersionCode Include="[assembly: System.Reflection.AssemblyVersion("$(Win2DVersion)")]" />
<AssemblyVersionCode Include="[assembly: System.Reflection.AssemblyFileVersion("$(Win2DVersion)")]" />
<AssemblyVersionCode Include="[assembly: System.Reflection.AssemblyInformationalVersionAttribute("$(Win2DVersion) ($(GitHash))")]" />
</ItemGroup>
<ReadLinesFromFile File="obj\AssemblyVersion.cs">
<Output TaskParameter="Lines" ItemName="ExistingAssemblyVersion" />
</ReadLinesFromFile>
<WriteLinesToFile Condition="@(AssemblyVersionCode) != @(ExistingAssemblyVersion)" File="obj\AssemblyVersion.cs" Lines="@(AssemblyVersionCode)" Overwrite="true" />
<!-- Also generate DllVersion.h, which adds version info to native DLLs -->
<ItemGroup>
<DllVersionCode Include="#define DLL_VERSION $(Win2DVersion.Replace('.', ','))" />
<DllVersionCode Include="#define DLL_VERSION_STRING "$(Win2DVersion)"" />
<DllVersionCode Include="#define DLL_VERSION_STRING_LONG "$(Win2DVersion) ($(GitHash))"" />
</ItemGroup>
<ReadLinesFromFile File="obj\DllVersion.h">
<Output TaskParameter="Lines" ItemName="ExistingDllVersion" />
</ReadLinesFromFile>
<WriteLinesToFile Condition="@(DllVersionCode) != @(ExistingDllVersion)" File="obj\DllVersion.h" Lines="@(DllVersionCode)" Overwrite="true" />
</Target>
2016-01-09 00:35:42 +03:00
<!-- Make sure all our source files have the right copyright and formatting -->
<Target Name="CheckCode"
2015-05-30 01:13:41 +03:00
Condition="$(BuildTools) and $(BuildPlatforms.Contains('AnyCPU'))">
2014-07-26 01:52:36 +04:00
2016-01-09 00:35:42 +03:00
<Message Importance="High" Text="Checking copyright banners and source code formatting" />
2014-07-26 01:52:36 +04:00
2016-01-09 00:35:42 +03:00
<MSBuild Projects="tools\checkcode\RunCodeChecks.proj" />
2014-07-26 01:52:36 +04:00
</Target>
2014-08-12 08:37:27 +04:00
<!-- Build the reference documentation -->
2015-03-12 23:48:39 +03:00
<UsingTask TaskName="SetEnv" AssemblyFile="$(VCTargetsPath)Microsoft.Build.CppTasks.Common.dll"/>
2014-07-26 01:52:36 +04:00
<!-- Run the automated tests -->
2015-01-28 00:28:54 +03:00
<PropertyGroup>
<_VsTestPathUnderCommonTools>..\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe</_VsTestPathUnderCommonTools>
<_VsTest Condition="Exists('$(VS120COMNTOOLS)$(_VsTestPathUnderCommonTools)')">$(VS120COMNTOOLS)$(_VsTestPathUnderCommonTools)</_VsTest>
<_VsTest Condition="Exists('$(VS140COMNTOOLS)$(_VsTestPathUnderCommonTools)')">$(VS140COMNTOOLS)$(_VsTestPathUnderCommonTools)</_VsTest>
2017-12-18 20:54:03 +03:00
<_VsTest Condition="Exists('$(VS150COMNTOOLS)$(_VsTestPathUnderCommonTools)')">$(VS150COMNTOOLS)$(_VsTestPathUnderCommonTools)</_VsTest>
2019-09-07 02:13:03 +03:00
<_VsTest Condition="Exists('$(VS160COMNTOOLS)$(_VsTestPathUnderCommonTools)')">$(VS160COMNTOOLS)$(_VsTestPathUnderCommonTools)</_VsTest>
2023-02-09 20:43:20 +03:00
<_VsTest Condition="Exists('$(VS170COMNTOOLS)$(_VsTestPathUnderCommonTools)')">$(VS170COMNTOOLS)$(_VsTestPathUnderCommonTools)</_VsTest>
2019-09-07 00:11:02 +03:00
<VsTest Condition="'$(_VsTest)' != ''">"$([System.IO.Path]::GetFullPath('$(_VsTest)'))"</VsTest>
2015-01-28 00:28:54 +03:00
</PropertyGroup>
2014-07-26 01:52:36 +04:00
<Target Name="RunTests"
Condition="$(BuildTests) and $(RunTests)"
DependsOnTargets="ChooseProjectsToBuild; ChooseTestsToRun"
Inputs="@(TestProjects)"
Outputs="%(TestProjects.TestAppX)">
2019-09-07 00:11:02 +03:00
<PropertyGroup>
<PowerShellExe Condition=" '$(PowerShellExe)'=='' ">%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe</PowerShellExe>
</PropertyGroup>
<Error Text="vstest.console.exe not found, please specify using the VsTest property" Condition="'$(VsTest)' == ''" />
2014-07-26 01:52:36 +04:00
<Message Importance="High" Text="Running tests: %(TestProjects.Filename) (%(TestProjects.Configuration)|%(TestProjects.Platform))" />
2019-09-07 02:13:03 +03:00
<Exec Command="$(PowerShellExe) -NonInteractive -executionpolicy Unrestricted -command "& { get-appxpackage -name E2C40EB9-8CCE-48B1-9A5C-4C8CA4999631 | remove-appxpackage } "" ConsoleToMsBuild="true" ContinueOnError="ErrorAndContinue" IgnoreStandardErrorWarningFormat="true"/>
2015-01-28 00:28:54 +03:00
<Exec Command="$(VsTest) %(TestProjects.TestBinary)%(TestProjects.TestArgs)" ContinueOnError="ErrorAndContinue" IgnoreStandardErrorWarningFormat="true" />
2014-07-26 01:52:36 +04:00
</Target>
<Target Name="ChooseTestsToRun">
<ItemGroup>
Add ARM64 support (#722)
* Add ARM64 entries where ARM entries are
This change adds ARM64 entries where ARM(32) entries already exist.
In the case of certain test configurations, ARM is set to use the x86
configuration so ARM64 imitates this.
Since winrt.test.managed.uap.csproj is not compatible with .NET Native
and the ARM64 UWP does not support .NET other than Native, it is
omitted.
* Upgrade DirectXTK_UWP dep to 2019.4.26.1
This takes care of unresolved externals in the Direct3DInterop library
by updating to a version of directxtk_uwp that has ARM64 support.
* Bump UniversalWindowsPlatform to 6.2.8
This change fixes the Nuget Restore error
The local source 'C:\Users\jkunkee\source\repos\Win2D\bin' doesn't exist.
Incidentally, it also pulls in a version with official ARM64 support:
https://github.com/Microsoft/dotnet/blob/master/releases/UWP/net-native2.2/README.md#uwp-627-march-12th-2019
* Set TargetPlatformMinVersion to 10.0.16299.0 for ARM64
This change fixes errors about ARM64 not being supported before 16299.
* Work around NuGet TargetPlatformMinVersion limits
This change accomodates Visual Studio's lack of support for multiple
TargetPlatformMinVersion values in one project by separating the NuGet
restore and the build operations that depend on it.
UWAs that intend to support ARM64 must have a TargetPlatformMinVersion
of at least 10.0.16299.0, while UWAs that intend to support all past
versions of Windows 10 must set it to 10.0.10240.0. The Win2D sample
and test UWAs need to do both, but NuGet restore only takes one. This
this change copies the restore and build operations into two such that
the 16299 restore runs, the 16299 (ARM64) builds run, then the 10240
restore runs, and finally the 10240 builds run. This builds
everything, including tests, for all architectures. One side effect is
that the NuGet package state is left in a state that supports building
the most common Platforms from Visual Studio.
A corrolary to this is that exported sample projects will require
similar arrangements to build for both full Windows 10 backwards
compatibility and for ARM64.
Since BuildDocs.proj also uses NuGet Restore, it specifically uses the
more general 10240 restore target.
* Drop WorkAroundNuGetRestoreBug
As of Visual Studio 2017 and this point in the commit history, this
workaround is no longer necessary.
2019-09-07 01:30:24 +03:00
<TestProjects Include="@(ProjectsToBuild)" Condition="%(ProjectsToBuild.AutomatedTests) != '' and %(ProjectsToBuild.Platform) != ARM and %(ProjectsToBuild.Platform) != ARM64">
2014-07-26 01:52:36 +04:00
<!-- Remap Win32 to x86 -->
<TestPlatform Condition="%(ProjectsToBuild.Platform) == Win32">x86</TestPlatform>
<TestPlatform Condition="%(ProjectsToBuild.Platform) != Win32">%(ProjectsToBuild.Platform)</TestPlatform>
<!-- Work out where the test binaries are located -->
2015-01-28 00:28:54 +03:00
<TestPath>bin\%(ProjectsToBuild.BinDir)%(TestProjects.TestPlatform)\%(ProjectsToBuild.Configuration)</TestPath>
2014-07-26 01:52:36 +04:00
<TestAppX Condition="%(ProjectsToBuild.Configuration) == Release">%(ProjectsToBuild.Filename)_1.0.0.0_%(ProjectsToBuild.Platform)</TestAppX>
<TestAppX Condition="%(ProjectsToBuild.Configuration) != Release">%(ProjectsToBuild.Filename)_1.0.0.0_%(ProjectsToBuild.Platform)_%(ProjectsToBuild.Configuration)</TestAppX>
<!-- Binaries can be either a .dll for desktop tests, or .appx for store app tests -->
<TestBinary Condition="%(ProjectsToBuild.AutomatedTests) == desktop">%(TestProjects.TestPath)\%(ProjectsToBuild.Filename)\%(ProjectsToBuild.Filename).dll</TestBinary>
<TestBinary Condition="%(ProjectsToBuild.AutomatedTests) == store">%(TestProjects.TestPath)\%(ProjectsToBuild.Filename)\AppPackages\%(TestProjects.TestAppX)_Test\%(TestProjects.TestAppX).appx</TestBinary>
<!-- Do we need the /Platform or /InIsolation arguments for this test project? -->
<TestArgs Condition="%(ProjectsToBuild.Platform) == x64">%(TestProjects.TestArgs) /Platform:x64</TestArgs>
<TestArgs Condition="%(ProjectsToBuild.Platform) == x64 or %(ProjectsToBuild.AutomatedTests) == store">%(TestProjects.TestArgs) /InIsolation</TestArgs>
</TestProjects>
</ItemGroup>
2014-07-18 03:32:19 +04:00
</Target>
2014-08-12 08:37:27 +04:00
2015-01-28 00:28:54 +03:00
2018-03-10 03:42:10 +03:00
<Target Name="ChooseConfigurationsToRestore">
<ItemGroup>
2020-06-12 23:50:52 +03:00
<ProjectToRestore Include="$(MSBuildThisFileDirectory)Microsoft.Graphics.Win2D.sln" />
2018-03-10 03:42:10 +03:00
<!-- Expand parameter properties into item groups, so we can batch over them -->
<BuildPlatform Include="$(BuildPlatforms)" />
<BuildConfiguration Include="$(BuildConfigurations)" />
<!-- Generate the cartesian product of all platforms * configurations that we are building -->
<ConfigToRestore Include="@(ProjectToRestore)">
<Configuration>%(BuildConfiguration.Identity)</Configuration>
</ConfigToRestore>
<NuGetRestore Include="@(ConfigToRestore)" Condition="%(BuildPlatform.Identity) != AnyCPU">
<Platform>%(BuildPlatform.Identity)</Platform>
</NuGetRestore>
2018-03-05 06:42:26 +03:00
<!-- Internal Microsoft builds can optionally consume the Windows SDK via NuGet -->
<NuGetRestore Include="build\pkges\packages.config" Condition="'$(UseNuGetSDK)' != ''" />
2018-03-10 03:42:10 +03:00
</ItemGroup>
</Target>
2015-03-13 23:30:43 +03:00
<Import Project="$(MsBuildThisFileDirectory)build\nuget-restore.targets" />
2014-07-18 03:32:19 +04:00
</Project>