Closed furesoft closed 4 hours ago
You can load other assemblies through ModuleResolver.Load() or Resolve(), the assembly reference list will be automatically generated based on which members are referenced in the IR when saving the module.
Can you clarify on what you mean by module kind?
Sorry for delayed response, I missed this earlier
A dotnet assembly can be a dll, a windows executable or a console app.
I see. DistIL only supports generating .NET core modules and these are only in the form of Windows DLLs. The dotnet sdk can deploy an additional .exe for launching the runtime and DLL, which I believe is just patching a pre-built apphost.exe
.
I'm not sure that is in scope for DistIL since it seems like there would be some versioning complications, but I haven't looked deep at it.
How can I add other assemblies as reference to a module? And how can I set the module kind?