You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(n.b. not sure if current releases are meant to drop support for Windows PowerShell?)
The latest release uses a syntax on Join-Path that won't work in Windows PowerShell, and and automatic variable that also doesn't exist in Windows PowerShell.
Trying to import the module results in:
Join-Path : A positional parameter cannot be found that accepts argument 'SkiaSharp.dll'.
At C:\Users\Windos\Documents\WindowsPowerShell\Modules\pswordcloud\2.0.1\PSWordCloud.psm1:13 char:16
+ ... iaDllPath = Join-Path -Path $PSScriptRoot -ChildPath $PlatformFolder ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Join-Path], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.JoinPathCommand
Add-Type : Cannot bind argument to parameter 'Path' because it is null.
At C:\Users\Windos\Documents\WindowsPowerShell\Modules\pswordcloud\2.0.1\PSWordCloud.psm1:15 char:16
+ Add-Type -Path $SkiaDllPath
+ ~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Add-Type], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.AddTypeCommand
Import-Module : Could not load file or assembly 'SkiaSharp, Version=1.68.0.0, Culture=neutral,
PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified.
At C:\Users\Windos\Documents\WindowsPowerShell\Modules\pswordcloud\2.0.1\PSWordCloud.psm1:16 char:1
+ Import-Module "$PSScriptRoot\PSWordCloudCmdlet.dll"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Import-Module], FileNotFoundException
+ FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand
Possible fixes are to change the child path to "$PlatformFolder\SkiaSharp.dll"or two swap outJoin-Pathfor[http://System.IO .Path]::Combine()`
However, this change highlights a second issue, the switch statement for Platform Folder selection relies on PowerShell Core as $IsWindows isn't a thing in Windows PowerShell.
Add-Type : Cannot bind parameter 'Path' to the target. Exception setting "Path": "Cannot find path
'C:\Users\Windos\Documents\WindowsPowerShell\Modules\pswordcloud\2.0.1\SkiaSharp.dll' because it does not exist."
At C:\Users\Windos\Documents\WindowsPowerShell\Modules\pswordcloud\2.0.1\PSWordCloud.psm1:15 char:16
+ Add-Type -Path $SkiaDllPath
+ ~~~~~~~~~~~~
+ CategoryInfo : WriteError: (:) [Add-Type], ParameterBindingException
+ FullyQualifiedErrorId : ParameterBindingFailed,Microsoft.PowerShell.Commands.AddTypeCommand
Import-Module : Could not load file or assembly 'SkiaSharp, Version=1.68.0.0, Culture=neutral,
PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified.
At C:\Users\Windos\Documents\WindowsPowerShell\Modules\pswordcloud\2.0.1\PSWordCloud.psm1:16 char:1
+ Import-Module "$PSScriptRoot\PSWordCloudCmdlet.dll"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Import-Module], FileNotFoundException
+ FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand
How we dealt with this in PoshNotify is putting the Windows PowerShell specific stuff in a "default" stanza (even though it duplicates the "IsWindows" stanza) so that we can do specific stuff for that platform in future if required.
The text was updated successfully, but these errors were encountered:
I had originally planned to just drop support for Windows PowerShell anyway, but later decided there wasn't a compelling reason to do so just yet. It's a tempting thought still and might happen eventually, but for now I figure I may as well support it.
Thank you for the detailed analysis; feel free to submit a PR if you'd like, but if you don't have time I can take care of it in the next few days. 😄
(n.b. not sure if current releases are meant to drop support for Windows PowerShell?)
The latest release uses a syntax on
Join-Path
that won't work in Windows PowerShell, and and automatic variable that also doesn't exist in Windows PowerShell.Trying to import the module results in:
This is coming from this line in the psm1 file:
Possible fixes are to change the child path to "$PlatformFolder\SkiaSharp.dll"
or two swap out
Join-Pathfor
[http://System.IO .Path]::Combine()`However, this change highlights a second issue, the switch statement for Platform Folder selection relies on PowerShell Core as
$IsWindows
isn't a thing in Windows PowerShell.How we dealt with this in PoshNotify is putting the Windows PowerShell specific stuff in a "default" stanza (even though it duplicates the "IsWindows" stanza) so that we can do specific stuff for that platform in future if required.
The text was updated successfully, but these errors were encountered: