Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

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

ShowModalMessageExternal problem with PowerShell #4101

Open
SirConfigMgr opened this issue May 5, 2021 · 2 comments
Open

ShowModalMessageExternal problem with PowerShell #4101

SirConfigMgr opened this issue May 5, 2021 · 2 comments
Labels

Comments

@SirConfigMgr
Copy link

Describe the bug

I´m using Powershell with MahApps to display a GUI for the PS script.
After migrating from version 1.6.5 to 2.4.5, the display of dialogs no longer works. I get an exception with

"The calling thread cannot access this object because the object is owned by another thread."

Steps to reproduce

A description of how to trigger this bug.

  1. Klick button
  2. Dialog should be displayed
  3. Powershell crashes

Github repository: https://github.com/SirConfigMgr/InplaceNotification
UserInfo.ps1 in Line 459

Expected behavior

Dialog should be displayed

Actual behavior

Powershell crashes

Environment

MahApps.Metro version: v2.4.5
Windows build number: Win10 1909 [Version 10.0.18363.836]
Visual Studio: 2019 16.6.0
Target Framework: .Net Core 3.1 (v4.5.2, v4.7.2)
@pschwab1
Copy link

Still having this issue in version 2.4.9 and with PowerShell 7.0.

@KG-droid
Copy link

I'm having this issue to, oddly only when run via the powershell ISE though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants