1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-10 18:11:04 +09:00

Upgrade global.json to 5.0-alpha1 SDK (#445)

* Upgrade global.json to 5.0-alpha1 SDK

* Introduce a NetCoreApp TFM

* Don't apply RuntimeFramework for depprojs

* Binplace framework refs for netcoreapp

* Update pkg testing for netcoreapp5.0 sdk
This commit is contained in:
Viktor Hofer 2019-12-05 18:23:07 +01:00 committed by GitHub
parent 7ea817f307
commit 6a991f211f
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 57 additions and 74 deletions

View file

@ -18,8 +18,6 @@
-->
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" Condition="'$(SkipImportArcadeSdkFromRoot)' != 'true'" />
<!-- Common paths -->
<!-- Set these properties early enough for libraries as they import the Arcade SDK not early enough. -->
<PropertyGroup Condition="'$(SkipImportArcadeSdkFromRoot)' == 'true'">
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
@ -28,6 +26,12 @@
<ArtifactsBinDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin'))</ArtifactsBinDir>
</PropertyGroup>
<!-- The NetCoreApp TFM to build and test against. -->
<PropertyGroup>
<NetCoreAppCurrentTargetFrameworkMoniker>.NETCoreApp,Version=v5.0</NetCoreAppCurrentTargetFrameworkMoniker>
<NetCoreAppCurrent>netcoreapp5.0</NetCoreAppCurrent>
</PropertyGroup>
<!--
Get ProjectToBuild and '<subset>ProjectToBuild' items. Using the items lets projects handle
$(Subset) automatically when creating project-to-project dependencies.

View file

@ -100,8 +100,8 @@
</TargetGroups>
<!-- netcoreapp is an alias for netcoreapp5.0 -->
<TargetGroups Include="netcoreapp">
<TargetFramework>netcoreapp5.0</TargetFramework>
<Imports>netcoreapp5.0</Imports>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<Imports>$(NetCoreAppCurrent)</Imports>
<CompatibleWith>netstandard2.1</CompatibleWith>
</TargetGroups>
<TargetGroups Include="net45">

View file

@ -36,7 +36,7 @@
At that point restore and conflict resolution already happened therefore setting the item here has no side effects.
-->
<Target Name="_SetRuntimeFrameworksForTestAssemblies"
Condition="'$(SelfContained)' != 'true'"
Condition="'$(SelfContained)' != 'true' and '$(MSBuildProjectExtension)' != '.depproj'"
BeforeTargets="GenerateBuildDependencyFile">
<ItemGroup>
<RuntimeFramework Include="Microsoft.NETCore.App" Version="$(ProductVersion)" />

View file

@ -5,7 +5,7 @@
"rollForward": "major"
},
"tools": {
"dotnet": "3.0.100"
"dotnet": "5.0.100-alpha1-015772"
},
"native-tools": {
"cmake": "3.14.2",

View file

@ -19,10 +19,10 @@
<Crossgen2RuntimeConfigContents>
{
"runtimeOptions": {
"tfm": "netcoreapp3.0",
"tfm": "netcoreapp5.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "5.0.0-alpha1.0"
"version": "5.0.100-alpha1-015772"
}
}
}

View file

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<OptimizationDataSupported Condition="'$(BuildOS)' == 'Windows_NT' And ('$(BuildArch)' == 'x64' Or '$(BuildArch)' == 'x86')">True</OptimizationDataSupported>
<OptimizationDataSupported Condition="'$(BuildOS)' == 'Linux' And '$(BuildArch)' == 'x64'">True</OptimizationDataSupported>

View file

@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>
</Project>

View file

@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>
</Project>

View file

@ -81,7 +81,7 @@ namespace ReadyToRun.SuperIlc
}
// This is not a reliable way of building the publish folder
string publishFolder = Path.Combine(appFolder, @"artifacts\Debug\netcoreapp3.0\publish");
string publishFolder = Path.Combine(appFolder, @"artifacts\Debug\netcoreapp5.0\publish");
if (!Directory.Exists(publishFolder))
{
nugetLog.WriteLine($"Could not find folder {publishFolder} containing the published app.");

View file

@ -3,7 +3,7 @@
<AssemblyName>ReadyToRun.SuperIlc</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<NoWarn>8002,NU1701</NoWarn>
<Platform>AnyCPU</Platform>
<OutputPath>$(BinDir)\ReadyToRun.SuperIlc</OutputPath>

View file

@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Library</OutputType>
<AssemblyName>ILCompiler.ReadyToRun</AssemblyName>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DefineConstants>READYTORUN;$(DefineConstants)</DefineConstants>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>

View file

@ -3,7 +3,7 @@
<AssemblyName>crossgen2</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<NoWarn>8002,NU1701</NoWarn>
<Platforms>x64;x86</Platforms>
<PlatformTargets Condition="'$(BuildArch)' != ''">$(BuildArch)</PlatformTargets>

View file

@ -7,7 +7,7 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<AssemblyKey>Open</AssemblyKey>
<IsDotNetFrameworkProductAssembly>true</IsDotNetFrameworkProductAssembly>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<CLSCompliant>false</CLSCompliant>
<NoWarn>8002,NU1701</NoWarn>
<RuntimeIdentifiers>win-x64;win-x86</RuntimeIdentifiers>

View file

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<RuntimeFrameworkVersion>$(MicrosoftNETCoreAppVersion)</RuntimeFrameworkVersion>
<UseAppHost>false</UseAppHost>
<CLRTestKind>BuildOnly</CLRTestKind>

View file

@ -6,7 +6,7 @@
and old-style projects should go in dir.common.props. -->
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<EnableDefaultItems>false</EnableDefaultItems>
<Platform>$(BuildArch)</Platform>

View file

@ -12,9 +12,9 @@
This RID value doesn't really matter, since the assets we are copying are not RID specific, so defaulting to Windows here
-->
<OutputPath>$(TargetingPackPath)</OutputPath>
<TargetFramework>netcoreapp3.0</TargetFramework>
<NuGetTargetMoniker>.NETCoreApp,Version=v3.0</NuGetTargetMoniker>
<NuGetTargetMonikerShort>netcoreapp3.0</NuGetTargetMonikerShort>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<NuGetTargetMoniker>$(NetCoreAppCurrentTargetFrameworkMoniker)</NuGetTargetMoniker>
<NuGetTargetMonikerShort>$(NetCoreAppCurrent)</NuGetTargetMonikerShort>
<RuntimeIdentifiers>win7-x86;win7-x64</RuntimeIdentifiers>
<XUnitRunnerTargetFramework>netcoreapp2.1</XUnitRunnerTargetFramework>
<CLRTestKind>SharedLibrary</CLRTestKind>

View file

@ -1,9 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project>
<ItemGroup>
<TestTargetFramework Include=".NETCoreApp,Version=v5.0">
<Folder>netcoreapp5.0</Folder>
<TestTargetFramework Include="$(NetCoreAppCurrentTargetFrameworkMoniker)">
<Folder>$(NetCoreAppCurrent)</Folder>
</TestTargetFramework>
</ItemGroup>
@ -34,5 +32,4 @@
Properties="Language=C#;RuntimeIdentifier=$(TargetRid)" />
</Target>
</Project>

View file

@ -7,11 +7,7 @@
<DefineConstants>$(DefineConstants);$([System.String]::Copy('$(BuildArch)').ToUpper())</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<GenerateRunScript>false</GenerateRunScript>
<!-- Tests build for netcoreapp3.0, but use the test_dependencies
assets file, which has netcoreapp5.0 assets. Therefore the
assets file for this project must have netcoreapp5.0 assets,
but the project needs to build for 3.0. -->
<TargetFramework Condition=" '$(SetTFMForRestore)' == 'true' ">netcoreapp5.0</TargetFramework>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<ProjectAssetsFile>$(SourceDir)Common\CoreCLRTestLibrary\obj\project.assets.json</ProjectAssetsFile>
</PropertyGroup>
<ItemGroup>

View file

@ -3,8 +3,8 @@
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ProjectAssetsFile>$(SourceDir)Common\Coreclr.TestWrapper\obj\project.assets.json</ProjectAssetsFile>
<NuGetTargetMoniker>.NETCoreApp,Version=v3.0</NuGetTargetMoniker>
<NuGetTargetMonikerShort>netcoreapp3.0</NuGetTargetMonikerShort>
<NuGetTargetMoniker>$(NetCoreAppCurrentTargetFrameworkMoniker)</NuGetTargetMoniker>
<NuGetTargetMonikerShort>$(NetCoreAppCurrent)</NuGetTargetMonikerShort>
</PropertyGroup>
<ItemGroup>

View file

@ -2,8 +2,7 @@
<PropertyGroup>
<CLRTestKind>BuildOnly</CLRTestKind>
<IsTestProject>false</IsTestProject>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework Condition="'$(SetTFMForRestore)'=='true'">netcoreapp5.0</TargetFramework>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<DisableRarCache>true</DisableRarCache>
<DisablePackageAssetsCache>true</DisablePackageAssetsCache>
<RuntimeIdentifiers>win-arm;win-arm64;win-x64;win-x86;$(TargetRid)</RuntimeIdentifiers>

View file

@ -2,8 +2,7 @@
<PropertyGroup>
<CLRTestKind>BuildOnly</CLRTestKind>
<IsTestProject>false</IsTestProject>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework Condition="'$(SetTFMForRestore)'=='true'">netcoreapp5.0</TargetFramework>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<RuntimeIdentifiers>win-arm;win-arm64;win-x64;win-x86;$(TargetRid)</RuntimeIdentifiers>
<AssetTargetFallback>$(AssetTargetFallback);dnxcore50;netcoreapp1.1;portable-net45+win8</AssetTargetFallback>
<NoWarn>$(NoWarn);NU1603</NoWarn>

View file

@ -142,7 +142,7 @@
<RestoreOutputPath>$(MSBuildProjectDirectory)\obj</RestoreOutputPath>
<!-- Specify the target framework of the common test dependency project.json. -->
<NuGetTargetMoniker>.NETCoreApp,Version=v5.0</NuGetTargetMoniker>
<NuGetTargetMonikerShort>netcoreapp5.0</NuGetTargetMonikerShort>
<NuGetTargetMoniker>$(NetCoreAppCurrentTargetFrameworkMoniker)</NuGetTargetMoniker>
<NuGetTargetMonikerShort>$(NetCoreAppCurrent)</NuGetTargetMonikerShort>
</PropertyGroup>
</Project>

View file

@ -235,7 +235,11 @@ namespace JitBench
public static string GetTargetFrameworkMonikerForFrameworkVersion(string runtimeVersion)
{
if (runtimeVersion.StartsWith("3.0"))
if (runtimeVersion.StartsWith("5.0"))
{
return "netcoreapp5.0";
}
else if (runtimeVersion.StartsWith("3.0"))
{
return "netcoreapp3.0";
}

View file

@ -33,7 +33,7 @@
deb-tool" commands, after depending on InitializeDotnetDebTool target.
-->
<DebToolBinDir>$(ArtifactsBinDir)dotnet-deb-tool\</DebToolBinDir>
<DebtoolAssemblyFile>$(DebToolBinDir)$(Configuration)\netcoreapp3.0\dotnet-deb-tool.dll</DebtoolAssemblyFile>
<DebtoolAssemblyFile>$(DebToolBinDir)$(Configuration)\$(NetCoreAppCurrent)\dotnet-deb-tool.dll</DebtoolAssemblyFile>
<DotnetDebToolSourceDir>$(RepoRoot)tools-local/dotnet-deb-tool/</DotnetDebToolSourceDir>
<IsDebianBasedDistro

View file

@ -9,7 +9,7 @@
<TestRestoreNuGetConfigFile>$(ArtifactsObjDir)TestNuGetConfig\NuGet.config</TestRestoreNuGetConfigFile>
<InternalNupkgCacheDir>$(ArtifactsObjDir)ExtraNupkgsForTestRestore\</InternalNupkgCacheDir>
<TestArchitectures>$(TargetArchitecture)</TestArchitectures>
<TestInfraTargetFramework>netcoreapp3.0</TestInfraTargetFramework>
<TestInfraTargetFramework>$(NetCoreAppCurrent)</TestInfraTargetFramework>
</PropertyGroup>
<PropertyGroup>

View file

@ -8,6 +8,6 @@
<NETCoreAppMaximumVersion>99.9</NETCoreAppMaximumVersion>
<PackageConflictPreferredPackages Condition="'$(TargetFramework)' != 'netcoreapp2.0'">Microsoft.Private.CoreFx.NETCoreApp;runtime.$(RuntimeIdentifiers).Microsoft.Private.CoreFx.NETCoreApp;$(PackageConflictPreferredPackages)</PackageConflictPreferredPackages>
<DisableImplicitFrameworkReferences Condition="$(TargetFramework.Contains('netcoreapp'))">true</DisableImplicitFrameworkReferences>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
</PropertyGroup>
</Project>

View file

@ -1,35 +1,8 @@
<Project>
<PropertyGroup>
<TargetFramework>netcoreapp5.0</TargetFramework>
<NETCoreAppMaximumVersion>5.0</NETCoreAppMaximumVersion>
<RuntimeFrameworkVersion>$(MicrosoftNETCoreAppVersion)</RuntimeFrameworkVersion>
<!-- This should be enabled once we have updating assembly versions in our targeting pack. -->
<ShouldVerifyClosure>false</ShouldVerifyClosure>
</PropertyGroup>
<ItemGroup>
<!-- Since we don't have an SDK that knows about 5.0 framework, we should specify it manually. -->
<KnownFrameworkReference Update="Microsoft.NETCore.App"
TargetFramework="$(TargetFramework)"
RuntimeFrameworkName="Microsoft.NETCore.App"
DefaultRuntimeFrameworkVersion="$(RuntimeFrameworkVersion)"
LatestRuntimeFrameworkVersion="$(RuntimeFrameworkVersion)"
TargetingPackName="Microsoft.NETCore.App.Ref"
TargetingPackVersion="$(RuntimeFrameworkVersion)"
RuntimePackNamePatterns="Microsoft.NETCore.App.Runtime.**RID**"
RuntimePackRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm;win-arm64;win-x64;win-x86"
PackagesToReference="Microsoft.NETCore.App/$(RuntimeFrameworkVersion)"
IsTrimmable="true"
/>
<KnownAppHostPack Update="Microsoft.NETCore.App"
TargetFramework="$(TargetFramework)"
AppHostPackNamePattern="Microsoft.NETCore.App.Host.**RID**"
AppHostPackVersion="$(RuntimeFrameworkVersion)"
AppHostRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm;win-arm64;win-x64;win-x86"
/>
<KnownFrameworkReference Remove="Microsoft.AspNetCore.App" />
<KnownFrameworkReference Remove="Microsoft.WindowsDesktop.App" />
<KnownFrameworkReference Remove="Microsoft.WindowsDesktop.App.WPF" />
<KnownFrameworkReference Remove="Microsoft.WindowsDesktop.App.WindowsForms" />
</ItemGroup>
</Project>

View file

@ -11,6 +11,17 @@
<PackageReference Update="Microsoft.NETCore.App" IsImplicitlyDefined="false" PrivateAssets="None" />
</ItemGroup>
<!-- Mark framework references from previous netcoreapp tfms >= 3.0 as copy-local. -->
<Target Name="_FrameworkReferencesToPrivate"
Condition="'$(TargetsNetCoreApp)' == 'true' and !$(TargetFramework.StartsWith('netcoreapp2.')) and '$(TargetFramework)' != '$(NetCoreAppCurrent)'"
AfterTargets="_HandlePackageFileConflicts">
<ItemGroup>
<_referencePrivate Include="@(Reference)" Private="true" />
<Reference Remove="@(Reference)" />
<Reference Include="@(_referencePrivate)" />
</ItemGroup>
</Target>
<ItemGroup>
<!-- for all configurations this project provides refs for that configuration -->
<BinPlaceConfiguration Include="$(Configuration)" RefPath="$(RefPath)" />

View file

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<AssemblyName>dotnet-deb-tool</AssemblyName>
<OutputType>Exe</OutputType>
</PropertyGroup>