GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Scripts generating WPF fail after upgrading to PowerShell 7.3.0-rc.1 · Issue #18414 · PowerShell/PowerShell

Scripts generating WPF fail after upgrading to PowerShell 7.3.0-rc.1 #18414

New issue
Copy link
New issue
Copy link
Closed
#18438
Closed
Scripts generating WPF fail after upgrading to PowerShell 7.3.0-rc.1#18414
#18438
Copy link
Labels
In-PRIndicates that a PR is out for the issueIndicates that a PR is out for the issueIssue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.The issue is fixed.

Description

@wi-fr
Willi Fritz (wi-fr)
opened on Oct 29, 2022
Issue body actions

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

Scripts generating WPF that had work on all PowerShell versions, including the PowerShell 7.3.0 Previews, fail after upgrading to PowerShell 7.3.0-rc.1.

Expected behavior

PS> [System.Windows.Window]::new().ShowDialog()

WPF Window pops up

Actual behavior

PS> [System.Windows.Window]::new().ShowDialog()

MethodInvocationException: Exception calling "ShowDialog" with "0" argument(s): "Unable to load DLL 'PenIMC_cor3.dll' or one of its dependencies: The specified module could not be found. (0x8007007E)"

Error details

PS> Get-Error

Exception             : 
    Type           : System.Management.Automation.MethodInvocationException
    ErrorRecord    : 
        Exception             : 
            Type    : System.Management.Automation.ParentContainsErrorRecordException
            Message : Exception calling "ShowDialog" with "0" argument(s): "Unable to load DLL      
'PenIMC_cor3.dll' or one of its dependencies: The specified module could not be found. (0x8007007E)"
            HResult : -2146233087
        CategoryInfo          : NotSpecified: (:) [], ParentContainsErrorRecordException
        FullyQualifiedErrorId : DllNotFoundException
        InvocationInfo        : 
            ScriptLineNumber : 1
            OffsetInLine     : 2
            HistoryId        : -1
            Line             :  [System.Windows.Window]::new().ShowDialog()
            PositionMessage  : At line:1 char:2
                               +  [System.Windows.Window]::new().ShowDialog()
                               +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            CommandOrigin    : Internal
        ScriptStackTrace      : at <ScriptBlock>, <No file>: line 1
    TargetSite     : 
        Name          : ConvertToMethodInvocationException
        DeclaringType : System.Management.Automation.ExceptionHandlingOps, 
System.Management.Automation, Version=7.3.0.101, Culture=neutral, PublicKeyToken=31bf3856ad364e35   
        MemberType    : Method
        Module        : System.Management.Automation.dll
    Message        : Exception calling "ShowDialog" with "0" argument(s): "Unable to load DLL       
'PenIMC_cor3.dll' or one of its dependencies: The specified module could not be found. (0x8007007E)"
    Data           : System.Collections.ListDictionaryInternal
    InnerException : 
        Type       : System.DllNotFoundException
        Message    : Unable to load DLL 'PenIMC_cor3.dll' or one of its dependencies: The specified 
module could not be found. (0x8007007E)
        TargetSite : 
            Name          : CreateResetEvent
            DeclaringType : MS.Win32.Penimc.UnsafeNativeMethods, PresentationCore, Version=7.0.0.0, 
Culture=neutral, PublicKeyToken=31bf3856ad364e35
            MemberType    : Method
            Module        : PresentationCore.dll
        Source     : PresentationCore
        HResult    : -2146233052
        StackTrace : 
   at MS.Win32.Penimc.UnsafeNativeMethods.CreateResetEvent(IntPtr& handle)
   at System.Windows.Input.PenThreadWorker..ctor()
   at System.Windows.Input.PenThreadPool.GetPenThreadForPenContextHelper(PenContext penContext)       
   at System.Windows.Input.StylusWisp.WispTabletDeviceCollection.UpdateTabletsImpl()
   at System.Windows.Input.StylusWisp.WispTabletDeviceCollection.UpdateTablets()
   at System.Windows.Input.StylusWisp.WispTabletDeviceCollection..ctor()
   at System.Windows.Input.StylusWisp.WispLogic.get_WispTabletDevices()
   at System.Windows.Input.StylusWisp.WispLogic.RegisterHwndForInput(InputManager inputManager,       
PresentationSource inputSource)
   at System.Windows.Interop.HwndStylusInputProvider..ctor(HwndSource source)
   at System.Windows.Interop.HwndSource.Initialize(HwndSourceParameters parameters)
   at System.Windows.Window.CreateSourceWindow(Boolean duringShow)
   at System.Windows.Window.ShowHelper(Object booleanBox)
   at System.Windows.Window.Show()
   at System.Windows.Window.ShowDialog()
   at CallSite.Target(Closure, CallSite, Object)
    Source         : System.Management.Automation
    HResult        : -2146233087
    StackTrace     : 
   at System.Management.Automation.ExceptionHandlingOps.ConvertToMethodInvocationException(Exception  
exception, Type typeToThrow, String methodName, Int32 numArgs, MemberInfo memberInfo)
   at CallSite.Target(Closure, CallSite, Object)
   at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
   at System.Management.Automation.Interpreter.DynamicInstruction`2.Run(InterpretedFrame frame)       
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame   
frame)
CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
FullyQualifiedErrorId : DllNotFoundException
InvocationInfo        : 
    ScriptLineNumber : 1
    OffsetInLine     : 2
    HistoryId        : -1
    Line             :  [System.Windows.Window]::new().ShowDialog()
    PositionMessage  : At line:1 char:2
                       +  [System.Windows.Window]::new().ShowDialog()
                       +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    CommandOrigin    : Internal
ScriptStackTrace      : at <ScriptBlock>, <No file>: line 1

Environment data

PS> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.3.0-rc.1
PSEdition                      Core
GitCommitId                    7.3.0-rc.1
OS                             Microsoft Windows 10.0.19044
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}       
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

Reacted by Jeff Belina

Activity

  1. Willi Fritz (wi-fr)
    added
    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.
    on Oct 29, 2022
  2. ALIENQuake commented on Oct 30, 2022

    @ALIENQuake
    ALIENQuake
    on Oct 30, 2022
    More actions

    Willi Fritz (@wi-fr) Hi,
    see #18414 (comment)

    I cannot reproduce the problem, PowerShell updated to 7.3.0-rc.1:

    using namespace System.Diagnostics
    using namespace System.Windows
    using namespace System.Windows.Controls
    using namespace System.Windows.Threading
    using namespace WindowsBase
    
    $wpfTypes = Add-Type -AssemblyName PresentationFramework -PassThru
    $windowsBaseTypes = Add-Type -AssemblyName WindowsBase -PassThru 
    $windowsBaseAssembly = $windowsBaseTypes[0].Assembly.Location
    $wpfAssembly = $wpfTypes[0].Assembly.Location
    $presentationCoreTypes = Add-Type -AssemblyName PresentationCore -PassThru
    $presentationCoreAssembly = $presentationCoreTypes[0].Assembly.Location
    $systemXamlTypes = Add-Type -AssemblyName System.Xaml -PassThru
    $systemXamlAssembly = $systemXamlTypes[0].Assembly.Location
    [System.Windows.Window]::new().ShowDialog()
    

    image

  3. MartinGC94 commented on Oct 31, 2022

    @MartinGC94
    MartinGC94
    on Oct 31, 2022
    Contributor
    More actions

    This reproduces on my Surface pro 8 but not my desktop PC. Judging by the dll name you probably need a pen compatible PC to trigger this error. It also happens when you use the built in GUI related commands (Show-Command, Get-Help -ShowWindow, etc.)

  4. SteveL-MSFT commented on Oct 31, 2022

    @SteveL-MSFT
    Steve Lee (SteveL-MSFT)
    on Oct 31, 2022
    Member
    More actions

    Aditya Patwardhan (@adityapatwardhan) we should follow-up with the .NET team on how to resolve this issue

  5. Steve Lee (SteveL-MSFT)
    added
    Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the product
    on Oct 31, 2022
  6. adityapatwardhan commented on Oct 31, 2022

    @adityapatwardhan
    Aditya Patwardhan (adityapatwardhan)
    on Oct 31, 2022
    Member
    More actions

    Willi Fritz (@wi-fr) MartinGC94 - which package did you install for RC1? MSI / Zip? If zip which one?

  7. daxian-dbw commented on Nov 1, 2022

    @daxian-dbw
    Dongbo Wang (daxian-dbw)
    on Nov 1, 2022
    Member
    More actions

    I'm able to reproduce this on my Surface 7 pro. I think this will reproduce on all Windows devices that support touch screen.
    My installation was using x64 MSI package.

  8. MartinGC94 commented on Nov 1, 2022

    @MartinGC94
    MartinGC94
    on Nov 1, 2022
    Contributor
    More actions

    I'm also using the x64 MSI package.

  9. ALIENQuake commented on Nov 1, 2022

    @ALIENQuake
    ALIENQuake
    on Nov 1, 2022
    More actions

    I also was able to reproduce this on my Surface Pro using the x64 MSI package. It works using 'PowerShell-7.3.0-rc.1-win-fxdependentWinDesktop' package with the installed required NET 7 RC2.

  10. wi-fr commented on Nov 1, 2022

    @wi-fr
    Willi Fritz (wi-fr)
    on Nov 1, 2022
    Author
    More actions

    MartinGC94 I installed the Store version of RC1 on a Desktop PC. This PC is not pen compatible.

  11. wi-fr commented on Nov 1, 2022

    @wi-fr
    Willi Fritz (wi-fr)
    on Nov 1, 2022
    Author
    More actions

    Aditya Patwardhan (@adityapatwardhan), it is at least an issue with the store version of RC1:
    C:\Program Files\WindowsApps\Microsoft.PowerShellPreview_7.3.101.0_x64__8wekyb3d8bbwe

  12. adityapatwardhan commented on Nov 1, 2022

    @adityapatwardhan
    Aditya Patwardhan (adityapatwardhan)
    on Nov 1, 2022
    Member
    More actions

    Thanks for confirming.

  13. iSazonov commented on Nov 2, 2022

    @iSazonov
    Ilya (iSazonov)
    on Nov 2, 2022
    Collaborator
    More actions

    Fixed in #18438

  14. Ilya (iSazonov)
    added
    Resolution-FixedThe issue is fixed.The issue is fixed.
    on Nov 2, 2022
  15. daxian-dbw commented on Nov 2, 2022

    @daxian-dbw
    Dongbo Wang (daxian-dbw)
    on Nov 2, 2022
    Member
    More actions

    Yes, I have verified the private bits produced by the CI of #18438 on my Surface Pro 7.

  16. Dongbo Wang (daxian-dbw)
    closed this as completedon Nov 2, 2022
  17. ghost removed
    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.
    on Nov 2, 2022
  18. microsoft-github-policy-service
    added
    In-PRIndicates that a PR is out for the issueIndicates that a PR is out for the issue
    on Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    In-PRIndicates that a PR is out for the issueIndicates that a PR is out for the issueIssue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.The issue is fixed.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.