Use new value for TargetFramework as net5.0 instead of netcoreapp5.0 (#12486)

This commit is contained in:
Ilya 2020-04-27 20:40:09 +05:00 committed by GitHub
parent 16ec1cc32f
commit 1a7692fd1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 16 additions and 21 deletions

View file

@ -719,8 +719,8 @@ function New-PSOptions {
[ValidateSet("Debug", "Release", "CodeCoverage", '')]
[string]$Configuration,
[ValidateSet("netcoreapp5.0")]
[string]$Framework = "netcoreapp5.0",
[ValidateSet("net5.0")]
[string]$Framework = "net5.0",
# These are duplicated from Start-PSBuild
# We do not use ValidateScript since we want tab completion
@ -795,11 +795,6 @@ function New-PSOptions {
$Top = [IO.Path]::Combine($PSScriptRoot, "src", $PowerShellDir)
Write-Verbose "Top project directory is $Top"
if (-not $Framework) {
$Framework = "netcoreapp2.1"
Write-Verbose "Using framework '$Framework'"
}
$Executable = if ($Runtime -like 'fxdependent*') {
"pwsh.dll"
} elseif ($environment.IsLinux -or $environment.IsMacOS) {
@ -2306,7 +2301,7 @@ function Start-CrossGen {
throw "crossgen is not available for this platform"
}
$dotnetRuntimeVersion = $script:Options.Framework -replace 'netcoreapp'
$dotnetRuntimeVersion = $script:Options.Framework -replace 'net'
# Get the CrossGen.exe for the correct runtime with the latest version
$crossGenPath = Get-ChildItem $script:Environment.nugetPackagesRoot $crossGenExe -Recurse | `

View file

@ -2,7 +2,7 @@
<PropertyGroup>
<Description>Generates C# typed bindings for .resx files</Description>
<TargetFramework>netcoreapp5.0</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<AssemblyName>resgen</AssemblyName>
<OutputType>Exe</OutputType>
<TieredCompilation>true</TieredCompilation>

View file

@ -2,7 +2,7 @@
<PropertyGroup>
<Description>Generates CorePsTypeCatalog.cs given powershell.inc</Description>
<TargetFramework>netcoreapp5.0</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<AssemblyName>TypeCatalogGen</AssemblyName>
<OutputType>Exe</OutputType>
<TieredCompilation>true</TieredCompilation>

View file

@ -615,7 +615,7 @@ function Install-OpenCover
.Description
Invoke-OpenCover runs tests under OpenCover by executing tests on PowerShell located at $PowerShellExeDirectory.
.EXAMPLE
Invoke-OpenCover -TestPath $PWD/test/powershell -PowerShellExeDirectory $PWD/src/powershell-win-core/bin/CodeCoverage/netcoreapp1.0/win7-x64
Invoke-OpenCover -TestPath $PWD/test/powershell -PowerShellExeDirectory $PWD/src/powershell-win-core/bin/CodeCoverage/netcoreapp5.0/win7-x64
#>
function Invoke-OpenCover
{

View file

@ -131,14 +131,14 @@ function Start-PSPackage {
-not $Script:Options -or ## Start-PSBuild hasn't been executed yet
-not $PSModuleRestoreCorrect -or ## Last build didn't specify '-PSModuleRestore' correctly
$Script:Options.Configuration -ne $Configuration -or ## Last build was with configuration other than 'Release'
$Script:Options.Framework -ne "netcoreapp5.0" ## Last build wasn't for CoreCLR
$Script:Options.Framework -ne "net5.0" ## Last build wasn't for CoreCLR
} else {
-not $Script:Options -or ## Start-PSBuild hasn't been executed yet
-not $crossGenCorrect -or ## Last build didn't specify '-CrossGen' correctly
-not $PSModuleRestoreCorrect -or ## Last build didn't specify '-PSModuleRestore' correctly
$Script:Options.Runtime -ne $Runtime -or ## Last build wasn't for the required RID
$Script:Options.Configuration -ne $Configuration -or ## Last build was with configuration other than 'Release'
$Script:Options.Framework -ne "netcoreapp5.0" ## Last build wasn't for CoreCLR
$Script:Options.Framework -ne "net5.0" ## Last build wasn't for CoreCLR
}
# Make sure the most recent build satisfies the package requirement
@ -1991,7 +1991,7 @@ function New-ILNugetPackage
}
<#
Copy the generated reference assemblies to the 'ref/netcoreapp3.0' folder properly.
Copy the generated reference assemblies to the 'ref/netcoreapp5.0' folder properly.
This is a helper function used by 'New-ILNugetPackage'
#>
function CopyReferenceAssemblies
@ -2886,7 +2886,7 @@ function New-MSIPatch
# This example shows how to produce a Debug-x64 installer for development purposes.
cd $RootPathOfPowerShellRepo
Import-Module .\build.psm1; Import-Module .\tools\packaging\packaging.psm1
New-MSIPackage -Verbose -ProductCode (New-Guid) -ProductSourcePath '.\src\powershell-win-core\bin\Debug\netcoreapp3.0\win7-x64\publish' -ProductTargetArchitecture x64 -ProductVersion '1.2.3'
New-MSIPackage -Verbose -ProductCode (New-Guid) -ProductSourcePath '.\src\powershell-win-core\bin\Debug\netcoreapp5.0\win7-x64\publish' -ProductTargetArchitecture x64 -ProductVersion '1.2.3'
#>
function New-MSIPackage
{
@ -3088,7 +3088,7 @@ function New-MSIPackage
# This example shows how to produce a Debug-x64 installer for development purposes.
cd $RootPathOfPowerShellRepo
Import-Module .\build.psm1; Import-Module .\tools\packaging\packaging.psm1
New-MSIXPackage -Verbose -ProductSourcePath '.\src\powershell-win-core\bin\Debug\netcoreapp3.0\win7-x64\publish' -ProductTargetArchitecture x64 -ProductVersion '1.2.3'
New-MSIXPackage -Verbose -ProductSourcePath '.\src\powershell-win-core\bin\Debug\netcoreapp5.0\win7-x64\publish' -ProductTargetArchitecture x64 -ProductVersion '1.2.3'
#>
function New-MSIXPackage
{

View file

@ -142,7 +142,7 @@ open {0}
<files include="**/*" buildAction="None" copyToOutput="true" flatten="false" />
</contentFiles>
<dependencies>
<group targetFramework=".netcoreapp3.1"></group>
<group targetFramework="net5.0"></group>
</dependencies>
</metadata>
</package>

View file

@ -11,6 +11,6 @@
<NuspecProperties>runtime=$(RID);version=$(SemVer);PackageName=$(PackageName)</NuspecProperties>
<NuspecBasePath>$(StagingPath)</NuspecBasePath>
<IsTool>True</IsTool>
<TargetFramework>netcoreapp5.0</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
</Project>

View file

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp5.0</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<Version>$(RefAsmVersion)</Version>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>$(SnkFile)</AssemblyOriginatorKeyFile>

View file

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp5.0</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<Version>$(RefAsmVersion)</Version>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>$(SnkFile)</AssemblyOriginatorKeyFile>

View file

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp5.0</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<Version>$(RefAsmVersion)</Version>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>$(SnkFile)</AssemblyOriginatorKeyFile>