Closed Davider-code closed 1 year ago
This repository contains the latest (even though discontinued) version of CS-Script for .NET Framework.
Problems with the conversion of C# code to PS are beyond this project's scope so I suggest you check that your solution works when implemented in C# and then try to convert it to PS.
Building the solution in C# is easy. Create a console app project and add the last .NET Framework targeting CS-Script package v3.30.5.1. Add your code and that's it.
You can also patch (if you really want) CS-SCript binaries manually by replacing the CS-Script DLLs. I have attached the sample project for you.
Thank you for your reply. I don't understand the above C # project file.
In the powershell, I can call the static functions in the DLL file, or create an instance object and then call the methods and properties of the object
I am using many third-party. NET DLL class libraries. They are very successful in loading DLLs, calling methods, properties, etc.
I don't know why there are various problems when calling CSScript DLLs. Maybe I did something wrong?
It looks like you solved it in #6
hello, I tried to convert the following code in the chm document into powershell code, but I received an error message
ERROR: Method invocation failed because [CSScriptLibrary.RoslynEvaluator] does not contain a method named ''.
Is the document outdated? Is there any other solution? Thank you in advance
system: window7 x64 powershell5.1 .NET4.8
.chm code:
Powershell code: