Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
b4687ad
try upgrade to 2.2preview2 of .net core
bergmeister Oct 6, 2018
56ba0a1
fix version number of sdk (needs to include build number)
bergmeister Oct 6, 2018
b961bc2
[feature] set runtimeversion and revert changes made to alpine docker…
bergmeister Oct 6, 2018
04f8a7d
[feature] Fix NuGet package version of WebListener.csproj test projec…
bergmeister Oct 6, 2018
3571629
[feature] Fix WiX file components due to newer versions of DLLS
bergmeister Oct 6, 2018
0a61826
trigger ci
bergmeister Oct 6, 2018
97a67be
The dotnet-xunit test runner does not work with .Net Core 2.2 and due…
bergmeister Oct 6, 2018
9c48a7a
I forgot that trx format ix VsTest, not NUnit
bergmeister Oct 6, 2018
91d1c82
[feature]
bergmeister Oct 6, 2018
17fab9b
[feature] Fix parameter name due to rename
bergmeister Oct 7, 2018
5750e86
[feature] revert to use xml test logger again
bergmeister Oct 7, 2018
b75514a
[feature] forgot some folder->file reverts
bergmeister Oct 7, 2018
e092441
[feature] Update Markdig.Signed NuGet package to 0.15.4 due to new re…
bergmeister Oct 7, 2018
699afb8
[feature] retrigger CI due to sporadic failure
bergmeister Oct 7, 2018
e8d76e2
Merge branch 'master' of https://github.com/PowerShell/PowerShell int…
bergmeister Oct 9, 2018
d4f2fa4
Merge branch 'master' of https://github.com/PowerShell/PowerShell int…
bergmeister Oct 10, 2018
7de084d
fix merge conflict error to have no diff again in the upstreamed xuni…
bergmeister Oct 10, 2018
533b0e0
Merge branch 'master' of https://github.com/PowerShell/PowerShell int…
bergmeister Oct 11, 2018
96feacf
Merge branch 'master' of https://github.com/PowerShell/PowerShell int…
bergmeister Oct 16, 2018
faa0d19
Merge branch 'master' of https://github.com/PowerShell/PowerShell int…
bergmeister Oct 22, 2018
fda3fb9
Update to .Net Core 2.2-preview3
bergmeister Oct 22, 2018
8a13d7c
[feature] udpate test project version and appveyor cache
bergmeister Oct 22, 2018
52de7b7
[feature] Fix MSI installer by updating to the new version of mscorda…
bergmeister Oct 22, 2018
580a5ca
Merge branch 'master' of https://github.com/PowerShell/PowerShell int…
bergmeister Nov 29, 2018
d6f499c
Upgrade to .Net Core 3.0.100-preview-009806 (latest master)
bergmeister Nov 29, 2018
0450437
fix runtime version
bergmeister Nov 29, 2018
ede5bc6
fix installer and ignore nupkg info files
bergmeister Nov 29, 2018
7d84226
[feature]
bergmeister Nov 29, 2018
f7e5127
update ResGen project to .Net Core 3.9 since 2.0 is deprecated and is…
bergmeister Nov 30, 2018
b50c906
[feature] upgrade typegen to .net core 3.0 as well and update comments
bergmeister Nov 30, 2018
9246511
[feature] fix comment
bergmeister Nov 30, 2018
4983457
[feature] use .net core 2.1 for web listener
bergmeister Nov 30, 2018
fb9ba05
Merge branch 'master' of https://github.com/PowerShell/PowerShell int…
bergmeister Dec 15, 2018
e15e5fd
update WebListener.csproj to use new netcore3.0 NuGet packages
bergmeister Dec 15, 2018
bbfc485
Merge branch 'master' of https://github.com/bergmeister/PowerShell in…
bergmeister Jan 8, 2019
ee0be76
[feature]
SteveL-MSFT Jan 10, 2019
79269e3
[feature]
SteveL-MSFT Jan 10, 2019
e9ef32e
[feature]
Jan 10, 2019
a07f965
[feature]
Jan 16, 2019
6fec9c9
[feature]
Jan 16, 2019
8f088a3
[feature]
Jan 17, 2019
f79e914
[feature] address Jeremy's feedback
Jan 18, 2019
0d3b15e
[feature] fix psversion test and test-connection test
Jan 18, 2019
88c3e08
[feature] fix get-process test
Jan 19, 2019
17333bb
[feature] update IsReservedDeviceName() method due to .Net Core 3.0 c…
Jan 19, 2019
d980071
Merge branch 'master' of https://github.com/PowerShell/PowerShell int…
bergmeister Jan 19, 2019
77fc8d9
Enable WinForms and WPF
bergmeister Jan 20, 2019
b9447f1
Move exclusion of '*.nupkg.metadata' to build.psm1 as agreed by @Stev…
bergmeister Jan 22, 2019
af9d212
[feature] Merge branch 'master' of https://github.com/PowerShell/Powe…
bergmeister Jan 22, 2019
ed34473
[feature] fix application manifest
Jan 23, 2019
145f274
[feature] remove selfsignedcert module from repo
Jan 23, 2019
479d0e0
[feature] Merge branch 'master' into netcore3.0
SteveL-MSFT Jan 23, 2019
9b18dd6
[feature] remove system.windows.forms from blacklist
Jan 23, 2019
80f0baa
[feature] fix Get-Process test due to fileversion change
Jan 23, 2019
5b2a5e1
[feature] revert change to resolve paths to long paths
Jan 24, 2019
9e956d4
[feature] fix symlink test where `target` member is an array and we n…
Jan 25, 2019
908a783
[feature] fix conversion test so longfilename is used
Jan 26, 2019
bb369d5
[feature] change longfile resolution to more optimal api
Jan 26, 2019
7484ece
Merge branch 'master' of https://github.com/PowerShell/PowerShell int…
bergmeister Jan 26, 2019
05fe754
[feature] Empty commit after pulling in upstream changes from master …
bergmeister Jan 26, 2019
8eda518
[feature] Fix first half of 'Get-Process for admin.Should support -Fi…
bergmeister Jan 27, 2019
49fe439
[feature] fix get-process test for fileversion check
Jan 29, 2019
ecac436
Merge branch 'master' into netcore3.0
SteveL-MSFT Jan 29, 2019
c4b8371
[feature] change get-process -fileversioninfo validation due to diffe…
Jan 29, 2019
b981137
[feature] reverse check of productversion to gitcommitid
Jan 29, 2019
d18a23a
[feature] disable overflow test as it takes too long; use optimal met…
Jan 29, 2019
584c132
[feature] Empty commit to retrigger CI
bergmeister Jan 29, 2019
621e710
[feature] update files.wxs
Jan 29, 2019
8f62ed8
[feature] move to .Net Core 3.0 preview 2
Jan 29, 2019
8013cc6
[feature] fix case where typegen has an empty string in the file
Jan 29, 2019
444bd46
Merge branch 'master' of https://github.com/PowerShell/PowerShell int…
bergmeister Feb 10, 2019
3528292
Merge branch 'master' of https://github.com/PowerShell/PowerShell int…
bergmeister Feb 20, 2019
0269ac2
Merge branch 'master' of https://github.com/PowerShell/PowerShell int…
Mar 21, 2019
8090588
Merge branch 'netcore30' into netcore3.0
SteveL-MSFT Apr 19, 2019
a27e92b
Merge pull request #8370 from bergmeister/netcore3.0
SteveL-MSFT Apr 19, 2019
ecb7e48
move to preview4
SteveL-MSFT Apr 19, 2019
bb26c80
add version 7.0.0
SteveL-MSFT Apr 19, 2019
025b2ec
Allow CI to run on branches with this name pattern: feature* (#9415)
daxian-dbw Apr 19, 2019
83cbfb3
fix typegen for getting ref assemblies to enable add-type
SteveL-MSFT Apr 19, 2019
6e1da59
Merge branch 'preview4' of github.com:SteveL-MSFT/PowerShell into pre…
SteveL-MSFT Apr 19, 2019
9230cf4
fix psversion test to expect 7
SteveL-MSFT Apr 19, 2019
702e8ae
update files.wxs due to .NET Core 3.0 dependency changes
SteveL-MSFT Apr 19, 2019
6a08185
set httpsys option to allow sync as aspnetcore3.0 requires it
SteveL-MSFT Apr 20, 2019
24f5899
make WindowsDesktop SDK conditional as it doesn't apply to win-arm no…
SteveL-MSFT Apr 20, 2019
c59613d
only use httpsys on Windows
SteveL-MSFT Apr 20, 2019
e9aa553
Merge pull request #9416 from SteveL-MSFT/preview4
SteveL-MSFT Apr 20, 2019
b05ef05
Fix WebListener for .NET Core 3.0
markekraus Apr 21, 2019
80cb309
Merge pull request #9427 from markekraus/feature/FixWebListener3.0
SteveL-MSFT Apr 21, 2019
3141a8b
fix symlink tests
SteveL-MSFT Apr 22, 2019
3fceabf
Merge pull request #9437 from SteveL-MSFT/symlink-tests
SteveL-MSFT Apr 22, 2019
01931dd
rename and update json tests for change in precision
SteveL-MSFT Apr 22, 2019
42b311e
Merge pull request #9440 from SteveL-MSFT/measureobject-test
SteveL-MSFT Apr 23, 2019
f15430e
fix tests where the cmdlet returns longpath
SteveL-MSFT Apr 23, 2019
c9be025
add Resolve-FilePath to module manifest
SteveL-MSFT Apr 23, 2019
c4031f1
Merge pull request #9447 from SteveL-MSFT/import-module
SteveL-MSFT Apr 23, 2019
2058154
Fix testdrive paths in requires and module tests
rjmholt Apr 24, 2019
722408f
[feature] Resolve CompatiblePSEditions test drive paths
rjmholt Apr 24, 2019
ec4fb6d
[feature] fix typo
rjmholt Apr 24, 2019
e3f3217
[feature] Fix typo
rjmholt Apr 24, 2019
a38ef6e
[feature] Fix module manifest tests
rjmholt Apr 24, 2019
fa98e15
Fix module cleanup
rjmholt Apr 24, 2019
21cf4fb
Merge pull request #9453 from rjmholt/fix-testdrive-paths
SteveL-MSFT Apr 24, 2019
61589cd
Merge master into NetCore30 (#9481)
TravisEz13 Apr 27, 2019
9d4c0a8
use FileInfo to resolve path on non-Windows as `$TestDrive` is actual…
SteveL-MSFT May 1, 2019
bff2411
Merge pull request #9504 from SteveL-MSFT/convert-path-test
SteveL-MSFT May 1, 2019
ebb20c0
if the module is already loaded, don't try to create it and load it a…
SteveL-MSFT May 1, 2019
476d27f
add comment
SteveL-MSFT May 1, 2019
bc32fc8
Update test/powershell/Modules/Microsoft.PowerShell.Core/Remove-Modul…
iSazonov May 1, 2019
1e1b0b3
Merge pull request #9506 from SteveL-MSFT/psmoduleinfo.accessmode
SteveL-MSFT May 1, 2019
4535f35
Update to Pester 4.8.0
SteveL-MSFT May 1, 2019
b108f93
Revert "Merge pull request #9453 from rjmholt/fix-testdrive-paths"
SteveL-MSFT May 1, 2019
d45a28c
revert workaround for Resolve-FilePath and use Pester 4.8.0
SteveL-MSFT May 1, 2019
10e2028
update Convert-Path tests so the comparison to $TestDrive is a string
SteveL-MSFT May 1, 2019
081dc65
Merge pull request #9511 from SteveL-MSFT/pester-480-b
SteveL-MSFT May 2, 2019
b7fbcb5
Move to .NET Core 3.0 preview 5
SteveL-MSFT May 6, 2019
d0305cd
update files.wxs
SteveL-MSFT May 6, 2019
c339036
Merge pull request #9543 from SteveL-MSFT/netcore30-preview5
SteveL-MSFT May 6, 2019
7cde195
use PkgMgmt 1.3.2 which has fix for NetCore30
SteveL-MSFT May 7, 2019
ed731a7
update to PSGet2.1.3 which has fix for .NET Core 3.0
SteveL-MSFT May 14, 2019
09afa49
Merge pull request #9555 from SteveL-MSFT/pkgmgmt-30fix
SteveL-MSFT May 14, 2019
44692cd
Merge remote-tracking branch 'upstream/master' into merge-master
SteveL-MSFT May 14, 2019
7b1ff74
update test
SteveL-MSFT May 14, 2019
3c2032b
fix removing use of rcedit
SteveL-MSFT May 14, 2019
3af006e
Merge pull request #9596 from SteveL-MSFT/merge-master
SteveL-MSFT May 14, 2019
f263c6d
remove some remaining workarounds put for longpath resolution that ha…
SteveL-MSFT May 14, 2019
033437b
cleanup, put back accidental remove of targets in csproj
SteveL-MSFT May 14, 2019
bfe6931
[package]
SteveL-MSFT May 14, 2019
3b5c3b2
[package]
SteveL-MSFT May 14, 2019
dcd0986
[package]
SteveL-MSFT May 14, 2019
75cedbf
[package]
SteveL-MSFT May 15, 2019
270afe5
[package]
SteveL-MSFT May 15, 2019
390d706
[package]
SteveL-MSFT May 15, 2019
80ed509
[package]
SteveL-MSFT May 15, 2019
44e43b1
[package]
SteveL-MSFT May 18, 2019
1f3f93c
[package]
SteveL-MSFT May 18, 2019
13f3347
[package]
SteveL-MSFT May 20, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions PowerShell.Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
Tracking Issue https://github.com/dotnet/sdk/issues/1557
-->
<PackageVersion>$(PSCoreBuildVersion)</PackageVersion>
<ApplicationIcon Condition="$(ProductVersion.Contains('preview'))">..\..\assets\Powershell_av_colors.ico</ApplicationIcon>
<ApplicationIcon Condition="!$(ProductVersion.Contains('preview'))">..\..\assets\Powershell_black.ico</ApplicationIcon>

</PropertyGroup>

Expand Down Expand Up @@ -93,9 +95,8 @@
<Company>Microsoft Corporation</Company>
<Copyright>(c) Microsoft Corporation. All rights reserved.</Copyright>

<TargetFramework>netcoreapp2.1</TargetFramework>
<RuntimeFrameworkVersion>2.1.8</RuntimeFrameworkVersion>
<LangVersion>Latest</LangVersion>
<TargetFramework>netcoreapp3.0</TargetFramework>
<LangVersion>8.0</LangVersion>
Comment thread
SteveL-MSFT marked this conversation as resolved.

<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
916 changes: 481 additions & 435 deletions assets/files.wxs

Large diffs are not rendered by default.

72 changes: 8 additions & 64 deletions build.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# On Windows paths is separated by semicolon
$script:TestModulePathSeparator = [System.IO.Path]::PathSeparator

$dotnetCLIChannel = "release"
$dotnetCLIChannel = 'preview' # TODO: Change this to 'release' once .Net Core 3.0 goes RTM
$dotnetCLIRequiredVersion = $(Get-Content $PSScriptRoot/global.json | ConvertFrom-Json).Sdk.Version

# Track if tags have been sync'ed
Expand Down Expand Up @@ -410,7 +410,7 @@ Fix steps:
Pop-Location
}

# publish netcoreapp2.1 reference assemblies
# publish reference assemblies
try {
Push-Location "$PSScriptRoot/src/TypeCatalogGen"
$refAssemblies = Get-Content -Path $incFileName | Where-Object { $_ -like "*microsoft.netcore.app*" } | ForEach-Object { $_.TrimEnd(';') }
Expand Down Expand Up @@ -449,51 +449,6 @@ Fix steps:
}
}

if ($Environment.IsWindows) {
## need RCEdit to modify the binaries embedded resources
$rcedit = "~/.rcedit/rcedit-x64.exe"
if (-not (Test-Path -Type Leaf $rcedit)) {
$rcedit = Get-Command "rcedit-x64.exe" -CommandType Application -ErrorAction Ignore | Select-Object -First 1 | ForEach-Object Name
}
if (-not $rcedit) {
throw "RCEdit is required to modify pwsh.exe resources, please run 'Start-PSBootStrap' to install"
}

$ReleaseVersion = ""
if ($ReleaseTagToUse) {
$ReleaseVersion = $ReleaseTagToUse
} else {
$ReleaseVersion = (Get-PSCommitId -WarningAction SilentlyContinue) -replace '^v'
}
# in VSCode, depending on where you started it from, the git commit id may be empty so provide a default value
if (!$ReleaseVersion) {
$ReleaseVersion = "6.0.0"
$fileVersion = "6.0.0"
} else {
$fileVersion = $ReleaseVersion.Split("-")[0]
}

# in VSCode, the build output folder doesn't include the name of the exe so we have to add it for rcedit
$pwshPath = $Options.Output
if (!$pwshPath.EndsWith("pwsh.exe")) {
$pwshPath = Join-Path $Options.Output "pwsh.exe"
}

if (Test-IsPreview $ReleaseVersion) {
$iconPath = "$PSScriptRoot\assets\Powershell_av_colors.ico"
} else {
$iconPath = "$PSScriptRoot\assets\Powershell_black.ico"
}

# fxdependent package does not have an executable to set iconPath etc.
if ($Options.Runtime -ne 'fxdependent') {
Start-NativeExecution { & $rcedit $pwshPath --set-icon $iconPath `
--set-file-version $fileVersion --set-product-version $ReleaseVersion --set-version-string "ProductName" "PowerShell 7" `
--set-version-string "LegalCopyright" "(C) Microsoft Corporation. All Rights Reserved." `
--application-manifest "$PSScriptRoot\assets\pwsh.manifest" } | Write-Verbose
}
}

# download modules from powershell gallery.
# - PowerShellGet, PackageManagement, Microsoft.PowerShell.Archive
if ($PSModuleRestore) {
Expand Down Expand Up @@ -617,8 +572,8 @@ function New-PSOptions {
[ValidateSet("Debug", "Release", "CodeCoverage", '')]
[string]$Configuration,

[ValidateSet("netcoreapp2.1")]
[string]$Framework,
[ValidateSet("netcoreapp3.0")]
[string]$Framework = "netcoreapp3.0",

# These are duplicated from Start-PSBuild
# We do not use ValidateScript since we want tab completion
Expand Down Expand Up @@ -656,6 +611,7 @@ function New-PSOptions {
}

Write-Verbose "Using configuration '$Configuration'"
Write-Verbose "Using framework '$Framework'"

if (-not $Runtime) {
if ($Environment.IsLinux) {
Expand Down Expand Up @@ -1741,19 +1697,6 @@ function Start-PSBootstrap {
$psInstallFile = [System.IO.Path]::Combine($PSScriptRoot, "tools", "install-powershell.ps1")
& $psInstallFile -AddToPath
}

## need RCEdit to modify the binaries embedded resources
if (-not (Test-Path "~/.rcedit/rcedit-x64.exe"))
{
Write-Log "Install RCEdit for modifying exe resources"
$rceditUrl = "https://github.com/electron/rcedit/releases/download/v1.0.0/rcedit-x64.exe"
New-Item -Path "~/.rcedit" -Type Directory -Force > $null

## need to specify TLS version 1.2 since GitHub API requires it
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12

Invoke-WebRequest -OutFile "~/.rcedit/rcedit-x64.exe" -Uri $rceditUrl
}
}
} finally {
Pop-Location
Expand Down Expand Up @@ -1854,12 +1797,13 @@ function Start-TypeGen
<Target Name="_GetDependencies"
DependsOnTargets="ResolveAssemblyReferencesDesignTime">
<ItemGroup>
<_RefAssemblyPath Include="%(_ReferencesFromRAR.HintPath)%3B" Condition=" '%(_ReferencesFromRAR.NuGetPackageId)' != 'Microsoft.Management.Infrastructure' "/>
<_RefAssemblyPath Include="%(_ReferencesFromRAR.OriginalItemSpec)%3B" Condition=" '%(_ReferencesFromRAR.NuGetPackageId)' != 'Microsoft.Management.Infrastructure' "/>
</ItemGroup>
<WriteLinesToFile File="$(_DependencyFile)" Lines="@(_RefAssemblyPath)" Overwrite="true" />
</Target>
</Project>
'@
New-Item -ItemType Directory -Path (Split-Path -Path $GetDependenciesTargetPath -Parent) -Force > $null
Set-Content -Path $GetDependenciesTargetPath -Value $GetDependenciesTargetValue -Force -Encoding Ascii

Push-Location "$PSScriptRoot/src/Microsoft.PowerShell.SDK"
Expand Down Expand Up @@ -2317,7 +2261,7 @@ function Copy-PSGalleryModules
Remove-Item -Force -ErrorAction Ignore -Recurse "$Destination/$name"
New-Item -Path $dest -ItemType Directory -Force -ErrorAction Stop > $null
# Exclude files/folders that are not needed. The fullclr folder is coming from the PackageManagement module
$dontCopy = '*.nupkg', '*.nupkg.sha512', '*.nuspec', 'System.Runtime.InteropServices.RuntimeInformation.dll', 'fullclr'
$dontCopy = '*.nupkg', '*.nupkg.metadata', '*.nupkg.sha512', '*.nuspec', 'System.Runtime.InteropServices.RuntimeInformation.dll', 'fullclr'
Copy-Item -Exclude $dontCopy -Recurse $src/* $dest
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/building/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Start-PSBuild
Congratulations! If everything went right, PowerShell is now built.
The `Start-PSBuild` script will output the location of the executable:

`./src/powershell-unix/bin/Debug/netcoreapp2.1/linux-x64/publish/pwsh`.
`./src/powershell-unix/bin/Debug/netcoreapp3.0/linux-x64/publish/pwsh`.

You should now be running the PowerShell Core that you just built, if your run the above executable.
You can run our cross-platform Pester tests with `Start-PSPester`, and our xUnit tests with `Start-PSxUnit`.
2 changes: 1 addition & 1 deletion docs/building/macos.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ We cannot do this for you in the build module due to #[847][].

Start a PowerShell session by running `pwsh`, and then use `Start-PSBuild` from the module.

After building, PowerShell will be at `./src/powershell-unix/bin/Debug/netcoreapp2.1/osx-x64/publish/pwsh`.
After building, PowerShell will be at `./src/powershell-unix/bin/Debug/netcoreapp3.0/osx-x64/publish/pwsh`.
4 changes: 2 additions & 2 deletions docs/building/windows-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ Import-Module ./build.psm1
Start-PSBuild
```

Congratulations! If everything went right, PowerShell is now built and executable as `./src/powershell-win-core/bin/Debug/netcoreapp2.1/win7-x64/publish/pwsh.exe`.
Congratulations! If everything went right, PowerShell is now built and executable as `./src/powershell-win-core/bin/Debug/netcoreapp3.0/win7-x64/publish/pwsh.exe`.

This location is of the form `./[project]/bin/[configuration]/[framework]/[rid]/publish/[binary name]`,
and our project is `powershell`, configuration is `Debug` by default,
framework is `netcoreapp2.1`, runtime identifier is `win7-x64` by default,
framework is `netcoreapp3.0`, runtime identifier is `win7-x64` by default,
and binary name is `pwsh`.
The function `Get-PSOutput` will return the path to the executable;
thus you can execute the development copy via `& (Get-PSOutput)`.
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "2.1.504"
"version": "3.0.100-preview5-011568"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ private void LoadAssemblies(IEnumerable<string> assemblies)
/// </summary>
private static IEnumerable<PortableExecutableReference> InitDefaultRefAssemblies()
{
// netcoreapp2.1 currently comes with 144 reference assemblies (maybe more in future), so we use a capacity of '150'.
// netcoreapp3.0 currently comes with 148 reference assemblies (maybe more in future), so we use a capacity of '150'.
var defaultRefAssemblies = new List<PortableExecutableReference>(150);

foreach (string file in Directory.EnumerateFiles(s_netcoreAppRefFolder, "*.dll", SearchOption.TopDirectoryOnly))
Expand Down
2 changes: 1 addition & 1 deletion src/Modules/PSGalleryModules.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="..\..\PowerShell.Common.props" />

<ItemGroup>
<PackageReference Include="PowerShellGet" Version="2.1.2" />
<PackageReference Include="PowerShellGet" Version="2.1.3" />
<PackageReference Include="PackageManagement" Version="1.3.2" />
<PackageReference Include="Microsoft.PowerShell.Archive" Version="1.2.3.0" />
<PackageReference Include="PSReadLine" Version="2.0.0-beta4" />
Expand Down
3 changes: 2 additions & 1 deletion src/ResGen/ResGen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

<PropertyGroup>
<Description>Generates C# typed bindings for .resx files</Description>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.0</TargetFramework>
<AssemblyName>resgen</AssemblyName>
<OutputType>Exe</OutputType>
<TieredCompilation>true</TieredCompilation>
<TieredCompilationQuickJit>true</TieredCompilationQuickJit>
<RuntimeIdentifiers>win7-x86;win7-x64;osx-x64;linux-x64</RuntimeIdentifiers>
</PropertyGroup>

Expand Down
19 changes: 15 additions & 4 deletions src/System.Management.Automation/engine/PSVersionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ public class PSVersionInfo
private static Version s_psV4Version = new Version(4, 0);
private static Version s_psV5Version = new Version(5, 0);
private static Version s_psV51Version = new Version(5, 1, NTVerpVars.PRODUCTBUILD, NTVerpVars.PRODUCTBUILD_QFE);
private static SemanticVersion s_psV6Version;
private static SemanticVersion s_psV6Version = new SemanticVersion(6, 0, 0, null, null);
private static SemanticVersion s_psV7Version;

/// <summary>
/// A constant to track current PowerShell Edition.
Expand Down Expand Up @@ -99,12 +100,12 @@ static PSVersionInfo()
rawGitCommitId = mainVersion;
}

s_psV6Version = new SemanticVersion(mainVersion);
s_psV7Version = new SemanticVersion(mainVersion);
Comment thread
SteveL-MSFT marked this conversation as resolved.

s_psVersionTable[PSVersionInfo.PSVersionName] = s_psV6Version;
s_psVersionTable[PSVersionInfo.PSVersionName] = s_psV7Version;
s_psVersionTable[PSVersionInfo.PSEditionName] = PSEditionValue;
s_psVersionTable[PSGitCommitIdName] = rawGitCommitId;
s_psVersionTable[PSCompatibleVersionsName] = new Version[] { s_psV1Version, s_psV2Version, s_psV3Version, s_psV4Version, s_psV5Version, s_psV51Version, s_psV6Version };
s_psVersionTable[PSCompatibleVersionsName] = new Version[] { s_psV1Version, s_psV2Version, s_psV3Version, s_psV4Version, s_psV5Version, s_psV51Version, s_psV6Version, s_psV7Version };
Comment thread
SteveL-MSFT marked this conversation as resolved.
s_psVersionTable[PSVersionInfo.SerializationVersionName] = new Version(InternalSerializer.DefaultVersion);
s_psVersionTable[PSVersionInfo.PSRemotingProtocolVersionName] = RemotingConstants.ProtocolVersion;
s_psVersionTable[PSVersionInfo.WSManStackVersionName] = GetWSManStackVersion();
Expand Down Expand Up @@ -271,6 +272,11 @@ internal static string FeatureVersionString

internal static bool IsValidPSVersion(Version version)
{
if (version.Major == s_psV7Version.Major)
{
return version.Minor == s_psV7Version.Minor;
}

if (version.Major == s_psV6Version.Major)
Comment thread
SteveL-MSFT marked this conversation as resolved.
{
return version.Minor == s_psV6Version.Minor;
Comment thread
SteveL-MSFT marked this conversation as resolved.
Expand Down Expand Up @@ -321,6 +327,11 @@ internal static SemanticVersion PSV6Version
get { return s_psV6Version; }
Comment thread
SteveL-MSFT marked this conversation as resolved.
}

internal static SemanticVersion PSV7Version
{
get { return s_psV7Version; }
}

#endregion
}

Expand Down
2 changes: 0 additions & 2 deletions src/System.Management.Automation/engine/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1182,8 +1182,6 @@ internal static bool IsReservedDeviceName(string destinationPath)
string compareName = Path.GetFileName(destinationPath);
string noExtensionCompareName = Path.GetFileNameWithoutExtension(destinationPath);

// See if it's the correct length. If it's shorter than CON, AUX, etc, it can't be a device name.
// Likewise, if it's longer than 'CLOCK$', it can't be a device name.
if (((compareName.Length < 3) || (compareName.Length > 6)) &&
((noExtensionCompareName.Length < 3) || (noExtensionCompareName.Length > 6)))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ protected string MakePath(string parent, string child, bool childIsLeaf)
// If the parent is empty but the child is not, return the
// child

result = child.Replace(StringLiterals.AlternatePathSeparator, StringLiterals.DefaultPathSeparator);
result = NormalizePath(child);
}
else if (!string.IsNullOrEmpty(parent) &&
string.IsNullOrEmpty(child))
Expand Down Expand Up @@ -369,8 +369,8 @@ protected string MakePath(string parent, string child, bool childIsLeaf)
// Normalize the path so that only the default path separator is used as a
// separator even if the user types the alternate slash.

parent = parent.Replace(StringLiterals.AlternatePathSeparator, StringLiterals.DefaultPathSeparator);
child = child.Replace(StringLiterals.AlternatePathSeparator, StringLiterals.DefaultPathSeparator);
parent = NormalizePath(parent);
child = NormalizePath(child);
}

// Joins the paths
Expand Down
3 changes: 2 additions & 1 deletion src/TypeCatalogGen/TypeCatalogGen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

<PropertyGroup>
<Description>Generates CorePsTypeCatalog.cs given powershell.inc</Description>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp3.0</TargetFramework>
Comment thread
SteveL-MSFT marked this conversation as resolved.
<AssemblyName>TypeCatalogGen</AssemblyName>
<OutputType>Exe</OutputType>
<TieredCompilation>true</TieredCompilation>
<TieredCompilationQuickJit>true</TieredCompilationQuickJit>
<RuntimeIdentifiers>win7-x86;win7-x64;osx-x64;linux-x64</RuntimeIdentifiers>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/powershell-native/Install-PowerShellRemoting.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function Register-WinRmPlugin
SDKVersion="2" XmlRenderingType="text" Enabled="True" OutputBufferingMode="Block" ProcessIdleTimeoutSec="0" Architecture="{2}"
UseSharedProcess="false" RunAsUser="" RunAsPassword="" AutoRestart="false">
<InitializationParameters>
<Param Name="PSVersion" Value="6.0"/>
<Param Name="PSVersion" Value="7.0"/>
</InitializationParameters>
<Resources>
<Resource ResourceUri="http://schemas.microsoft.com/powershell/{0}" SupportsOptions="true" ExactMatch="true">
Expand Down
1 change: 1 addition & 0 deletions src/powershell-unix/powershell-unix.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<AssemblyName>pwsh</AssemblyName>
<OutputType>Exe</OutputType>
<TieredCompilation>true</TieredCompilation>
<TieredCompilationQuickJit>true</TieredCompilationQuickJit>
<RuntimeIdentifiers>linux-x64;osx-x64;</RuntimeIdentifiers>
</PropertyGroup>

Expand Down
11 changes: 10 additions & 1 deletion src/powershell-win-core/powershell-win-core.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Project ToolsVersion="15.0">
<Import Project="..\..\PowerShell.Common.props" />

<PropertyGroup>
<Description>PowerShell on Windows top-level project</Description>
<AssemblyName>pwsh</AssemblyName>
<OutputType>Exe</OutputType>
<TieredCompilation>true</TieredCompilation>
<TieredCompilationQuickJit>true</TieredCompilationQuickJit>
<RuntimeIdentifiers>win7-x86;win7-x64</RuntimeIdentifiers>
<RootNamespace>Microsoft.PowerShell</RootNamespace>
<ApplicationManifest>..\..\assets\pwsh.manifest</ApplicationManifest>
</PropertyGroup>

<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" Condition="'$(RuntimeIdentifier)' == 'win-arm' or '$(RuntimeIdentifier)' == 'win-arm64'" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" Condition="'$(RuntimeIdentifier)' == 'win-arm' or '$(RuntimeIdentifier)' == 'win-arm64'" />

<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk.WindowsDesktop" Condition="'$(RuntimeIdentifier)' != 'win-arm' and '$(RuntimeIdentifier)' != 'win-arm64'" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk.WindowsDesktop" Condition="'$(RuntimeIdentifier)' != 'win-arm' and '$(RuntimeIdentifier)' != 'win-arm64'" />
Comment thread
SteveL-MSFT marked this conversation as resolved.

<ItemGroup>
<Compile Include="..\powershell\Program.cs" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
<Content Include="..\System.Management.Automation\powershell.config.json">
Expand Down
5 changes: 2 additions & 3 deletions test/Test.Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
<Company>Microsoft Corporation</Company>
<Copyright>(c) Microsoft Corporation. All rights reserved.</Copyright>

<TargetFramework>netcoreapp2.1</TargetFramework>
<RuntimeFrameworkVersion>2.1.8</RuntimeFrameworkVersion>
<LangVersion>Latest</LangVersion>
<TargetFramework>netcoreapp3.0</TargetFramework>
<LangVersion>8.0</LangVersion>

<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
2 changes: 1 addition & 1 deletion test/hosting/hosting.tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="XunitXml.TestLogger" Version="2.0.0" />
<!-- The version of Microsoft.PowerShell.SDK should be the version we are releasing, so the tests use the correct SDK before publishing to NuGet.org -->
<PackageReference Include="Microsoft.PowerShell.SDK" Version="6.2.0-rc.1" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="6.2.0" />
<PackageReference Include="Xunit.SkippableFact" Version="1.3.6" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
</ItemGroup>
Expand Down
11 changes: 8 additions & 3 deletions test/powershell/Host/ConsoleHost.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -824,9 +824,14 @@ Describe "Console host api tests" -Tag CI {
Describe "Pwsh exe resources tests" -Tag CI {
It "Resource strings are embedded in the executable" -Skip:(!$IsWindows) {
$pwsh = Get-Item -Path "$PSHOME\pwsh.exe"
$pwsh.VersionInfo.FileVersion | Should -BeExactly $PSVersionTable.PSVersion.ToString().Split("-")[0]
$pwsh.VersionInfo.ProductVersion.Replace("-dirty","") | Should -BeExactly $PSVersionTable.GitCommitId
$pwsh.VersionInfo.ProductName | Should -BeExactly "PowerShell 7"
$pwsh.VersionInfo.FileVersion | Should -Match $PSVersionTable.PSVersion.ToString().Split("-")[0]
$productVersion = $pwsh.VersionInfo.ProductVersion.Replace("-dirty","").Replace(" Commits: ","-").Replace(" SHA: ","-g")
if ($PSVersionTable.GitCommitId.Contains("-g")) {
$productVersion | Should -BeExactly $PSVersionTable.GitCommitId
} else {
$productVersion | Should -Match $PSVersionTable.GitCommitId
}
$pwsh.VersionInfo.ProductName | Should -BeExactly "PowerShell"
}

It "Manifest contains compatibility section" -Skip:(!$IsWindows) {
Expand Down
Loading