Update PgoData to release-20180530-0051 (#18194)
[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.1">
7       <Folder>netcoreapp2.1</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\obj\project.assets.json"/>
22     <CoreRootProjectLockJsonFiles Include="$(SourceDir)Common\test_dependencies\obj\project.assets.json"/>
23   </ItemGroup>
24
25   <ItemGroup>
26     <RefProjectLockJsonFiles Include="$(SourceDir)Common\targeting_pack_ref\obj\project.assets.json"/>
27   </ItemGroup>
28
29   <ItemGroup>
30     <ProductProjectLockJsonFiles Include="$(SourceDir)Common\build_against_pkg_dependencies\obj\project.assets.json"/>
31   </ItemGroup>
32
33   <ItemGroup>
34     <CrossGenFiles Include="..\packages\runtime.$(TargetRid).Microsoft.NETCore.Runtime.CoreCLR\$(DesiredPackageVersionArg)\tools\crossgen*"/>
35     <VCRuntimeFiles Include="..\packages\vc-runtime\$(VCRuntimeVersion)\lib\netcoreapp1.1\*.dll"/>
36   </ItemGroup>
37
38   <PropertyGroup>
39     <ProductDestination>$(ProjectDir)\..\bin\Product\$(BuildOS).$(BuildArch).$(BuildType)</ProductDestination>
40     <RefDestination>$(ProductDestination)\ref</RefDestination>
41   </PropertyGroup>
42
43   <Target Name="CopyDependecyToCoreRoot"
44     Inputs="@(CoreRootProjectLockJsonFiles)"
45     Outputs="$(CORE_ROOT)\*.*">
46
47     <!-- This will use the overridden PrereleaseResolveNuGetPackageAssets, which outputs copy local items
48          for the xunit wrapper projects -->
49     <PrereleaseResolveNuGetPackageAssets AllowFallbackOnTargetSelection="false"
50                                          IncludeFrameworkReferences="false"
51                                          NuGetPackagesDirectory="$(PackagesDir)"
52                                          RuntimeIdentifier="$(TargetRid)"
53                                          ProjectLanguage="$(Language)"
54                                          ProjectLockFile="%(CoreRootProjectLockJsonFiles.Identity)"
55                                          TargetMonikers="@(TestTargetFramework)">
56       <Output TaskParameter="ResolvedAnalyzers" ItemName="Analyzer" />
57       <Output TaskParameter="ResolvedReferences" ItemName="Reference" />
58       <Output TaskParameter="ResolvedCopyLocalItems" ItemName="RunTimeCopyLocal" />
59     </PrereleaseResolveNuGetPackageAssets>
60     <ItemGroup>
61       <RunTimeDependecyExclude Include="$(CORE_ROOT)\**\*.*"  />
62       <RunTimeDependecyExcludeFiles Include="@(RunTimeDependecyExclude -> '%(FileName)%(Extension)')" />
63       <RunTimeDependecyExcludeFiles Include="@(RunTimeDependecyExclude -> '%(FileName).ni%(Extension)')" />
64       <RunTimeDependecyExcludeFiles Include="@(RunTimeDependecyExclude -> '%(FileName).pdb')" />
65       <AllResolvedRuntimeDependencies Include="@(RunTimeCopyLocal -> '%(FileName)%(Extension)')">
66         <File>%(Identity)</File>
67       </AllResolvedRuntimeDependencies>
68       <RunTimeDependecyCopyLocalFile Include="@(AllResolvedRuntimeDependencies)"  Exclude="@(RunTimeDependecyExcludeFiles)"/>
69       <RunTimeDependecyCopyLocal Include="@(RunTimeDependecyCopyLocalFile -> '%(File)')"  />
70       <RunTimeDependecyCopyLocal Include="$(TargetingPackPath)/*" />
71     </ItemGroup>
72     
73     <Copy
74       SourceFiles="@(RunTimeDependecyCopyLocal)"
75       DestinationFolder="$(CORE_ROOT)"
76       SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
77       OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
78       Retries="$(CopyRetryCount)"
79       RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
80       UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)">
81       <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
82     </Copy>
83   </Target>
84
85   <Target Name="CopyDependencyToRef"
86     Inputs="@(RefProjectLockJsonFiles)"
87     Outputs="$(RefDestination)\*.*">
88
89     <!-- This will use the overridden PrereleaseResolveNuGetPackageAssets, which outputs copy local items
90          for the xunit wrapper projects -->
91     <PrereleaseResolveNuGetPackageAssets AllowFallbackOnTargetSelection="true"
92                                          IncludeFrameworkReferences="false"
93                                          NuGetPackagesDirectory="$(PackagesDir)"
94                                          RuntimeIdentifier="$(TargetRid)"
95                                          ProjectLanguage="$(Language)"
96                                          ProjectLockFile="%(RefProjectLockJsonFiles.Identity)"
97                                          TargetMonikers="@(TestTargetFramework)">
98       <Output TaskParameter="ResolvedAnalyzers" ItemName="RefAnalyzer" />
99       <Output TaskParameter="ResolvedReferences" ItemName="RefReference" />
100       <Output TaskParameter="ResolvedCopyLocalItems" ItemName="RefRunTimeCopyLocal" />
101     </PrereleaseResolveNuGetPackageAssets>
102     
103     <Copy
104       SourceFiles="@(RefRunTimeCopyLocal)"
105       DestinationFolder="$(RefDestination)"
106       SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
107       OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
108       Retries="$(CopyRetryCount)"
109       RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
110       UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)">
111       <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
112     </Copy>
113   </Target>
114
115   <Target Name="CopyDependencyToProduct"
116     Inputs="@(ProductProjectLockJsonFiles)"
117     Outputs="$(ProductDestination)\*.*">
118
119     <!-- This will use the overridden PrereleaseResolveNuGetPackageAssets, which outputs copy local items
120          for the xunit wrapper projects -->
121     <PrereleaseResolveNuGetPackageAssets AllowFallbackOnTargetSelection="true"
122                                          IncludeFrameworkReferences="false"
123                                          NuGetPackagesDirectory="$(PackagesDir)"
124                                          RuntimeIdentifier="$(TargetRid)"
125                                          ProjectLanguage="$(Language)"
126                                          ProjectLockFile="%(ProductProjectLockJsonFiles.Identity)"
127                                          TargetMonikers="@(TestTargetFramework)">
128       <Output TaskParameter="ResolvedAnalyzers" ItemName="RefAnalyzer" />
129       <Output TaskParameter="ResolvedReferences" ItemName="RefReference" />
130       <Output TaskParameter="ResolvedCopyLocalItems" ItemName="RefRunTimeCopyLocal" />
131     </PrereleaseResolveNuGetPackageAssets>
132     
133     <Copy
134       SourceFiles="@(RefRunTimeCopyLocal)"
135       DestinationFolder="$(ProductDestination)"
136       SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
137       OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
138       Retries="$(CopyRetryCount)"
139       RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
140       UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)">
141       <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
142     </Copy>
143   </Target>
144
145   <Target Name="CopyCrossgenToProduct"
146     AfterTargets="CopyDependencyToProduct"
147     Outputs="$(ProductDestination)\crossgen.exe;$(CORE_OVERLAY)\crossgen.exe">
148
149     <Copy
150       SourceFiles="@(CrossGenFiles)"
151       DestinationFolder="$(ProductDestination)"
152       SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
153       OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
154       Retries="$(CopyRetryCount)"
155       RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
156       UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)">
157       <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
158     </Copy>
159
160   </Target>
161
162   <Target Name="CopyVCRuntimeToCoreRoot"
163     AfterTargets="CopyDependecyToCoreRoot"
164     Outputs="$(CORE_ROOT)\*.*"
165     Condition="'$(BuildArch)' == 'arm'">
166
167     <Copy
168       SourceFiles="@(VCRuntimeFiles)"
169       DestinationFolder="$(CORE_ROOT)"
170       SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
171       OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
172       Retries="$(CopyRetryCount)"
173       RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
174       UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)">
175       <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
176     </Copy>
177
178   </Target>
179
180 </Project>