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.1">
7 <Folder>netcoreapp2.1</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\$(DesiredPackageVersionArg)\tools\crossgen*"/>
35 <VCRuntimeFiles Include="..\packages\vc-runtime\$(VCRuntimeVersion)\lib\netcoreapp1.1\*.dll"/>
39 <ProductDestination>$(ProjectDir)\..\bin\Product\$(BuildOS).$(BuildArch).$(BuildType)</ProductDestination>
40 <RefDestination>$(ProductDestination)\ref</RefDestination>
43 <Target Name="CopyDependecyToCoreRoot"
44 Inputs="@(CoreRootProjectLockJsonFiles)"
45 Outputs="$(CORE_ROOT)\*.*">
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>
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)/*" />
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" />
85 <Target Name="CopyDependencyToRef"
86 Inputs="@(RefProjectLockJsonFiles)"
87 Outputs="$(RefDestination)\*.*">
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>
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" />
115 <Target Name="CopyDependencyToProduct"
116 Inputs="@(ProductProjectLockJsonFiles)"
117 Outputs="$(ProductDestination)\*.*">
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>
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" />
145 <Target Name="CopyCrossgenToProduct"
146 AfterTargets="CopyDependencyToProduct"
147 Outputs="$(ProductDestination)\crossgen.exe;$(CORE_OVERLAY)\crossgen.exe">
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" />
162 <Target Name="CopyVCRuntimeToCoreRoot"
163 AfterTargets="CopyDependecyToCoreRoot"
164 Outputs="$(CORE_ROOT)\*.*"
165 Condition="'$(BuildArch)' == 'arm'">
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" />