-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile to assembly on linux dotnet core? #351
Comments
At this time there is no support for compiling assemblies using .NET Core. There are some APIs relating to saving of assemblies that are missing from .NET Core. |
Ok, thanks.
Can an assembly be built from Windows, targetting .NET standard 2.0, and
then used on linux dotnet core? How would one build such an assembly using
the Windows tooling?
Thanks.
|
I'm not sure if this works, but you could try using |
Ok, I'll try that eventually, and report back my findings. Thanks! |
Reviving this... I've compiled a set of modules in IronPython hosted with net462, then I try to load them in a .NET Core 3.1 hosted IronPython, but no beans:
|
Unfortunately the |
Looks like there's some movement in the ability to save assemblies in .NET 8 dotnet/runtime#62956 In the meantime, is there any way one would be able to compile using NET4x but then run in .NET Core? Perhaps removing the use of types like This is a pretty big blocker for us to run precompiled ironpython modules and would appreciate any help here, or if someone could point us in the right direction where we might be able to make those changes. |
Unfortunately the |
Hey @slozier, thanks so much for the feedback. I'll explore the option of rewriting the assembly. When you say "under the hood", do you mean something in .NET Framework? What exactly is writing/generating that code? I wonder how that code would look if it was generated in .net core. 🤔 |
@cwensley Yeah, as far as I know, the Anyway, I did try some DLL hackery on a very simple example and managed to get something to run on .NET 6:
|
Thanks @slozier, that sounds very promising! At the very least we should be able to load precompiled python scripts when running in .NET Core by using something like Mono.Cecil to replace that type. Hopefully it's the only one. |
Hi,
How would I go about compiling a python source to a dotnet core assembly, using IronPython 2.7.8 on linux? I can't find any pyc.exe or pyc.py in the zipped release.
The text was updated successfully, but these errors were encountered: