1 <?xml version="1.0" encoding="utf-8"?>
2 <Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
4 <UsingTask TaskName="PrereleaseResolveNuGetPackageAssets" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll"/>
6 <TestTargetFramework Include=".NETCoreApp,Version=v2.0">
7 <Folder>netcoreapp2.0</Folder>
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>
21 <CoreRootProjectLockJsonFiles Include="$(SourceDir)Common\test_runtime\project.lock.json"/>
22 <CoreRootProjectLockJsonFiles Include="$(SourceDir)Common\test_dependencies\project.lock.json"/>
26 <NonWindowsProjectLockJsonFiles Include="@(CoreRootProjectLockJsonFiles)"/>
27 <NonWindowsProjectLockJsonFiles Include="$(SourceDir)Common\build_against_pkg_dependencies\project.lock.json"/>
31 <RefProjectLockJsonFiles Include="$(SourceDir)Common\targeting_pack_ref\project.lock.json"/>
35 <ProductProjectLockJsonFiles Include="$(SourceDir)Common\build_against_pkg_dependencies\project.lock.json"/>
39 <CrossGenFiles Include="..\packages\runtime.$(MinOSForArch)-$(PackagePlatform).Microsoft.NETCore.Runtime.CoreCLR\$(CoreClrPackageVersion)\tools\crossgen.exe"/>
43 <ProductDestination>$(ProjectDir)\..\bin\Product\$(BuildOS).$(BuildArch).$(BuildType)</ProductDestination>
44 <RefDestination>$(ProductDestination)\ref</RefDestination>
47 <Target Name="CopyDependecyToCoreRoot"
48 Inputs="@(CoreRootProjectLockJsonFiles)"
49 Outputs="$(CORE_ROOT)\*.*">
51 <MSBuild Projects="$(SourceDir)Common\test_runtime\test_runtime.csproj"/>
53 <MSBuild Projects="$(SourceDir)Common\test_dependencies\test_dependencies.csproj"/>
55 <!-- This will use the overridden PrereleaseResolveNuGetPackageAssets, which outputs copy local items
56 for the xunit wrapper projects -->
57 <PrereleaseResolveNuGetPackageAssets AllowFallbackOnTargetSelection="false"
58 IncludeFrameworkReferences="false"
59 NuGetPackagesDirectory="$(PackagesDir)"
60 RuntimeIdentifier="$(TestNugetRuntimeId)"
61 ProjectLanguage="$(Language)"
62 ProjectLockFile="%(CoreRootProjectLockJsonFiles.Identity)"
63 TargetMonikers="@(TestTargetFramework)">
64 <Output TaskParameter="ResolvedAnalyzers" ItemName="Analyzer" />
65 <Output TaskParameter="ResolvedReferences" ItemName="Reference" />
66 <Output TaskParameter="ResolvedCopyLocalItems" ItemName="RunTimeCopyLocal" />
67 </PrereleaseResolveNuGetPackageAssets>
69 <RunTimeDependecyExclude Include="$(CORE_ROOT)\**\*.*" />
70 <RunTimeDependecyExcludeFiles Include="@(RunTimeDependecyExclude -> '%(FileName)%(Extension)')" />
71 <RunTimeDependecyExcludeFiles Include="@(RunTimeDependecyExclude -> '%(FileName).ni%(Extension)')" />
72 <RunTimeDependecyExcludeFiles Include="@(RunTimeDependecyExclude -> '%(FileName).pdb')" />
73 <AllResolvedRuntimeDependencies Include="@(RunTimeCopyLocal -> '%(FileName)%(Extension)')">
74 <File>%(Identity)</File>
75 </AllResolvedRuntimeDependencies>
76 <RunTimeDependecyCopyLocalFile Include="@(AllResolvedRuntimeDependencies)" Exclude="@(RunTimeDependecyExcludeFiles)"/>
77 <RunTimeDependecyCopyLocal Include="@(RunTimeDependecyCopyLocalFile -> '%(File)')" />
78 <RunTimeDependecyCopyLocal Include="$(TargetingPackPath)/*" />
82 SourceFiles="@(RunTimeDependecyCopyLocal)"
83 DestinationFolder="$(CORE_ROOT)"
84 SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
85 OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
86 Retries="$(CopyRetryCount)"
87 RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
88 UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)">
89 <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
93 <Target Name="CopyNonWindowsDependecyToCoreRoot"
94 Inputs="@(NonWindowsProjectLockJsonFiles)"
95 Outputs="$(CORE_OVERLAY)\*.*">
97 <MSBuild Projects="$(SourceDir)Common\test_runtime\test_runtime.csproj"/>
99 <MSBuild Projects="$(SourceDir)Common\test_dependencies\test_dependencies.csproj"/>
101 <MSBuild Projects="$(SourceDir)Common\build_against_pkg_dependencies\build_against_pkg_dependencies.csproj"/>
103 <!-- This will use the overridden PrereleaseResolveNuGetPackageAssets, which outputs copy local items
104 for the xunit wrapper projects -->
105 <PrereleaseResolveNuGetPackageAssets AllowFallbackOnTargetSelection="true"
106 IncludeFrameworkReferences="false"
107 NuGetPackagesDirectory="$(PackagesDir)"
108 RuntimeIdentifier="$(RuntimeId)"
109 ProjectLanguage="$(Language)"
110 ProjectLockFile="%(NonWindowsProjectLockJsonFiles.Identity)"
111 TargetMonikers="@(TestTargetFramework)">
112 <Output TaskParameter="ResolvedAnalyzers" ItemName="Analyzer" />
113 <Output TaskParameter="ResolvedReferences" ItemName="Reference" />
114 <Output TaskParameter="ResolvedCopyLocalItems" ItemName="RunTimeCopyLocal" />
115 </PrereleaseResolveNuGetPackageAssets>
117 <RunTimeDependecyExclude Include="$(CORE_OVERLAY)\**\*.*" />
118 <RunTimeDependecyExcludeFiles Include="@(RunTimeDependecyExclude -> '%(FileName)%(Extension)')" />
119 <RunTimeDependecyExcludeFiles Include="@(RunTimeDependecyExclude -> '%(FileName).ni%(Extension)')" />
120 <RunTimeDependecyExcludeFiles Include="@(RunTimeDependecyExclude -> '%(FileName).pdb')" />
121 <AllResolvedRuntimeDependencies Include="@(RunTimeCopyLocal -> '%(FileName)%(Extension)')">
122 <File>%(Identity)</File>
123 </AllResolvedRuntimeDependencies>
124 <RunTimeDependecyCopyLocalFile Include="@(AllResolvedRuntimeDependencies)" Exclude="@(RunTimeDependecyExcludeFiles)"/>
125 <RunTimeDependecyCopyLocal Include="@(RunTimeDependecyCopyLocalFile -> '%(File)')" />
126 <RunTimeDependecyCopyLocal Include="$(TargetingPackPath)/*" />
130 SourceFiles="@(RunTimeDependecyCopyLocal)"
131 DestinationFolder="$(CORE_OVERLAY)"
132 SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
133 OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
134 Retries="$(CopyRetryCount)"
135 RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
136 UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)">
137 <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
141 <NonWindowsCrossGenFiles Include="..\packages\runtime.$(RuntimeID).Microsoft.NETCore.Runtime.CoreCLR\$(CoreClrPackageVersion)\tools\crossgen"/>
145 SourceFiles="@(NonWindowsCrossGenFiles)"
146 DestinationFolder="$(CORE_OVERLAY)"
147 SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
148 OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
149 Retries="$(CopyRetryCount)"
150 RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
151 UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)">
152 <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
157 <Target Name="CopyDependencyToRef"
158 Inputs="@(RefProjectLockJsonFiles)"
159 Outputs="$(RefDestination)\*.*">
161 <MSBuild Projects="$(SourceDir)Common\targeting_pack_ref\targeting_pack_ref.csproj"/>
163 <!-- This will use the overridden PrereleaseResolveNuGetPackageAssets, which outputs copy local items
164 for the xunit wrapper projects -->
165 <PrereleaseResolveNuGetPackageAssets AllowFallbackOnTargetSelection="true"
166 IncludeFrameworkReferences="false"
167 NuGetPackagesDirectory="$(PackagesDir)"
168 RuntimeIdentifier="$(TestNugetRuntimeId)"
169 ProjectLanguage="$(Language)"
170 ProjectLockFile="%(RefProjectLockJsonFiles.Identity)"
171 TargetMonikers="@(TestTargetFramework)">
172 <Output TaskParameter="ResolvedAnalyzers" ItemName="RefAnalyzer" />
173 <Output TaskParameter="ResolvedReferences" ItemName="RefReference" />
174 <Output TaskParameter="ResolvedCopyLocalItems" ItemName="RefRunTimeCopyLocal" />
175 </PrereleaseResolveNuGetPackageAssets>
178 SourceFiles="@(RefRunTimeCopyLocal)"
179 DestinationFolder="$(RefDestination)"
180 SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
181 OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
182 Retries="$(CopyRetryCount)"
183 RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
184 UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)">
185 <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
189 <Target Name="CopyDependencyToProduct"
190 Inputs="@(ProductProjectLockJsonFiles)"
191 Outputs="$(ProductDestination)\*.*">
193 <MSBuild Projects="$(SourceDir)Common\build_against_pkg_dependencies\build_against_pkg_dependencies.csproj"/>
195 <!-- This will use the overridden PrereleaseResolveNuGetPackageAssets, which outputs copy local items
196 for the xunit wrapper projects -->
197 <PrereleaseResolveNuGetPackageAssets AllowFallbackOnTargetSelection="true"
198 IncludeFrameworkReferences="false"
199 NuGetPackagesDirectory="$(PackagesDir)"
200 RuntimeIdentifier="$(TestNugetRuntimeId)"
201 ProjectLanguage="$(Language)"
202 ProjectLockFile="%(ProductProjectLockJsonFiles.Identity)"
203 TargetMonikers="@(TestTargetFramework)">
204 <Output TaskParameter="ResolvedAnalyzers" ItemName="RefAnalyzer" />
205 <Output TaskParameter="ResolvedReferences" ItemName="RefReference" />
206 <Output TaskParameter="ResolvedCopyLocalItems" ItemName="RefRunTimeCopyLocal" />
207 </PrereleaseResolveNuGetPackageAssets>
210 SourceFiles="@(RefRunTimeCopyLocal)"
211 DestinationFolder="$(ProductDestination)"
212 SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
213 OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
214 Retries="$(CopyRetryCount)"
215 RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
216 UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)">
217 <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
221 <Target Name="CopyCrossgenToProduct"
222 Outputs="$(ProductDestination)\crossgen.exe;$(CORE_OVERLAY)\crossgen.exe">
225 SourceFiles="@(CrossGenFiles)"
226 DestinationFolder="$(ProductDestination)"
227 SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
228 OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
229 Retries="$(CopyRetryCount)"
230 RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
231 UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)">
232 <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />