-
-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
Thank you for sharing this useful project.
I would like to know whether it is possible to use the westwind.script component in a .NET 4.x C# project to dynamically execute .NET 9 code.
My system environment:
- .NET 4.8.0 runtime
- .NET 9.0 runtime
By using the following code, I am able to execute .NET 9 code under PowerShell 5.1 (.NET 4.5).
pwsh -c {
$code = @'
using System;
public static class __cla
{
public static void __fun()
{
Console.WriteLine("hello from .NET9!");
}
}
'@
Add-Type -TypeDefinition $code -ReferencedAssemblies 'System.Console'
[__cla]::__fun()
}
Metadata
Metadata
Assignees
Labels
No labels