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\obj\project.assets.json"/>
22 <CoreRootProjectLockJsonFiles Include="$(SourceDir)Common\test_dependencies\obj\project.assets.json"/>
26 <RefProjectLockJsonFiles Include="$(SourceDir)Common\targeting_pack_ref\obj\project.assets.json"/>
30 <ProductProjectLockJsonFiles Include="$(SourceDir)Common\build_against_pkg_dependencies\obj\project.assets.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 <!-- 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>
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)/*" />
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" />
84 <Target Name="CopyDependencyToRef"
85 Inputs="@(RefProjectLockJsonFiles)"
86 Outputs="$(RefDestination)\*.*">
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>
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" />
114 <Target Name="CopyDependencyToProduct"
115 Inputs="@(ProductProjectLockJsonFiles)"
116 Outputs="$(ProductDestination)\*.*">
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>
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" />
144 <Target Name="CopyCrossgenToProduct"
145 AfterTargets="CopyDependencyToProduct"
146 Outputs="$(ProductDestination)\crossgen.exe;$(CORE_OVERLAY)\crossgen.exe">
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" />