Skip to content

Commit b843687

Browse files
committed
Pick up new CoreFX packages and abandon old ones
Commit migrated from dotnet/coreclr@5fc26e3
1 parent d73ef33 commit b843687

File tree

4,258 files changed

+997
-16101
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,258 files changed

+997
-16101
lines changed
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
***********************************************************************************************
4+
depProj.targets
5+
6+
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
7+
created a backup copy. Incorrect changes to this file will make it
8+
impossible to load or build your projects from the command-line or the IDE.
9+
10+
This file defines the steps in the standard build process specific for NuGet deployment
11+
projects. The remainder of the build process is defined in Microsoft.Common.targets,
12+
which is imported by this file.
13+
14+
Licensed to the .NET Foundation under one or more agreements.
15+
The .NET Foundation licenses this file to you under the MIT license.
16+
See the LICENSE file in the project root for more information.
17+
***********************************************************************************************
18+
-->
19+
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
20+
21+
<!-- Deployment project
22+
Restores NuGet dependencies and copies them to the output directory.
23+
24+
NuGetTargetMoniker - determined by the TargetFramework* and TargetPlatform*
25+
properties of the project, can be overidden.
26+
NuGetRuntimeIdentifier - defaults to <empty> (""), can be overidden.
27+
NuGetDeploySourceItem - defaults to ReferenceCopyLocalPaths, can be overidden to
28+
specify Reference (for compile assets) or Analyzer(for
29+
analyzer assets)
30+
31+
For the appropriate behavior of P2P references the project should set the
32+
TargetName and TargetExt to match one of the files that will be copied
33+
from the packages.
34+
-->
35+
36+
<PropertyGroup>
37+
<NuGetDeploySourceItem Condition="'$(NuGetDeploySourceItem)' == ''">ReferenceCopyLocalPaths</NuGetDeploySourceItem>
38+
39+
<!-- suppress the attempt to copy build output. -->
40+
<CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
41+
42+
<!-- Unless overridden, use no runtime identifier. This is transformed in packageresolve.targets.
43+
We specify "None" here to avoid being assigned the default runtime for projects which set CopyNuGetImplementations=true. -->
44+
<NuGetRuntimeIdentifier Condition="'$(NuGetRuntimeIdentifier)' == ''">None</NuGetRuntimeIdentifier>
45+
46+
<!-- make sure we tell nuget targets to copy, even if output type would not by default -->
47+
<CopyNuGetImplementations>true</CopyNuGetImplementations>
48+
49+
<!-- by default there shouldn't be any assets in depproj files that require signing -->
50+
<SkipSigning Condition="'$(SkipSigning)' == ''">true</SkipSigning>
51+
</PropertyGroup>
52+
53+
<Target Name="CoreCompile">
54+
55+
<Error Condition="'$(NuGetDeploySourceItem)' != 'ReferenceCopyLocalPaths' AND
56+
'$(NuGetDeploySourceItem)' != 'Reference' AND
57+
'$(NuGetDeploySourceItem)' != 'Analyzer'"
58+
Text="Unexpected value for NuGetDeploySourceItem:'$(NuGetDeploySourceItem)'. Expected ReferenceCopyLocalPaths, Reference, or Analyzer." />
59+
60+
<ItemGroup>
61+
<!-- Don't set IntermediateAssembly since this is not produced -->
62+
<IntermediateAssembly Remove="@(IntermediateAssembly)" />
63+
64+
<NuGetDeploy Include="@($(NuGetDeploySourceItem))"/>
65+
66+
<!-- filter to only items that came from packages -->
67+
<!-- the following condition must be applied after the include because msbuild doesn't seem
68+
to support property-defined-item-names in a metadata statement -->
69+
<NuGetDeploy Remove="@(NuGetDeploy)" Condition="'%(NuGetDeploy.NuGetPackageId)' == ''" />
70+
71+
<!-- remove all existing items from NuGet packages we'll be defining these in our own item -->
72+
<ReferenceCopyLocalPaths Remove="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.NuGetPackageId)' != ''"/>
73+
<Reference Remove="@(Reference)" Condition="'%(Reference.NuGetPackageId)' != ''"/>
74+
<Analyzer Remove="@(Analyzer)" Condition="'%(Analyzer.NuGetPackageId)' != ''"/>
75+
76+
<!-- add items defined by NuGetDeployItem property to Content so that we get clean behavior -->
77+
<ContentWithTargetPath Include="@(NuGetDeploy)">
78+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
79+
<TargetPath>%(FileName)%(Extension)</TargetPath>
80+
</ContentWithTargetPath>
81+
</ItemGroup>
82+
83+
<Error Condition="'@(NuGetDeploy)' == ''" Text="Error no assets were resolved from NuGet packages." />
84+
<Message Importance="High" Text="%(FullPath) (%(NuGetPackageId).%(NuGetPackageVersion)) -&gt; @(NuGetDeploy->'$(TargetDir)%(FileName)%(Extension)')" />
85+
86+
<!-- Include marker files if an extension has been provided -->
87+
<!-- internal builds use this to distinguish files which have already been signed -->
88+
<Touch Condition="'$(DeployMarkerExtension)' != ''" Files="@(NuGetDeploy->'$(TargetDir)%(FileName)$(DeployMarkerExtension)')" AlwaysCreate="true">
89+
<Output TaskParameter="TouchedFiles" ItemName="FileWrites"/>
90+
</Touch>
91+
</Target>
92+
93+
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
94+
95+
<!-- Required by Common.Targets but not used for depproj -->
96+
<Target Name="CreateManifestResourceNames" />
97+
98+
<PropertyGroup>
99+
<!-- don't use TargetingPackReference, we do our own filtering -->
100+
<SkipFilterTargetingPackResolvedNugetPackages>true</SkipFilterTargetingPackResolvedNugetPackages>
101+
</PropertyGroup>
102+
103+
<!-- Support filtering to a subset of packages or files -->
104+
<Target Name="FilterNugetPackages"
105+
AfterTargets="ResolveNuGetPackages"
106+
Condition="'@(PackageToInclude)' != '' OR '@(PackageToExclude)' != '' OR '@(FileToInclude)' != '' OR '@(FileToExclude)' != ''">
107+
<ItemGroup>
108+
<_nuGetDeploy Include="@($(NuGetDeploySourceItem))"/>
109+
<_nuGetDeployByFileName Include="@(_nuGetDeploy->'%(FileName)')">
110+
<OriginalItemSpec>%(Identity)</OriginalItemSpec>
111+
</_nuGetDeployByFileName>
112+
113+
<_nuGetDeployByFileNameToRemove Include="@(_nuGetDeployByFileName)" Exclude="@(FileToInclude)" Condition="'@(FileToInclude)' != ''" />
114+
<_filteredNuGetDeployByFileName Include="@(_nuGetDeployByFileName)" Exclude="@(_nuGetDeployByFileNameToRemove);@(FileToExclude)" />
115+
116+
<_nuGetDeployByPackageId Include="@(_filteredNuGetDeployByFileName->'%(NuGetPackageId)')" />
117+
118+
<_nuGetDeployByPackageIdToRemove Include="@(_nuGetDeployByPackageId)" Exclude="@(PackageToInclude)" Condition="'@(PackageToInclude)' != ''" />
119+
<_filteredNuGetDeployByPackageId Include="@(_nuGetDeployByPackageId)" Exclude="@(_nuGetDeployByPackageIdToRemove);@(PackageToExclude)" />
120+
121+
<ReferenceCopyLocalPaths Condition="'$(NuGetDeploySourceItem)' == 'ReferenceCopyLocalPaths'" Remove="@(ReferenceCopyLocalPaths)" />
122+
<Reference Condition="'$(NuGetDeploySourceItem)' == 'Reference'" Remove="@(Reference)" />
123+
<Analyzer Condition="'$(NuGetDeploySourceItem)' == 'Analyzer'" Remove="@(Analyzer)" />
124+
</ItemGroup>
125+
126+
<CreateItem Include="@(_filteredNuGetDeployByPackageId->'%(OriginalItemSpec)')">
127+
<Output TaskParameter="Include" ItemName="$(NuGetDeploySourceItem)" />
128+
</CreateItem>
129+
</Target>
130+
131+
</Project>

src/coreclr/build-test.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ set __BuildLogRootName=Tests_XunitWrapper
317317
set __BuildLog=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.log
318318
set __BuildWrn=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.wrn
319319
set __BuildErr=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.err
320-
set __msbuildLog=/flp:Verbosity=diag;LogFile="%__BuildLog%"
320+
set __msbuildLog=/flp:Verbosity=normal;LogFile="%__BuildLog%"
321321
set __msbuildWrn=/flp1:WarningsOnly;LogFile="%__BuildWrn%"
322322
set __msbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%"
323323

src/coreclr/run.cmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ if NOT [%ERRORLEVEL%]==[0] (
4848
exit /b 1
4949
)
5050

51+
:: Always copy over the Tools-Override
52+
xcopy %~dp0Tools-Override\* %~dp0Tools /y >nul
53+
5154
set _toolRuntime=%~dp0Tools
5255
set _dotnet=%_toolRuntime%\dotnetcli\dotnet.exe
5356

src/coreclr/run.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ working_tree_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
55
echo "Running init-tools.sh"
66
$working_tree_root/init-tools.sh
77

8+
# Always copy over the Tools-Override
9+
cp $__scriptpath/Tools-Override/* $__scriptpath/Tools > /dev/null
10+
811
toolRuntime=$working_tree_root/Tools
912
dotnet=$toolRuntime/dotnetcli/dotnet
1013

src/coreclr/tests/build.proj

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,16 @@
1515
<PropertyGroup>
1616
<TraversalBuildDependsOn>
1717
BatchRestorePackages;
18+
BuildTargetingPack;
1819
$(TraversalBuildDependsOn);
1920
</TraversalBuildDependsOn>
2021
</PropertyGroup>
21-
22+
23+
<Target Name="BuildTargetingPack" DependsOnTargets="BatchRestorePackages">
24+
<Message Text="Building Targeting Pack" Importance="High" />
25+
<MSBuild Projects="$(MSBuildThisFileDirectory)\src\Common\external\external.depproj" />
26+
</Target>
27+
2228
<Target Name="BatchRestorePackages" DependsOnTargets="VerifyDependencies">
2329
<Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Restoring all packages..." />
2430

src/coreclr/tests/dir.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@
5454
<OutputPath Condition="'$(OutputPath)' == ''">$(BaseIntermediateOutputPath)\$(BuildOS).$(BuildArch).$(BuildType)</OutputPath>
5555
</PropertyGroup>
5656

57+
<!-- Targeting Package paths -->
58+
<PropertyGroup>
59+
<TargetingPackPath Condition="'$(BaseTargetingPackPath)' == ''">$(RootBinDir)TargetingPack\</TargetingPackPath>
60+
</PropertyGroup>
61+
5762
<Import Condition="Exists('$(ToolsDir)BuildVersion.targets')" Project="$(ToolsDir)BuildVersion.targets" />
5863

5964
<!-- Provides properties for dependency versions and configures dependency verification/auto-upgrade. -->

src/coreclr/tests/publishdependency.targets

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
<UsingTask TaskName="PrereleaseResolveNuGetPackageAssets" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll"/>
55
<ItemGroup>
6-
<TestTargetFramework Include=".NETCoreApp,Version=v1.1">
7-
<Folder>netcoreapp1.1</Folder>
6+
<TestTargetFramework Include=".NETCoreApp,Version=v2.0">
7+
<Folder>netcoreapp2.0</Folder>
88
</TestTargetFramework>
99
</ItemGroup>
1010

@@ -75,6 +75,7 @@
7575
</AllResolvedRuntimeDependencies>
7676
<RunTimeDependecyCopyLocalFile Include="@(AllResolvedRuntimeDependencies)" Exclude="@(RunTimeDependecyExcludeFiles)"/>
7777
<RunTimeDependecyCopyLocal Include="@(RunTimeDependecyCopyLocalFile -> '%(File)')" />
78+
<RunTimeDependecyCopyLocal Include="$(TargetingPackPath)/*" />
7879
</ItemGroup>
7980

8081
<Copy

src/coreclr/tests/src/Common/build_against_pkg_dependencies/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"Microsoft.NETCore.TestHost": "2.0.0-beta-25113-01"
88
},
99
"frameworks": {
10-
"netcoreapp1.1": {
10+
"netcoreapp2.0": {
1111
"imports": [
1212
"dnxcore50",
1313
"portable-net45+win8"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<CLRTestKind>BuildOnly</CLRTestKind>
8+
<NugetTargetMoniker>.NETCoreApp,Version=v1.1</NugetTargetMoniker>
9+
</PropertyGroup>
10+
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
11+
<Target Name="Build"
12+
DependsOnTargets="ResolveReferences" />
13+
</Project>
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
3+
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
4+
<PropertyGroup>
5+
<!-- Given that xunit packages bring with them part of the framework, we need to specify a runtime in order to get the assets
6+
This RID value doesn't really matter, since the assets we are copying are not RID specific, so defaulting to Windows here
7+
-->
8+
<ProjectJson>$(MSBuildThisFileDirectory)project.json</ProjectJson>
9+
<ProjectLockJson>$(MSBuildThisFileDirectory)project.lock.json</ProjectLockJson>
10+
<Language>C#</Language>
11+
<NugetTargetMoniker>.NETCoreApp,Version=v1.1</NugetTargetMoniker>
12+
<NugetRuntimeIdentifier>win7-x64</NugetRuntimeIdentifier>
13+
<OutputPath>$(TargetingPackPath)</OutputPath>
14+
<XUnitRunnerPackageId Condition="'$(TargetGroup)' != 'netfx'">xunit.console.netcore</XUnitRunnerPackageId>
15+
<XUnitRunnerPackageId Condition="'$(TargetGroup)' == 'netfx'">xunit.runner.console</XUnitRunnerPackageId>
16+
<CLRTestKind>SharedLibrary</CLRTestKind>
17+
</PropertyGroup>
18+
<ItemGroup>
19+
<None Include="project.json" />
20+
</ItemGroup>
21+
<ItemGroup>
22+
<PackageToInclude Include="xunit.abstractions"/>
23+
<PackageToInclude Include="xunit.assert"/>
24+
<PackageToInclude Include="xunit.extensibility.core"/>
25+
<PackageToInclude Include="xunit.extensibility.execution"/>
26+
<PackageToInclude Include="xunit.runner.utility"/>
27+
<PackageToInclude Include="Microsoft.DotNet.xunit.performance"/>
28+
<PackageToInclude Include="Microsoft.DotNet.xunit.performance.analysis"/>
29+
<PackageToInclude Include="Microsoft.DotNet.xunit.performance.runner.Windows"/>
30+
<PackageToInclude Include="Newtonsoft.Json"/>
31+
<PackageToInclude Include="Microsoft.CodeAnalysis.Analyzers"/>
32+
<PackageToInclude Include="Microsoft.CodeAnalysis.Common"/>
33+
<PackageToInclude Include="Microsoft.CodeAnalysis.Compilers"/>
34+
<PackageToInclude Include="Microsoft.CodeAnalysis.CSharp"/>
35+
<PackageToInclude Include="Microsoft.CodeAnalysis.VisualBasic"/>
36+
<PackageToInclude Include="$(XUnitRunnerPackageId)" />
37+
</ItemGroup>
38+
39+
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
40+
41+
<Target Name="AddXunitConsoleRunner" BeforeTargets="ResolveReferences" Condition="'$(TargetGroup)' == 'netfx'">
42+
<Error Condition="!Exists('$(PackagesDir)$(XUnitRunnerPackageId)\$(XUnitPackageVersion)\tools\xunit.console.exe')"
43+
Text="Error: looks the package $(PackagesDir)$(XUnitRunnerPackageId)\$(XUnitPackageVersion) not restored or missing xunit.console.exe."
44+
/>
45+
<ItemGroup>
46+
<ReferenceCopyLocalPaths
47+
Include="$(PackagesDir)$(XUnitRunnerPackageId)\$(XUnitPackageVersion)\tools\*.*"
48+
Exclude="$(PackagesDir)$(XUnitRunnerPackageId)\$(XUnitPackageVersion)\tools\xunit.console.exe.config"
49+
>
50+
<Private>false</Private>
51+
<NuGetPackageId>$(XUnitRunnerPackageId)</NuGetPackageId>
52+
<NuGetPackageVersion>$(XUnitPackageVersion)</NuGetPackageVersion>
53+
</ReferenceCopyLocalPaths>
54+
</ItemGroup>
55+
</Target>
56+
</Project>

0 commit comments

Comments
 (0)