-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Open
Labels
Needs-TriageThe issue is new and needs to be triaged by a work group.The issue is new and needs to be triaged by a work group.
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
I'm a newbie ...clean laptop. The build steps...
Import-Module ./build.psm1
Start-PSBuild -Clean -PSModuleRestore -UseNuGetOrg
failed at line 843 in build.psm1. Replacing line 843 (the commented statement) with the following fixed it:
#$runtimePattern += $environment.OSArchitecture.ToString()
if ($PSVersionTable.PSVersion.Major -ge 7) {
$arch = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString()
} else {
$arch = if ([Environment]::Is64BitOperatingSystem) { 'X64' } else { 'X86' }
}
$runtimePattern += $arch
Expected behavior
Expect Start-PSBuild -Clean -PSModuleRestore -UseNuGetOrg to complete cleanly.Actual behavior
$runtimePattern += $environment.OSArchitecture.ToString() failed.
$environment.OSArchitecture on my laptop was returning a nullError details
The property 'OSArchitecture' cannot be found on this object. Verify that the property exists. At C:\tdw\repos\PowerShell\build.psm1:843 char:5 + $runtimePattern += $environment.OSArchitecture.ToString() + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException + FullyQualifiedErrorId : PropertyNotFoundStrict VERBOSE: runtime pattern check: win7-x64 -match ^win.*- VERBOSE: Generating experimental feature list VERBOSE: Build experimental feature list by running 'Get-ExperimentalFeature'Environment data
PS C:\TDW\repos\PowerShell> $PSVersionTable
Name Value
---- -----
PSVersion 7.5.4
PSEdition Core
GitCommitId 7.5.4
OS Microsoft Windows 10.0.26200
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
PS C:\TDW\repos\PowerShell>Visuals
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Needs-TriageThe issue is new and needs to be triaged by a work group.The issue is new and needs to be triaged by a work group.