Combine DLLs into one

alfcen

Well-Known Member
Licensed User
Longtime User
Hi All,

ilmerge.exe does not like the device hardware.dll, throwing this exception in DOS mode:
Unresolved assembly reference not allowed: Microsoft.WindowsCE.Forms

Has anybody had the same experience?
 

alfcen

Well-Known Member
Licensed User
Longtime User
Thanks a lot, Erel,

we are getting closer. The merged dll containing solely device targeting dlls can now be created.

Last problem, when attempting to run the app on the device with the merged dll, I see an error:

Error loading program. File or assemby name 'System.Windows.Forms, Version=2.0.0.0..blah blah...or one of its dependencies, was not found.

Is there something like a Microsoft.Windows.Forms.dll that ilmerge is missing?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Follow these instructions and it should work:

1. Go to C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE
If it doesn't exist download and install .Net CF 2.0: http://www.microsoft.com/downloads/...2F-07B5-4A8C-8A44-B4E1B196D5C0&displaylang=en
2. Copy ILMerge.exe and your dll files to this folder.
3. Run ILMerge from this folder (do not include other dll files other than your dll files).

I recommend you to use Microsoft Power Toy - Open Command Here: http://download.microsoft.com/download/whistler/Install/2/WXP/EN-US/CmdHerePowertoySetup.exe
It really helps with such command line tools.
 

alfcen

Well-Known Member
Licensed User
Longtime User
Thanks so much, I will give it a try, Erel.
Would ilmerge.exe once in this location, also merge DLLs referenced to the desktop?
 

derez

Expert
Licensed User
Longtime User
Merging

Thanks Alfcen
Your program did the merging but for some reason the program, when running on the device, gets an error of not able to read this merged dll, and does not run.
I tried several times with the same result.
I merged GPS.dll, hardware.dll and SerialDevice.dll to Nivut.dll
All were in the same directory of the merger program.
:confused:
 

alfcen

Well-Known Member
Licensed User
Longtime User
Well, derez, I have tested a few but not all DLLs. Actually, I just attempted to merge serial2.dll and gps.dll. The resulting anjin.dll was accepted by the device but...

serial.InputString
and/or
GPS.GPSStream(x)

failed to respond.

Combining libraries doesn't seem to be that easy. Development continues in this theater of file dependencies.
 

derez

Expert
Licensed User
Longtime User
merging

I triend with gps and serialdevice - same problem.
I think that the problem in my case has something to do with the fact the my device has english & hebrew installed and I had experienced some problems with strings in textboxes that recieve and extra character at the beginning - may be the file name is corrupted and the system cannot find it.
 

alfcen

Well-Known Member
Licensed User
Longtime User
Hi Derez,
Please try the attached merged DLL, containing
GPS.dll, hardware.dll and SerialDevice.dll
 

Attachments

  • nivut.zip
    15.5 KB · Views: 425

alfcen

Well-Known Member
Licensed User
Longtime User
Hmm, I am using the attached combined DLL with one if my apps. The only difference being, it contains Serial2.dll
Please try.
 

Attachments

  • anjin_p.zip
    16.9 KB · Views: 367

royboyjoytoy2

New Member
The file "illink.zip" seems to be broken... Could someone with the original file post it as an attachment please? That would really be appreciated. ;)
 
Last edited:
Top