Merge pull request #11037 from jashook/arm64_test_update
[platform/upstream/coreclr.git] / tests / publishdependency.targets
1 <?xml version="1.0" encoding="utf-8"?>
2 <Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
4   <UsingTask TaskName="PrereleaseResolveNuGetPackageAssets" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll"/>
5   <ItemGroup>
6     <TestTargetFramework Include=".NETCoreApp,Version=v2.0">
7       <Folder>netcoreapp2.0</Folder>
8     </TestTargetFramework>
9   </ItemGroup>
10
11   <PropertyGroup>
12     <!-- defined in buildtools packaging.targets, but we need this before targets are imported -->
13     <PackagePlatform Condition="'$(PackagePlatform)' == ''">$(__BuildArch)</PackagePlatform>
14     <PackagePlatform Condition="'$(PackagePlatform)' == 'amd64'">x64</PackagePlatform>
15     <MinOSForArch>win7</MinOSForArch>
16     <MinOSForArch Condition="'$(PackagePlatform)' == 'arm'">win8</MinOSForArch>
17     <MinOSForArch Condition="'$(PackagePlatform)' == 'arm64'">win10</MinOSForArch>
18   </PropertyGroup>
19
20   <ItemGroup>
21     <CoreRootProjectLockJsonFiles Include="$(SourceDir)Common\test_runtime\project.lock.json"/>
22     <CoreRootProjectLockJsonFiles Include="$(SourceDir)Common\test_dependencies\project.lock.json"/>
23   </ItemGroup>
24
25   <ItemGroup>
26     <RefProjectLockJsonFiles Include="$(SourceDir)Common\targeting_pack_ref\project.lock.json"/>
27   </ItemGroup>
28
29   <ItemGroup>
30     <ProductProjectLockJsonFiles Include="$(SourceDir)Common\build_against_pkg_dependencies\project.lock.json"/>
31   </ItemGroup>
32
33   <ItemGroup>
34     <CrossGenFiles Include="..\packages\runtime.$(TargetRid).Microsoft.NETCore.Runtime.CoreCLR\$(CoreClrPackageVersion)\tools\crossgen*"/>
35   </ItemGroup>
36
37   <PropertyGroup>
38     <ProductDestination>$(ProjectDir)\..\bin\Product\$(BuildOS).$(BuildArch).$(BuildType)</ProductDestination>
39     <RefDestination>$(ProductDestination)\ref</RefDestination>
40   </PropertyGroup>
41
42   <Target Name="CopyDependecyToCoreRoot"
43     Inputs="@(CoreRootProjectLockJsonFiles)"
44     Outputs="$(CORE_ROOT)\*.*">
45
46     <MSBuild Projects="$(SourceDir)Common\test_runtime\test_runtime.csproj"/>
47
48     <MSBuild Projects="$(SourceDir)Common\test_dependencies\test_dependencies.csproj"/>
49
50     <!-- This will use the overridden PrereleaseResolveNuGetPackageAssets, which outputs copy local items
51          for the xunit wrapper projects -->
52     <PrereleaseResolveNuGetPackageAssets AllowFallbackOnTargetSelection="false"
53                                          IncludeFrameworkReferences="false"
54                                          NuGetPackagesDirectory="$(PackagesDir)"
55                                          RuntimeIdentifier="$(TargetRid)"
56                                          ProjectLanguage="$(Language)"
57                                          ProjectLockFile="%(CoreRootProjectLockJsonFiles.Identity)"
58                                          TargetMonikers="@(TestTargetFramework)">
59       <Output TaskParameter="ResolvedAnalyzers" ItemName="Analyzer" />
60       <Output TaskParameter="ResolvedReferences" ItemName="Reference" />
61       <Output TaskParameter="ResolvedCopyLocalItems" ItemName="RunTimeCopyLocal" />
62     </PrereleaseResolveNuGetPackageAssets>
63     <ItemGroup>
64       <RunTimeDependecyExclude Include="$(CORE_ROOT)\**\*.*"  />
65       <RunTimeDependecyExcludeFiles Include="@(RunTimeDependecyExclude -> '%(FileName)%(Extension)')" />
66       <RunTimeDependecyExcludeFiles Include="@(RunTimeDependecyExclude -> '%(FileName).ni%(Extension)')" />
67       <RunTimeDependecyExcludeFiles Include="@(RunTimeDependecyExclude -> '%(FileName).pdb')" />
68       <AllResolvedRuntimeDependencies Include="@(RunTimeCopyLocal -> '%(FileName)%(Extension)')">
69         <File>%(Identity)</File>
70       </AllResolvedRuntimeDependencies>
71       <RunTimeDependecyCopyLocalFile Include="@(AllResolvedRuntimeDependencies)"  Exclude="@(RunTimeDependecyExcludeFiles)"/>
72       <RunTimeDependecyCopyLocal Include="@(RunTimeDependecyCopyLocalFile -> '%(File)')"  />
73       <RunTimeDependecyCopyLocal Include="$(TargetingPackPath)/*" />
74     </ItemGroup>
75     
76     <Copy
77       SourceFiles="@(RunTimeDependecyCopyLocal)"
78       DestinationFolder="$(CORE_ROOT)"
79       SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
80       OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
81       Retries="$(CopyRetryCount)"
82       RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
83       UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)">
84       <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
85     </Copy>
86   </Target>
87
88   <Target Name="CopyDependencyToRef"
89     Inputs="@(RefProjectLockJsonFiles)"
90     Outputs="$(RefDestination)\*.*">
91
92     <MSBuild Projects="$(SourceDir)Common\targeting_pack_ref\targeting_pack_ref.csproj"/>
93
94     <!-- This will use the overridden PrereleaseResolveNuGetPackageAssets, which outputs copy local items
95          for the xunit wrapper projects -->
96     <PrereleaseResolveNuGetPackageAssets AllowFallbackOnTargetSelection="true"
97                                          IncludeFrameworkReferences="false"
98                                          NuGetPackagesDirectory="$(PackagesDir)"
99                                          RuntimeIdentifier="$(TargetRid)"
100                                          ProjectLanguage="$(Language)"
101                                          ProjectLockFile="%(RefProjectLockJsonFiles.Identity)"
102                                          TargetMonikers="@(TestTargetFramework)">
103       <Output TaskParameter="ResolvedAnalyzers" ItemName="RefAnalyzer" />
104       <Output TaskParameter="ResolvedReferences" ItemName="RefReference" />
105       <Output TaskParameter="ResolvedCopyLocalItems" ItemName="RefRunTimeCopyLocal" />
106     </PrereleaseResolveNuGetPackageAssets>
107     
108     <Copy
109       SourceFiles="@(RefRunTimeCopyLocal)"
110       DestinationFolder="$(RefDestination)"
111       SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
112       OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
113       Retries="$(CopyRetryCount)"
114       RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
115       UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)">
116       <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
117     </Copy>
118   </Target>
119
120   <Target Name="CopyDependencyToProduct"
121     Inputs="@(ProductProjectLockJsonFiles)"
122     Outputs="$(ProductDestination)\*.*">
123
124     <MSBuild Projects="$(SourceDir)Common\build_against_pkg_dependencies\build_against_pkg_dependencies.csproj"/>
125
126     <!-- This will use the overridden PrereleaseResolveNuGetPackageAssets, which outputs copy local items
127          for the xunit wrapper projects -->
128     <PrereleaseResolveNuGetPackageAssets AllowFallbackOnTargetSelection="true"
129                                          IncludeFrameworkReferences="false"
130                                          NuGetPackagesDirectory="$(PackagesDir)"
131                                          RuntimeIdentifier="$(TargetRid)"
132                                          ProjectLanguage="$(Language)"
133                                          ProjectLockFile="%(ProductProjectLockJsonFiles.Identity)"
134                                          TargetMonikers="@(TestTargetFramework)">
135       <Output TaskParameter="ResolvedAnalyzers" ItemName="RefAnalyzer" />
136       <Output TaskParameter="ResolvedReferences" ItemName="RefReference" />
137       <Output TaskParameter="ResolvedCopyLocalItems" ItemName="RefRunTimeCopyLocal" />
138     </PrereleaseResolveNuGetPackageAssets>
139     
140     <Copy
141       SourceFiles="@(RefRunTimeCopyLocal)"
142       DestinationFolder="$(ProductDestination)"
143       SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
144       OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
145       Retries="$(CopyRetryCount)"
146       RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
147       UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)">
148       <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
149     </Copy>
150   </Target>
151
152   <Target Name="CopyCrossgenToProduct"
153     AfterTargets="CopyDependencyToProduct"
154     Outputs="$(ProductDestination)\crossgen.exe;$(CORE_OVERLAY)\crossgen.exe">
155
156     <Copy
157       SourceFiles="@(CrossGenFiles)"
158       DestinationFolder="$(ProductDestination)"
159       SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
160       OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
161       Retries="$(CopyRetryCount)"
162       RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
163       UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)">
164       <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
165     </Copy>
166
167   </Target>
168
169 </Project>