dotnet / ILMerge

ILMerge is a static linker for .NET Assemblies.
MIT License
1.22k stars 168 forks source link

mixed mode assemblies #25

Open davidhunter22 opened 6 years ago

davidhunter22 commented 6 years ago

As far as I know ILMerge does not accept mixed mode assemblies, those containing unmanaged code. I have some assemblies created using C+/CLI and would like to merge them. I am wondering if extending ILMerge to handle assemblies like this is possible, even if there is only a single mixed mode assembly. I am happy to do the work for this if possible but would require some guidance, at present I am reading ECMA 335 and have downloaded and built ILMerge and am going to step through the existing code. However I don't want to spend too much time if this is simply not doable or would not be merged. If it is possible any pointers to things to read first would be gladly recieved.

mike-barnett commented 6 years ago

Yes, it doesn't know what to do with the C++ generated part of the assembly. I actually don't know if it is possible to add this functionality, but it would be great if you can figure it out. The main thing would be to understand how to modify references that are in the C++ part to metadata that is in the C# part and/or in other input assemblies. I don't know of any pointers to provide, but I'm happy to discuss it with you as you move forward.