Closed rahadurr closed 1 year ago
Hi @rahadurr, the reason that doesn't work is ultimately due to a limitation in the underlying C# libraries that CSharpRepl uses.
However, there's an even better way: define the extension method directly in CSharpRepl, without the enclosing class:
Version
0.6.3
What happened?
When I try to implement an extension method it throws the following exception.
Environment:
.NET SDK: Version: 8.0.100-preview.5.23303.2 Commit: 3fe444af72
Runtime Environment: OS Name: Mac OS X OS Version: 13.4 OS Platform: Darwin RID: osx.13-arm64 Base Path: /usr/local/share/dotnet/sdk/8.0.100-preview.5.23303.2/
.NET workloads installed: There are no installed workloads to display.
Host: Version: 8.0.0-preview.5.23280.8 Architecture: arm64 Commit: bc78804f5d
.NET SDKs installed: 6.0.411 [/usr/local/share/dotnet/sdk] 7.0.305 [/usr/local/share/dotnet/sdk] 8.0.100-preview.5.23303.2 [/usr/local/share/dotnet/sdk]
.NET runtimes installed: Microsoft.AspNetCore.App 6.0.19 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.8 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 8.0.0-preview.5.23302.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.19 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.8 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 8.0.0-preview.5.23280.8 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]