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 <RefProjectLockJsonFiles Include="$(SourceDir)Common\targeting_pack_ref\project.lock.json"/>
30 <ProductProjectLockJsonFiles Include="$(SourceDir)Common\build_against_pkg_dependencies\project.lock.json"/>
34 <CrossGenFiles Include="..\packages\runtime.$(TargetRid).Microsoft.NETCore.Runtime.CoreCLR\$(CoreClrPackageVersion)\tools\crossgen*"/>
38 <ProductDestination>$(ProjectDir)\..\bin\Product\$(BuildOS).$(BuildArch).$(BuildType)</ProductDestination>
39 <RefDestination>$(ProductDestination)\ref</RefDestination>
42 <Target Name="CopyDependecyToCoreRoot"
43 Inputs="@(CoreRootProjectLockJsonFiles)"
44 Outputs="$(CORE_ROOT)\*.*">
46 <MSBuild Projects="$(SourceDir)Common\test_runtime\test_runtime.csproj"/>
48 <MSBuild Projects="$(SourceDir)Common\test_dependencies\test_dependencies.csproj"/>
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>
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)/*" />
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" />
88 <Target Name="CopyDependencyToRef"
89 Inputs="@(RefProjectLockJsonFiles)"
90 Outputs="$(RefDestination)\*.*">
92 <MSBuild Projects="$(SourceDir)Common\targeting_pack_ref\targeting_pack_ref.csproj"/>
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>
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" />
120 <Target Name="CopyDependencyToProduct"
121 Inputs="@(ProductProjectLockJsonFiles)"
122 Outputs="$(ProductDestination)\*.*">
124 <MSBuild Projects="$(SourceDir)Common\build_against_pkg_dependencies\build_against_pkg_dependencies.csproj"/>
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>
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" />
152 <Target Name="CopyCrossgenToProduct"
153 AfterTargets="CopyDependencyToProduct"
154 Outputs="$(ProductDestination)\crossgen.exe;$(CORE_OVERLAY)\crossgen.exe">
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" />