All of the related code can be found here:
https://www.advancedhmi.com/forum/index.php?topic=2567.0The idea behind this is to create a standalone executable file, which can be placed even on the desktop, without thinking of where all the required dll files are. Not recommended for AdvancedHMI solution since you can break something.
This idea could be described with these steps:
1) Add dll files as existing items to the project's Resources under Files (see the attached picture as an example of how to get there)
2) Add a reference to each of these dll files now located in the "Resources" folder
3) For each of these newly created references, set the Copy Local property to False
4) Resolve and load these assemblies with the handler added to the ApplicationEvents.vb file for VB and to the Program.cs file for C#
Step 3) is kind of optional since it doesn't affect the resulting exe file being standalone (if the Copy Local is set to True, it will only copy those dll files to the Debug folder but the exe file can be moved or copied to a different location all by itself).
This works but there might be a better way of doing this.
The example code, from the link mentioned above, has 3 dll files handled this way - Modbus.dll, log4net.dll and Unme.Common.dll.