dotnet / ILMerge

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

Support for .NET Core #23

Open rodrigovidal opened 7 years ago

rodrigovidal commented 7 years ago

Do you have a plan to support NETCore?

jnm2 commented 7 years ago

Similar: https://github.com/Microsoft/ILMerge/issues/16

miaodadao commented 6 years ago

dotnet publish ... will output too many dll's, and no sensible "exe" to run. Users have to type dotnet some.dll on each platform every time. Maybe combine these dll's into one exe and +x will be an awesome feature.

jnm2 commented 6 years ago

@miaodadao see https://github.com/dotnet/corefx/issues/13329#issuecomment-322494078

matthiashenkel commented 3 years ago

Will ILMerge ever be able to support .NET Core? Is .NET Standard supported at least?

PathogenDavid commented 3 years ago

ILMerge appears to work just fine on a .NET 5.0 console app and two .NET Standard 2.0 class libraries in my brief test:

image

(Unmerged on the left, merged on the right. Note the lack of LibraryA and LibraryB on the merged one.)

People should probably quantify what they mean by "support". Do you want the tool to run under the .NET Core runtime? Do you want portable PDB support? Is it failing in situations where something similar worked in .NET Framework? Does it fail when newer runtime features are used in the assembly? (For the latter two: Can you make a minimal repro?)

AndrewSav commented 3 years ago

@PathogenDavid: https://github.com/dotnet/ILMerge/blob/master/ilmerge-manual.md#221-settargetplatform

matthiashenkel commented 3 years ago

I'm sorry for not being specific enough. I wanted to ask whether there will ever be official support in ILMerge for merging .NET Core or .NET Standard dlls. I understand that it "might work" and "does work" in certain cases, but I couldn't find a statement that it is "supposed to work" in all cases. The only valid target platforms according to the documentation are v1, v1.1, v2, and v4 (see previous comment), which - among other reasons - led me to believe that merging .NET Core or .NET Standard dlls is not officially supported by ILMerge.