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

Doesn't Auto-load in Compatibility Mode with Powershell 7/Core on Windows #34

Open
spfyyy opened this issue Jul 4, 2021 · 2 comments
Open

Comments

@spfyyy
Copy link

spfyyy commented Jul 4, 2021

I'd like to suggest adding some documentation, since this took me some time to figure out.

The Windows implementation for showing a notification requires Windows PowerShell, since I assume there is windows-specific UI code required to do that kind of thing. So this module can't be placed in the standard module locations for PowerShell 7/Core. It needs to be placed in C:\Windows\System32\WindowsPowerShell\v1.0\Modules. I think this should be spelled out, since the "cross-platform" description made me assume otherwise. This still doesn't get auto-loaded properly though, because the manifest says that this module works with Core. So PowerShell loads the module directly instead of using the compatibility layer.

In short: on Windows, this module needs to be downloaded to C:\Windows\System32\WindowsPowerShell\v1.0\Modules and the manifest file needs to be edited to remove Core from CompatiblePSEditions to work properly with PowerShell 7/Core. I could submit a PR with this added to the readme, but was wondering if maybe I misunderstand something and there could be a discussion on ways to improve this.

@spfyyy spfyyy changed the title Doesn't Auto-load with Powershell 7/Core on Windows Doesn't Auto-load in Compatibility Mode with Powershell 7/Core on Windows Jul 5, 2021
@Windos
Copy link
Owner

Windos commented Jul 7, 2021

I assume you're using PowerShell 7.1 (or above)?

That version broke a lot of WinRT stuff due to an upstream change in .NET 5.

This module should load in any version of PowerShell up through 7.0 one Windows, but will require an update to support 7.1 and above on Windows. Unfortunatly, my availability to sort out the update is limited at the moment.

If the Windows + PS7.1 usecase is required in the short to medium term, my suggestion would be to use BurntToast instead.

@spfyyy
Copy link
Author

spfyyy commented Jul 7, 2021

Ah, yes, I'm running 7.1.3.

I didn't realize it broke specifically with the newer versions. I have only very recently start playing with PowerShell.

BurntToast works great for me. I'll use that for now! Thanks a lot for the reply and the recommendation.

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

No branches or pull requests

2 participants