Merge pull request #10662 from helloguo/VectorConversion
[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\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\$(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     <!-- This will use the overridden PrereleaseResolveNuGetPackageAssets, which outputs copy local items
47          for the xunit wrapper projects -->
48     <PrereleaseResolveNuGetPackageAssets AllowFallbackOnTargetSelection="false"
49                                          IncludeFrameworkReferences="false"
50                                          NuGetPackagesDirectory="$(PackagesDir)"
51                                          RuntimeIdentifier="$(TargetRid)"
52                                          ProjectLanguage="$(Language)"
53                                          ProjectLockFile="%(CoreRootProjectLockJsonFiles.Identity)"
54                                          TargetMonikers="@(TestTargetFramework)">
55       <Output TaskParameter="ResolvedAnalyzers" ItemName="Analyzer" />
56       <Output TaskParameter="ResolvedReferences" ItemName="Reference" />
57       <Output TaskParameter="ResolvedCopyLocalItems" ItemName="RunTimeCopyLocal" />
58     </PrereleaseResolveNuGetPackageAssets>
59     <ItemGroup>
60       <RunTimeDependecyExclude Include="$(CORE_ROOT)\**\*.*"  />
61       <RunTimeDependecyExcludeFiles Include="@(RunTimeDependecyExclude -> '%(FileName)%(Extension)')" />
62       <RunTimeDependecyExcludeFiles Include="@(RunTimeDependecyExclude -> '%(FileName).ni%(Extension)')" />
63       <RunTimeDependecyExcludeFiles Include="@(RunTimeDependecyExclude -> '%(FileName).pdb')" />
64       <AllResolvedRuntimeDependencies Include="@(RunTimeCopyLocal -> '%(FileName)%(Extension)')">
65         <File>%(Identity)</File>
66       </AllResolvedRuntimeDependencies>
67       <RunTimeDependecyCopyLocalFile Include="@(AllResolvedRuntimeDependencies)"  Exclude="@(RunTimeDependecyExcludeFiles)"/>
68       <RunTimeDependecyCopyLocal Include="@(RunTimeDependecyCopyLocalFile -> '%(File)')"  />
69       <RunTimeDependecyCopyLocal Include="$(TargetingPackPath)/*" />
70     </ItemGroup>
71     
72     <Copy
73       SourceFiles="@(RunTimeDependecyCopyLocal)"
74       DestinationFolder="$(CORE_ROOT)"
75       SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
76       OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
77       Retries="$(CopyRetryCount)"
78       RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
79       UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)">
80       <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
81     </Copy>
82   </Target>
83
84   <Target Name="CopyDependencyToRef"
85     Inputs="@(RefProjectLockJsonFiles)"
86     Outputs="$(RefDestination)\*.*">
87
88     <!-- This will use the overridden PrereleaseResolveNuGetPackageAssets, which outputs copy local items
89          for the xunit wrapper projects -->
90     <PrereleaseResolveNuGetPackageAssets AllowFallbackOnTargetSelection="true"
91                                          IncludeFrameworkReferences="false"
92                                          NuGetPackagesDirectory="$(PackagesDir)"
93                                          RuntimeIdentifier="$(TargetRid)"
94                                          ProjectLanguage="$(Language)"
95                                          ProjectLockFile="%(RefProjectLockJsonFiles.Identity)"
96                                          TargetMonikers="@(TestTargetFramework)">
97       <Output TaskParameter="ResolvedAnalyzers" ItemName="RefAnalyzer" />
98       <Output TaskParameter="ResolvedReferences" ItemName="RefReference" />
99       <Output TaskParameter="ResolvedCopyLocalItems" ItemName="RefRunTimeCopyLocal" />
100     </PrereleaseResolveNuGetPackageAssets>
101     
102     <Copy
103       SourceFiles="@(RefRunTimeCopyLocal)"
104       DestinationFolder="$(RefDestination)"
105       SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
106       OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
107       Retries="$(CopyRetryCount)"
108       RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
109       UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)">
110       <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
111     </Copy>
112   </Target>
113
114   <Target Name="CopyDependencyToProduct"
115     Inputs="@(ProductProjectLockJsonFiles)"
116     Outputs="$(ProductDestination)\*.*">
117
118     <!-- This will use the overridden PrereleaseResolveNuGetPackageAssets, which outputs copy local items
119          for the xunit wrapper projects -->
120     <PrereleaseResolveNuGetPackageAssets AllowFallbackOnTargetSelection="true"
121                                          IncludeFrameworkReferences="false"
122                                          NuGetPackagesDirectory="$(PackagesDir)"
123                                          RuntimeIdentifier="$(TargetRid)"
124                                          ProjectLanguage="$(Language)"
125                                          ProjectLockFile="%(ProductProjectLockJsonFiles.Identity)"
126                                          TargetMonikers="@(TestTargetFramework)">
127       <Output TaskParameter="ResolvedAnalyzers" ItemName="RefAnalyzer" />
128       <Output TaskParameter="ResolvedReferences" ItemName="RefReference" />
129       <Output TaskParameter="ResolvedCopyLocalItems" ItemName="RefRunTimeCopyLocal" />
130     </PrereleaseResolveNuGetPackageAssets>
131     
132     <Copy
133       SourceFiles="@(RefRunTimeCopyLocal)"
134       DestinationFolder="$(ProductDestination)"
135       SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
136       OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
137       Retries="$(CopyRetryCount)"
138       RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
139       UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)">
140       <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
141     </Copy>
142   </Target>
143
144   <Target Name="CopyCrossgenToProduct"
145     AfterTargets="CopyDependencyToProduct"
146     Outputs="$(ProductDestination)\crossgen.exe;$(CORE_OVERLAY)\crossgen.exe">
147
148     <Copy
149       SourceFiles="@(CrossGenFiles)"
150       DestinationFolder="$(ProductDestination)"
151       SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
152       OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
153       Retries="$(CopyRetryCount)"
154       RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
155       UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)">
156       <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
157     </Copy>
158
159   </Target>
160
161 </Project>