-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Closed
Copy link
Labels
7.4-regressionRegression in 7.4Regression in 7.4Area-Maintainers-Buildspecific to affecting the buildspecific to affecting the build
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
# PS 7.2
## CSharpModule is a PowerShell module written in C# targeting netstandard2.0 and dependent on package PowerShell.Standard.Library 5.1.1 and Microsoft.Bcl.AsyncInterfaces 6.0.0.0
PS> Import-Module /app/CSharpModule.dll# PS 7.4
## CSharpModule is a PowerShell module written in C# targeting netstandard2.0 and dependent on packages PowerShell.Standard.Library 5.1.1 and Microsoft.Bcl.AsyncInterfaces 6.0.0.0 or 7.0.0.0 or 8.0.0.0
PS> Import-Module /app/CSharpModule.dll# The PowerShell 7 install should also bundle the appropriate version of Microsoft.Bcl.AsyncInterfaces for its target framework
## PS 7.2 - .NET 6.0 - Microsoft.Bcl.AsyncInterfaces 6.0.0.0
## PS 7.4 - .NET 8.0 - Microsoft.Bcl.AsyncInterfaces 8.0.0.0
PS> $installDir = [System.IO.Path]::GetDirectoryName((Get-Command pwsh).Location)
PS> $bclLibraryPath = Join-Path $installDir "Microsoft.Bcl.Libarary.dll"
PS> Add-Type -Path $bclLibraryPath
PS> [System.AppDomain]::CurrentDomain.GetAssemblies() | Where { $_.FullName -like "*Microsoft.Bcl.AsyncInterfaces*" } | Select -ExpandProperty FullNameI have an example repository that does this these very steps including their results here
Expected behavior
## PS 7.2
- Nothing: Successful import
## PS 7.4
- Nothing: Success import
## Bundled Microsoft.Bcl.AsyncInterfaces
Should match the given target .NET version
PS 7.2 (.NET 6.0) -> 6.0.0.0
PS 7.4 (.NET 8.0) -> 8.0.0.0Actual behavior
## PS 7.2
Failed import
## PS 7.4
Failed Import
## Bundled Microsoft.Bcl.AsyncInterfaces
Microsoft.Bcl.AsyncInterfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51Error details
## PS 7.2
Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. Could not find or load a specific file. (0x80131621)
## PS 7.4
Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. Could not find or load a specific file. (0x80131621)
Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. Could not find or load a specific file. (0x80131621)
Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. Could not find or load a specific file. (0x80131621)
# Bundled Microsoft.Bcl.AsyncInterfaces
(No error, just unexpected version)Environment data
AsyncInterfaces library to PowerShell version data can be found here:
bcl-version-data.csv
C# PowerShell module import test results can be found here:
import-test-results.csv
Visuals
No response
Metadata
Metadata
Assignees
Labels
7.4-regressionRegression in 7.4Regression in 7.4Area-Maintainers-Buildspecific to affecting the buildspecific to affecting the build