Closed Davider-code closed 1 year ago
The problem is caused (most likely) by not having CS-Script NuGet packages imported. Please see the #7 answer.
I am kinda puzzled. You are using a script engine (PS) to run another script engine (CS-Script).
Why don't you just run C# scripts directly from your shell/terminal with the CS-Script engine?
I am kinda puzzled. You are using a script engine (PS) to run another script engine (CS-Script).
Why don't you just run C# scripts directly from your shell/terminal with the CS-Script engine?
Thank you for your reply . I manually downloaded the two missing DLL files from nuget.org and now load the DLL normally
. My main function code is in Powershell scripts. Sometimes, when implementing a certain function, there is ready-made C # function code, and I want to execute it immediately in Powershell code.
I am not proficient in C # programming, and using CS-Script can directly use C # code in Powershell, which is a great experience for Powershell users
Glad you solved it
hello,
I tried to load CSScriptLibrary.dll in powershell, but it will be prompted with the following error: appears to be missing Mono related assemblies. Can disable loading them on the Windows platform? Or are there any other solutions? Thanks in advance
system: windows7 x64 + powershell5.1 + .NET4.8
powershell code:
Error info: Could not load file or assembly 'Mono.Posix, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the specified file Could not load file or assembly 'Mono.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the specified file