添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account
  • 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

    This is a regression between build 8.0.100-preview.5.23267.7 and 8.0.100-preview.5.23269.4. It was discovered when attempting to update the .NET Docker images to the latest build of Preview 5. You can see the CI results with this error here: dotnet/dotnet-docker#4628

    This affects Windows only.

    Build this Dockerfile:

    # escape=`
    FROM mcr.microsoft.com/windows/servercore:ltsc2022 AS installer
    RUN powershell -Command " `
            $ErrorActionPreference = 'Stop'; `
            $ProgressPreference = 'SilentlyContinue'; `
            # Retrieve .NET SDK
            $sdk_version = '8.0.100-preview.5.23269.4'; `
            Invoke-WebRequest -OutFile dotnet.zip https://dotnetbuilds.azureedge.net/public/Sdk/$sdk_version/dotnet-sdk-$sdk_version-win-x64.zip; `
            mkdir $Env:ProgramFiles\dotnet; `
            tar -oxzf dotnet.zip -C $Env:ProgramFiles\dotnet; `
            Remove-Item -Force dotnet.zip;"
    RUN powershell -Command " `
            $ErrorActionPreference = 'Stop'; `
            $ProgressPreference = 'SilentlyContinue'; `
            # Install PowerShell global tool
            $powershell_version = '7.4.0-preview.3'; `
            Invoke-WebRequest -OutFile PowerShell.Windows.x64.$powershell_version.nupkg https://pwshtool.blob.core.windows.net/tool/$powershell_version/PowerShell.Windows.x64.$powershell_version.nupkg; `
            & $Env:ProgramFiles\dotnet\dotnet tool install --add-source . --tool-path $Env:ProgramFiles\powershell --version $powershell_version PowerShell.Windows.x64; `
            & $Env:ProgramFiles\dotnet\dotnet nuget locals all --clear; `
            Remove-Item -Force PowerShell.Windows.x64.$powershell_version.nupkg; `
            Remove-Item -Path $Env:ProgramFiles\powershell\.store\powershell.windows.x64\$powershell_version\powershell.windows.x64\$powershell_version\powershell.windows.x64.$powershell_version.nupkg -Force;"
    RUN setx /M PATH "%PATH%;C:\Program Files\powershell;C:\Program Files\dotnet"
    RUN pwsh --version

    Expected behavior

    It should be able to run `pwsh` without failure.

    Actual behavior

    Process terminated. The type initializer for 'System.Management.Automation.PSVersionInfo' threw an exception.
       at System.Environment.FailFast(System.String, System.Exception)
       at Microsoft.PowerShell.UnmanagedPSEntry.Start(System.String[], Int32)
       at Microsoft.PowerShell.ManagedPSEntry.Main(System.String[])
    System.TypeInitializationException: The type initializer for 'System.Management.Automation.PSVersionInfo' threw an exception.
     ---> System.TypeInitializationException: The type initializer for 'System.Management.Automation.PSObject' threw an exception.
     ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
    File name: 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
       at System.Management.Automation.PSObject..cctor()
       --- End of inner exception stack trace ---
       at System.Management.Automation.PSObject.get_Properties()
       at System.Management.Automation.SemanticVersion.op_Implicit(SemanticVersion semver)
       at System.Management.Automation.PSVersionInfo..cctor()
       --- End of inner exception stack trace ---
       at System.Management.Automation.PSVersionInfo.get_PSVersion()
       at System.Management.Automation.PSSnapInReader.ReadRegistryInfo(Version& assemblyVersion, String& publicKeyToken, String& culture, String& applicationBase, Version& psVersion)
       at System.Management.Automation.PSSnapInReader.ReadCoreEngineSnapIn()
       at System.Management.Automation.Runspaces.InitialSessionState.ImportCorePSSnapIn()
       at System.Management.Automation.Runspaces.InitialSessionState.CreateDefault2()
       at Microsoft.PowerShell.UnmanagedPSEntry.Start(String[] args, Int32 argc)The command 'cmd /S /C pwsh --version' returned a non-zero code: 2148734499
    ### Error details _No response_ ### Environment data ```powershell Can't run it because pwsh fails to run.

    Visuals

    No response

    @mthalman it looks like you had a similar issue in the past - do you recall what the solution was there? #15710

    I don't know what the solution was. My guess is that the new RID made its way in. I eventually removed the disabling of PowerShell tests because they started working at some point: dotnet/dotnet-docker#3269 . If I had to guess, that issue is RID-dependent but this one is likely unrelated to that.

    My investigation shows it’s a regression in .NET 8-preview.5.

    The Microsoft.Management.Infrastructure.dll (MMI.dll) can be loaded in preview.5 without a problem by Assembly.LoadFrom . However, when running a fxdependent build of pwsh with the preview.5 SDK (through ....\dotnet.exe ....\pwsh.dll ), the MMI.dll doesn’t get included in the Trusted_Platform_Assemblies (TPA) list, and thus it cannot be found when the loading is requested. As a comparison, when running the same fxdependent build of pwsh with the .NET 8-preview.4 SDK, the MMI.dll is included in the TPA list and hence the loading works as expected at pwsh startup.

    I want to call out that the Microsoft.Management.Infrastructure NuGet package ships netstandard1.6 managed assemblies (MMI.dll). Maybe the regression in .NET 8 preview.5 is related to the netstandard1.6 TFM? Just a guess.

    Regression in .NET 8.0-preview.5: dependent assembly is not included in TPA list when running fxdependent pwsh build with preview.5 dotnet.exe dotnet/runtime#86713

    Hello @daxian-dbw and @adityapatwardhan -- We need this fix for Azure Functions. Please keep us in the loop.

    /cc @AnatoliB @paulyuk @shreyabatra4

    @daxian-dbw @adityapatwardhan I realize this is not a trivial issue to fix, and thank you for prioritizing it. I just want to explicitly add that delaying this fix may delay PowerShell 7.4 support in Azure Functions. Our intention is to declare GA on the Functions end as soon as possible after the official PowerShell 7.4 GA. But, in order to make this happen, we have to complete some preparation work on the Functions infrastructure ahead of time, and this work is blocked today.

    * Bump the androidx group with 1 update ( #16474 ) Bumps the androidx group with 1 update: [Xamarin.AndroidX.RecyclerView]( https://github.com/xamarin/AndroidX ). - [Commits]( https://github.com/xamarin/AndroidX/commits ) updated-dependencies: - dependency-name: Xamarin.AndroidX.RecyclerView dependency-type: direct:production update-type: version-update:semver-patch dependency-group: androidx Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Document Element ( #16299 ) * Begin doc progress * Document element * More explicit interface implementations * Address PR feedback * Document interfaces + delete xml * whitespace * Prevent compile issues * Document IElementController (and mark as obsolete) * Remove Obsolete attribute from IElementController This would break the build in various places - and would go out of scope of the PR * Document IVusalElementController Apparently is only for internal use. We can't make it private so the only choice is to mark everything as for internal use only * Prevent mdoc from breaking You can't really cref a namespace * Fixed other crefs * Address Dave's feedback * Move powershell pack script into cake ( #16588 ) * 'pwsh' is broken on net8 PowerShell/PowerShell#19679 * Remove the script * oops * Fix Graphics Font comparison method ( #15985 ) * Fix the issue * Added more tests * Updated Impl * [WinUI] Implement PointerPressed and PointerReleased ( #16213 ) * Implement on Windows and add unit tests * Update src/Controls/src/Core/PointerGestureRecognizer.cs Co-authored-by: Samantha Houts <[email protected]> --------- Co-authored-by: Samantha Houts <[email protected]> * [X] Optimize OnPlatform element syntax ( #5611 ) * [X] Optimize OnPlatform element syntax - fixes #5583 * Auto-format source code * don't generate x:Name for removed OnPlatforms * Update src/Controls/src/SourceGen/Controls.SourceGen.csproj Co-authored-by: Jonathan Peppers <[email protected]> * fix string comparison --------- Co-authored-by: Jonathan Peppers <[email protected]> * [Housekeeping] Add 8.0 preview 7 ( #16613 ) also adds a checkbox to make it clear if this is a regression or not * [X] Support DynResources as AppThemeBinding values ( #16597 ) Because, you know, why not ? It could be useful - fixes #13619 * [main] Update dependencies from dotnet/xharness ( #16600 ) * Update dependencies from https://github.com/dotnet/xharness build 20230807.2 Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit From Version 8.0.0-prerelease.23403.1 -> To Version 8.0.0-prerelease.23407.2 * Run device tests on 16.4 * Force to 16.4 * Skip test that fails on iOS --------- Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Rui Marinho <[email protected]> * Adds prompts when creating a new page. ( #16331 ) * Adds prompts when creating a new page. * Updates description as per suggested PR comments * [ios] fix memory leak in GraphicsView ( #16605 ) Context: #16346 This addresses the memory leak discovered by: src/Core/src/Platform/iOS/PlatformTouchGraphicsView.cs(12,29): error MA0002: Member '_hoverGesture' could cause memory leaks in an NSObject subclass. Remove the member, store the value as a WeakReference, or add the [UnconditionalSuppressMessage("Memory", "MA0002")] attribute with a justification as to why the member will not leak. I could reproduce a leak in `MemoryTests.cs`: ++[InlineData(typeof(GraphicsView))] public async Task HandlerDoesNotLeak(Type type) Solved the problem by fixing two places: * `PlatformTouchGraphicsView` now stores the `IGraphicsView` as a `WeakReference`. * A `UIHoverGestureRecognizerProxy` is used for callbacks to the `UIHoverGestureRecognizer`. * [create-pull-request] automated change ( #16592 ) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Setting binding on Label doesn't set text to incoming binding ( #16410 ) * Test demonstrating binding issue * [C] SetBinding overrides SetValue, but only when the value is set * - reenable tests --------- Co-authored-by: Stephane Delcroix (HE/HIM) (from Dev Box) <[email protected]> * Added DeviceTest to validate CharacterSpacing on iOS Button ( #16603 ) * Use runtime check for setting WKWebView inspectable flag ( #16631 ) * Use runtime check * Remove private * Add back line * Line endings? * Use System.OperatingSystem * Update src/BlazorWebView/src/Maui/iOS/BlazorWebViewHandler.iOS.cs Co-authored-by: Rolf Bjarne Kvinge <[email protected]> --------- Co-authored-by: Rolf Bjarne Kvinge <[email protected]> * [Housekeeping] Fix broken bug template ( #16643 ) * [Housekeeping] Fix broken bug template checkbox <> checkboxes * Update bug-report.yml * Update bug-report.yml * Implement Additional PointerGestureRecognizer Platform Arguments ( #16426 ) * Pointer Platform Event Args * remove extension and use property instead * make ctor internal * nullable consistency, spelling, and private setter * Public API changes and remove nullable windows routedargs * uitests part 1 * only run ui tests on windows and mac * move device conditional to test * Change the tests to Pointer Tests for more reusability * Add documentation * Add extension method for ignoring platforms * Update the documentation * Change platform specific docs * [C] fix Specificity for VSM ( #16404 ) * [C] fix Specificity for VSM - fixes #11204 * remove skipped test * Prevent Android timer from adding multiple callbacks; ( #16078 ) Fixes #10257 * [Housekeeping] Remove checkboxes from bug template ( #16650 ) I did not realize that they would be editable tasks on the issue. Replaced with a dropdown. Also reordered the versions to be the most likely default options to speed up the reporting process. * [Android] Fix SwipeView not swiping using Label as direct content ( #14824 ) * Fix Android SwipeView not swiping using Label as Content * Refactoring code * Added sample to validate 6154 --------- Co-authored-by: Javier Suárez <[email protected]> * Locate MAUI View for PlatformView ( #16463 ) * Locate xplat view from platformview * - dispatcher * - fix layout comparison on xunit * - PR review comments * - tizen fix * Bump the aspnetcore group with 7 updates ( #16634 ) Bumps the aspnetcore group with 7 updates: | Package | Update | | --- | --- | | [Microsoft.AspNetCore.Authorization]( https://github.com/dotnet/aspnetcore ) | 7.0.9 to 7.0.10 | | [Microsoft.AspNetCore.Components.WebView]( https://github.com/dotnet/aspnetcore ) | 7.0.9 to 7.0.10 | | [Microsoft.JSInterop]( https://github.com/dotnet/aspnetcore ) | 7.0.9 to 7.0.10 | | [Microsoft.AspNetCore.Components.Web]( https://github.com/dotnet/aspnetcore ) | 7.0.9 to 7.0.10 | | [Microsoft.AspNetCore.Authentication.Facebook]( https://github.com/dotnet/aspnetcore ) | 7.0.9 to 7.0.10 | | [Microsoft.AspNetCore.Authentication.Google]( https://github.com/dotnet/aspnetcore ) | 7.0.9 to 7.0.10 | | [Microsoft.AspNetCore.Authentication.MicrosoftAccount]( https://github.com/dotnet/aspnetcore ) | 7.0.9 to 7.0.10 | Updates `Microsoft.AspNetCore.Authorization` from 7.0.9 to 7.0.10 - [Release notes]( https://github.com/dotnet/aspnetcore/releases ) - [Changelog]( https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md ) - [Commits]( dotnet/aspnetcore@ v7.0.9...v7.0.10 ) Updates `Microsoft.AspNetCore.Components.WebView` from 7.0.9 to 7.0.10 - [Release notes]( https://github.com/dotnet/aspnetcore/releases ) - [Changelog]( https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md ) - [Commits]( dotnet/aspnetcore@ v7.0.9...v7.0.10 ) Updates `Microsoft.JSInterop` from 7.0.9 to 7.0.10 - [Release notes]( https://github.com/dotnet/aspnetcore/releases ) - [Changelog]( https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md ) - [Commits]( dotnet/aspnetcore@ v7.0.9...v7.0.10 ) Updates `Microsoft.AspNetCore.Components.Web` from 7.0.9 to 7.0.10 - [Release notes]( https://github.com/dotnet/aspnetcore/releases ) - [Changelog]( https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md ) - [Commits]( dotnet/aspnetcore@ v7.0.9...v7.0.10 ) Updates `Microsoft.AspNetCore.Authentication.Facebook` from 7.0.9 to 7.0.10 - [Release notes]( https://github.com/dotnet/aspnetcore/releases ) - [Changelog]( https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md ) - [Commits]( dotnet/aspnetcore@ v7.0.9...v7.0.10 ) Updates `Microsoft.AspNetCore.Authentication.Google` from 7.0.9 to 7.0.10 - [Release notes]( https://github.com/dotnet/aspnetcore/releases ) - [Changelog]( https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md ) - [Commits]( dotnet/aspnetcore@ v7.0.9...v7.0.10 ) Updates `Microsoft.AspNetCore.Authentication.MicrosoftAccount` from 7.0.9 to 7.0.10 - [Release notes]( https://github.com/dotnet/aspnetcore/releases ) - [Changelog]( https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md ) - [Commits]( dotnet/aspnetcore@ v7.0.9...v7.0.10 ) updated-dependencies: - dependency-name: Microsoft.AspNetCore.Authorization dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aspnetcore - dependency-name: Microsoft.AspNetCore.Components.WebView dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aspnetcore - dependency-name: Microsoft.JSInterop dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aspnetcore - dependency-name: Microsoft.AspNetCore.Components.Web dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aspnetcore - dependency-name: Microsoft.AspNetCore.Authentication.Facebook dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aspnetcore - dependency-name: Microsoft.AspNetCore.Authentication.Google dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aspnetcore - dependency-name: Microsoft.AspNetCore.Authentication.MicrosoftAccount dependency-type: direct:production update-type: version-update:semver-patch dependency-group: aspnetcore Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [create-pull-request] automated change ( #16655 ) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * [ios] fix memory leak in SwipeItem ( #16614 ) Context: #16346 This addresses the memory leak discovered by: src/Core/src/Handlers/SwipeItemMenuItem/SwipeItemMenuItemHandler.iOS.cs(10,30): error MA0001: Event 'FrameChanged' could cause memory leaks in an NSObject subclass. Remove the event or add the [UnconditionalSuppressMessage("Memory", "MA0001")] attribute with a justification as to why the event will not leak. I could reproduce the leak with a custom test in `SwipeViewTests`. Solved the problem by introducing `SwipeItemButtonProxy` with the same pattern from other PRs. * [ios/catalyst] fix memory leak in DatePicker ( #16589 ) Context: #16346 This addresses the memory leak discovered by: src/Core/src/Platform/iOS/MauiDatePicker.cs(37,27): error MA0003: Subscribing to events with instance method 'OnValueChanged' could cause memory leaks in an NSObject subclass. Remove the subscription or convert the method to a static method. I could reproduce a leak in `MemoryTests.cs`: ++[InlineData(typeof(DatePicker))] public async Task HandlerDoesNotLeak(Type type) Solved the problem by fixing two places: * `MauiDatePicker` now uses a `UIDatePickerProxy` type, for iOS * `DatePickerHandler.MacCatalyst.cs` now uses a `UIDatePickerProxy` type, for MacCatalyst. Other changes: * Skip test on Android API 23 This is working for me locally on an API 23 emulator -- so I don't think it is really leaking. We skipped API 23 in another place: https://github.com/dotnet/maui/blob/9fcccd57b5a3d664e4788b3c7fc3edc10010beaf/src/Controls/tests/DeviceTests/Elements/NavigationPage/NavigationPageTests.cs#L302-L303 We are more interested in iOS on this PR anyway. * [build] Bump XCode to 14.31 ( #16374 ) * Add doc comments for common types used in templates, maps, webview ( #16552 ) * Add doc comments for common types used in templates, maps, webview * Enable WarnigsAsErrors for inline docs on Maps I went through every type/method/etc. used in the default MAUI app template and ensured there are doc for all of them. I also added a few miscellaneous docs for WebView types and Map (many were copied from Xamarin.Forms docs). --------- Co-authored-by: Gerald Versluis <[email protected]> * Update CODEOWNERS ( #16682 ) * Fix the case where silent was requested ( #16676 ) * Use the correct WASDK property ( #16683 ) * Re-land "[Windows] fixing window glitches while moving or resizing" ( #16637 ) Initially merged in #14861 but there was a few test failures due to 83398c3 so it was reverted in #16541 * Update dependencies from https://github.com/xamarin/xamarin-macios build 20230815.5 Microsoft.tvOS.Sdk From Version 16.4.8694-net8-p7 -> To Version 16.4.8751-net8-rc1 * Update dependencies from https://github.com/xamarin/xamarin-macios build 20230815.5 Microsoft.MacCatalyst.Sdk From Version 16.4.8694-net8-p7 -> To Version 16.4.8751-net8-rc1 * Update dependencies from https://github.com/xamarin/xamarin-macios build 20230815.5 Microsoft.macOS.Sdk From Version 13.3.8694-net8-p7 -> To Version 13.3.8751-net8-rc1 * Update dependencies from https://github.com/xamarin/xamarin-macios build 20230815.5 Microsoft.iOS.Sdk From Version 16.4.8694-net8-p7 -> To Version 16.4.8751-net8-rc1 --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Scott Banning <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Juan Diego Herrera <[email protected]> Co-authored-by: Matthew Leibowitz <[email protected]> Co-authored-by: Javier Suárez <[email protected]> Co-authored-by: Rachel Kang <[email protected]> Co-authored-by: Samantha Houts <[email protected]> Co-authored-by: Stephane Delcroix <[email protected]> Co-authored-by: Jonathan Peppers <[email protected]> Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Rui Marinho <[email protected]> Co-authored-by: Mausam Shrestha <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Shane Neuville <[email protected]> Co-authored-by: Stephane Delcroix (HE/HIM) (from Dev Box) <[email protected]> Co-authored-by: Tim Miller <[email protected]> Co-authored-by: Rolf Bjarne Kvinge <[email protected]> Co-authored-by: TJ Lambert <[email protected]> Co-authored-by: E.Z. Hart <[email protected]> Co-authored-by: Javier Suárez <[email protected]> Co-authored-by: scoban <[email protected]> Co-authored-by: Eilon Lipton <[email protected]>