I have this problem:
in my test.dll I have a usercontrol with a button with an icon png, my test.exe contains the usercontrol in test.dll and everything works fine.
after I use a ilmerge to create testMerged.exe like this:
ilmerge /wildcards /t:winexe /out:$(TargetDir)testMerged.exe
$(TargetPath) $(TargetDir)test.dll
and the program works fine but the button doesn’t have the icon…. how can I solve this?
Here is how I got it to work:
Class Library
Set the button image using
this.button1.Image = global::ClassLibrary1.Properties.Resources.MyImage;
Win forms
Set the post Build action to
“c:\Program Files (x86)\Microsoft\ILMerge\ILMerge.exe” /t:winexe /targetPlatform:v2 /out:$(TargetDir)testMerged.exe $(TargetPath) $(TargetDir)ClassLibrary1.dll
Rebuild
My result:
[Not enough rep to post an image 🙁 ]