-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
Description
when using powershell core to add-type like this:
$modulepath= Resolve-Path -path "$PSScriptRoot\lib\netstandard1.3\Rijndael256.dll"
add-type $modulepath
function Encrypt-Rijndael256{
param(
$key,
$plaintext
)
return [Rijndael256.Rijndael]::Encrypt($plaintext,$key,256)
}
function Decrypt-Rijndael256{
param(
$key,
$encryptText
)
return [Rijndael256.Rijndael]::Decrypt($encryptText,$key,256)
}
### i always got error like this.
add-type : (1) : Type or namespace definition, or end-of-file expected
(1) : >>> /home/yoke/Documents/PSPHPIPAM/functions/lib/netstandard1.3/Rijndael256.dll
At /home/yoke/Documents/PSPHPIPAM/functions/Rijndael256.core.ps1:3 char:1
+ add-type $modulepath
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (Microsoft.Power...peCompilerError:AddTypeCompilerError) [Add-Type], Exception
+ FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand
maybe the below link can show what's wrong there
here