Update SDK used to build jitutils to 2.1 RC (#18290)
[platform/upstream/coreclr.git] / tests / publishdependency.targets
index d537aec..e2c8706 100644 (file)
@@ -3,8 +3,8 @@
 
   <UsingTask TaskName="PrereleaseResolveNuGetPackageAssets" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll"/>
   <ItemGroup>
-    <TestTargetFramework Include=".NETCoreApp,Version=v2.0">
-      <Folder>netcoreapp2.0</Folder>
+    <TestTargetFramework Include=".NETCoreApp,Version=v2.1">
+      <Folder>netcoreapp2.1</Folder>
     </TestTargetFramework>
   </ItemGroup>
 
   </PropertyGroup>
 
   <ItemGroup>
-    <CoreRootProjectLockJsonFiles Include="$(SourceDir)Common\test_runtime\project.lock.json"/>
-    <CoreRootProjectLockJsonFiles Include="$(SourceDir)Common\test_dependencies\project.lock.json"/>
+    <CoreRootProjectLockJsonFiles Include="$(SourceDir)Common\test_runtime\obj\project.assets.json"/>
+    <CoreRootProjectLockJsonFiles Include="$(SourceDir)Common\test_dependencies\obj\project.assets.json"/>
   </ItemGroup>
 
   <ItemGroup>
-    <NonWindowsProjectLockJsonFiles Include="@(CoreRootProjectLockJsonFiles)"/>
-    <NonWindowsProjectLockJsonFiles Include="$(SourceDir)Common\build_against_pkg_dependencies\project.lock.json"/>
+    <RefProjectLockJsonFiles Include="$(SourceDir)Common\targeting_pack_ref\obj\project.assets.json"/>
   </ItemGroup>
 
   <ItemGroup>
-    <RefProjectLockJsonFiles Include="$(SourceDir)Common\targeting_pack_ref\project.lock.json"/>
+    <ProductProjectLockJsonFiles Include="$(SourceDir)Common\build_against_pkg_dependencies\obj\project.assets.json"/>
   </ItemGroup>
 
   <ItemGroup>
-    <ProductProjectLockJsonFiles Include="$(SourceDir)Common\build_against_pkg_dependencies\project.lock.json"/>
-  </ItemGroup>
-
-  <ItemGroup>
-    <CrossGenFiles Include="..\packages\runtime.$(MinOSForArch)-$(PackagePlatform).Microsoft.NETCore.Runtime.CoreCLR\$(CoreClrPackageVersion)\tools\crossgen.exe"/>
+    <CrossGenFiles Include="..\packages\runtime.$(TargetRid).Microsoft.NETCore.Runtime.CoreCLR\$(DesiredPackageVersionArg)\tools\crossgen*"/>
+    <VCRuntimeFiles Include="..\packages\vc-runtime\$(VCRuntimeVersion)\lib\netcoreapp1.1\*.dll"/>
   </ItemGroup>
 
   <PropertyGroup>
     Inputs="@(CoreRootProjectLockJsonFiles)"
     Outputs="$(CORE_ROOT)\*.*">
 
-    <MSBuild Projects="$(SourceDir)Common\test_runtime\test_runtime.csproj"/>
-
-    <MSBuild Projects="$(SourceDir)Common\test_dependencies\test_dependencies.csproj"/>
-
     <!-- This will use the overridden PrereleaseResolveNuGetPackageAssets, which outputs copy local items
          for the xunit wrapper projects -->
     <PrereleaseResolveNuGetPackageAssets AllowFallbackOnTargetSelection="false"
                                          IncludeFrameworkReferences="false"
                                          NuGetPackagesDirectory="$(PackagesDir)"
-                                         RuntimeIdentifier="$(TestNugetRuntimeId)"
+                                         RuntimeIdentifier="$(TargetRid)"
                                          ProjectLanguage="$(Language)"
                                          ProjectLockFile="%(CoreRootProjectLockJsonFiles.Identity)"
                                          TargetMonikers="@(TestTargetFramework)">
     </Copy>
   </Target>
 
-  <Target Name="CopyNonWindowsDependecyToCoreRoot"
-    Inputs="@(NonWindowsProjectLockJsonFiles)"
-    Outputs="$(CORE_OVERLAY)\*.*">
-
-    <MSBuild Projects="$(SourceDir)Common\test_runtime\test_runtime.csproj"/>
-
-    <MSBuild Projects="$(SourceDir)Common\test_dependencies\test_dependencies.csproj"/>
-
-    <MSBuild Projects="$(SourceDir)Common\build_against_pkg_dependencies\build_against_pkg_dependencies.csproj"/>
-
-    <!-- This will use the overridden PrereleaseResolveNuGetPackageAssets, which outputs copy local items
-         for the xunit wrapper projects -->
-    <PrereleaseResolveNuGetPackageAssets AllowFallbackOnTargetSelection="true"
-                                         IncludeFrameworkReferences="false"
-                                         NuGetPackagesDirectory="$(PackagesDir)"
-                                         RuntimeIdentifier="$(RuntimeId)"
-                                         ProjectLanguage="$(Language)"
-                                         ProjectLockFile="%(NonWindowsProjectLockJsonFiles.Identity)"
-                                         TargetMonikers="@(TestTargetFramework)">
-      <Output TaskParameter="ResolvedAnalyzers" ItemName="Analyzer" />
-      <Output TaskParameter="ResolvedReferences" ItemName="Reference" />
-      <Output TaskParameter="ResolvedCopyLocalItems" ItemName="RunTimeCopyLocal" />
-    </PrereleaseResolveNuGetPackageAssets>
-    <ItemGroup>
-      <RunTimeDependecyExclude Include="$(CORE_OVERLAY)\**\*.*"  />
-      <RunTimeDependecyExcludeFiles Include="@(RunTimeDependecyExclude -> '%(FileName)%(Extension)')" />
-      <RunTimeDependecyExcludeFiles Include="@(RunTimeDependecyExclude -> '%(FileName).ni%(Extension)')" />
-      <RunTimeDependecyExcludeFiles Include="@(RunTimeDependecyExclude -> '%(FileName).pdb')" />
-      <AllResolvedRuntimeDependencies Include="@(RunTimeCopyLocal -> '%(FileName)%(Extension)')">
-        <File>%(Identity)</File>
-      </AllResolvedRuntimeDependencies>
-      <RunTimeDependecyCopyLocalFile Include="@(AllResolvedRuntimeDependencies)"  Exclude="@(RunTimeDependecyExcludeFiles)"/>
-      <RunTimeDependecyCopyLocal Include="@(RunTimeDependecyCopyLocalFile -> '%(File)')"  />
-    </ItemGroup>
-    
-    <Copy
-      SourceFiles="@(RunTimeDependecyCopyLocal)"
-      DestinationFolder="$(CORE_OVERLAY)"
-      SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
-      OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
-      Retries="$(CopyRetryCount)"
-      RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
-      UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)">
-      <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
-    </Copy>
-
-    <ItemGroup>
-      <NonWindowsCrossGenFiles Include="..\packages\runtime.$(RuntimeID).Microsoft.NETCore.Runtime.CoreCLR\$(CoreClrPackageVersion)\tools\crossgen"/>
-    </ItemGroup>
-
-    <Copy
-      SourceFiles="@(NonWindowsCrossGenFiles)"
-      DestinationFolder="$(CORE_OVERLAY)"
-      SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
-      OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
-      Retries="$(CopyRetryCount)"
-      RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
-      UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)">
-      <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
-    </Copy>
-
-  </Target>
-
   <Target Name="CopyDependencyToRef"
     Inputs="@(RefProjectLockJsonFiles)"
     Outputs="$(RefDestination)\*.*">
 
-    <MSBuild Projects="$(SourceDir)Common\targeting_pack_ref\targeting_pack_ref.csproj"/>
-
     <!-- This will use the overridden PrereleaseResolveNuGetPackageAssets, which outputs copy local items
          for the xunit wrapper projects -->
     <PrereleaseResolveNuGetPackageAssets AllowFallbackOnTargetSelection="true"
                                          IncludeFrameworkReferences="false"
                                          NuGetPackagesDirectory="$(PackagesDir)"
-                                         RuntimeIdentifier="$(TestNugetRuntimeId)"
+                                         RuntimeIdentifier="$(TargetRid)"
                                          ProjectLanguage="$(Language)"
                                          ProjectLockFile="%(RefProjectLockJsonFiles.Identity)"
                                          TargetMonikers="@(TestTargetFramework)">
     Inputs="@(ProductProjectLockJsonFiles)"
     Outputs="$(ProductDestination)\*.*">
 
-    <MSBuild Projects="$(SourceDir)Common\build_against_pkg_dependencies\build_against_pkg_dependencies.csproj"/>
-
     <!-- This will use the overridden PrereleaseResolveNuGetPackageAssets, which outputs copy local items
          for the xunit wrapper projects -->
     <PrereleaseResolveNuGetPackageAssets AllowFallbackOnTargetSelection="true"
                                          IncludeFrameworkReferences="false"
                                          NuGetPackagesDirectory="$(PackagesDir)"
-                                         RuntimeIdentifier="$(TestNugetRuntimeId)"
+                                         RuntimeIdentifier="$(TargetRid)"
                                          ProjectLanguage="$(Language)"
                                          ProjectLockFile="%(ProductProjectLockJsonFiles.Identity)"
                                          TargetMonikers="@(TestTargetFramework)">
   </Target>
 
   <Target Name="CopyCrossgenToProduct"
+    AfterTargets="CopyDependencyToProduct"
     Outputs="$(ProductDestination)\crossgen.exe;$(CORE_OVERLAY)\crossgen.exe">
 
     <Copy
 
   </Target>
 
+  <Target Name="CopyVCRuntimeToCoreRoot"
+    AfterTargets="CopyDependecyToCoreRoot"
+    Outputs="$(CORE_ROOT)\*.*"
+    Condition="'$(BuildArch)' == 'arm'">
+
+    <Copy
+      SourceFiles="@(VCRuntimeFiles)"
+      DestinationFolder="$(CORE_ROOT)"
+      SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
+      OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
+      Retries="$(CopyRetryCount)"
+      RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
+      UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)">
+      <Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
+    </Copy>
+
+  </Target>
+
 </Project>