I have an app that I am running on an embedded Debian BeagleBone black system.
I have one of my devices that I have installed the entire mono-complete and mono-devel packages to develop everything.
I have another device that is just our stock embedded debian installation image on another BeagleBone black device. This will be our target system.
On the dev device the app runs great when run normally.
I created a bundle of the app using this command line:
mkbundle -o MyExe.exe --static --deps SourceExe.exe dll1.dll dll2.dll
This creates a bundle that runs on the dev device just fine.
When I try to run the same bundle MyExe.exe on my target dev device is starts to run and outputs some debug messages that I embedded into it.
The problem is when it gets to a part that needs to read the MyExe.exe.config file. This config file has an appSettings section in it.
Remember that it runs fine on the dev device, so there isn't an inherent bug in it or the config file.
Here are all the assemblies that get included (notice System.Configuration.dll):
embedding: /usr/lib/mono/4.5/mscorlib.dll
embedding: /usr/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll
embedding: /usr/lib/mono/gac/Mono.Security/4.0.0.0__0738eb9f132ed756/Mono.Security.dll
embedding: /usr/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
embedding: /usr/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll
embedding: /usr/lib/mono/gac/System.Security/4.0.0.0__b03f5f7f11d50a3a/System.Security.dll
embedding: /usr/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll
embedding: /usr/lib/mono/gac/Mono.Posix/4.0.0.0__0738eb9f132ed756/Mono.Posix.dll
embedding: /usr/lib/mono/gac/System.Xml.Linq/4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll
embedding: /usr/lib/mono/gac/System.Runtime.Serialization/4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
embedding: /usr/lib/mono/gac/System.ServiceModel.Internals/0.0.0.0__b77a5c561934e089/System.ServiceModel.Internals.dll
embedding: /usr/lib/mono/gac/Microsoft.CSharp/4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll
embedding: /usr/lib/mono/gac/Mono.CSharp/4.0.0.0__0738eb9f132ed756/Mono.CSharp.dll
embedding: /usr/lib/mono/gac/System.ComponentModel.Composition/4.0.0.0__b77a5c561934e089/System.ComponentModel.Composition.dll
embedding: /home/diablosp/ign/PowerteqDeviceUpdate.dll
embedding: /usr/lib/mono/gac/System.ServiceModel/4.0.0.0__b77a5c561934e089/System.ServiceModel.dll
embedding: /usr/lib/mono/gac/System.Messaging/4.0.0.0__b03f5f7f11d50a3a/System.Messaging.dll
embedding: /usr/lib/mono/gac/Mono.Messaging/4.0.0.0__0738eb9f132ed756/Mono.Messaging.dll
embedding: /usr/lib/mono/gac/System.Configuration.Install/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.Install.dll
embedding: /usr/lib/mono/gac/System.Windows.Forms/4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
config from: /usr/lib/mono/gac/System.Windows.Forms/4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.config
embedding: /usr/lib/mono/gac/System.Drawing/4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
config from: /usr/lib/mono/gac/System.Drawing/4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll.config
embedding: /usr/lib/mono/gac/Mono.WebBrowser/4.0.0.0__0738eb9f132ed756/Mono.WebBrowser.dll
config from: /usr/lib/mono/gac/Mono.WebBrowser/4.0.0.0__0738eb9f132ed756/Mono.WebBrowser.dll.config
embedding: /usr/lib/mono/gac/System.Runtime.Serialization.Formatters.Soap/4.0.0.0__b03f5f7f11d50a3a/System.Runtime.Serialization.Formatters.Soap.dll
embedding: /usr/lib/mono/gac/Accessibility/4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
embedding: /usr/lib/mono/gac/System.Data/4.0.0.0__b77a5c561934e089/System.Data.dll
config from: /usr/lib/mono/gac/System.Data/4.0.0.0__b77a5c561934e089/System.Data.dll.config
embedding: /usr/lib/mono/gac/System.Numerics/4.0.0.0__b77a5c561934e089/System.Numerics.dll
embedding: /usr/lib/mono/gac/System.Transactions/4.0.0.0__b77a5c561934e089/System.Transactions.dll
embedding: /usr/lib/mono/gac/Mono.Data.Tds/4.0.0.0__0738eb9f132ed756/Mono.Data.Tds.dll
embedding: /usr/lib/mono/gac/System.EnterpriseServices/4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
embedding: /usr/lib/mono/gac/System.Web/4.0.0.0__b03f5f7f11d50a3a/System.Web.dll
embedding: /usr/lib/mono/gac/System.Web.ApplicationServices/4.0.0.0__31bf3856ad364e35/System.Web.ApplicationServices.dll
embedding: /usr/lib/mono/gac/System.Web.Services/4.0.0.0__b03f5f7f11d50a3a/System.Web.Services.dll
embedding: /usr/lib/mono/gac/System.Design/4.0.0.0__b03f5f7f11d50a3a/System.Design.dll
embedding: /usr/lib/mono/gac/System.DirectoryServices/4.0.0.0__b03f5f7f11d50a3a/System.DirectoryServices.dll
embedding: /usr/lib/mono/gac/Novell.Directory.Ldap/4.0.0.0__0738eb9f132ed756/Novell.Directory.Ldap.dll
embedding: /usr/lib/mono/gac/Mono.Data.Sqlite/4.0.0.0__0738eb9f132ed756/Mono.Data.Sqlite.dll
embedding: /usr/lib/mono/gac/System.ComponentModel.DataAnnotations/4.0.0.0__31bf3856ad364e35/System.ComponentModel.DataAnnotations.dll
embedding: /usr/lib/mono/gac/System.IdentityModel/4.0.0.0__b77a5c561934e089/System.IdentityModel.dll
embedding: /usr/lib/mono/gac/System.ServiceModel.Activation/4.0.0.0__31bf3856ad364e35/System.ServiceModel.Activation.dll
embedding: /usr/lib/mono/gac/System.IdentityModel.Selectors/4.0.0.0__b77a5c561934e089/System.IdentityModel.Selectors.dll
The exception I get is (you can probably ignore the parts about composition. that is just the result of the error. The main problem is that it is having trouble with the appSettings section of the configuration file. Remember this works on the development device. The only difference is the dev device has full mono-complete and mono-devel on it):
[ERROR] FATAL UNHANDLED EXCEPTION: System.ComponentModel.Composition.CompositionException: The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.
1) Unrecognized configuration section <appSettings> (/home/diablosp/ign/Ignition.CommandLine.exe.config line 3)
Resulting in: Error Initializing the configuration system.
Resulting in: An exception occurred while trying to create an instance of type 'NonWindowsCommon.BasicLog'.
Resulting in: Cannot activate part 'NonWindowsCommon.BasicLog'.
Element: NonWindowsCommon.BasicLog --> NonWindowsCommon.BasicLog --> DirectoryCatalog (Path="/home/diablosp/ign/")
Resulting in: Cannot get export 'NonWindowsCommon.BasicLog (ContractName="Common.Interfaces.ILog")' from part 'NonWindowsCommon.BasicLog'.
Element: NonWindowsCommon.BasicLog (ContractName="Common.Interfaces.ILog") --> NonWindowsCommon.BasicLog --> DirectoryCatalog (Path="/home/diablosp/ign/")
at System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart (System.ComponentModel.Composition.Hosting.ImportEngine engine, System.ComponentModel.Composition.Primitives.ComposablePart part, System.ComponentModel.Composition.Primitives.ExportDefinition definition) [0x0001b] in <0007e672dd7f4959adc6f8103d9c843f>:0
at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportedValue (System.ComponentModel.Composition.Hosting.CatalogExportProvider+CatalogPart part, System.ComponentModel.Composition.Primitives.ExportDefinition export, System.Boolean isSharedPart) [0x00034] in <0007e672dd7f4959adc6f8103d9c843f>:0
at System.ComponentModel.Composition.Hosting.CatalogExportProvider+CatalogExport.GetExportedValueCore () [0x00018] in <0007e672dd7f4959adc6f8103d9c843f>:0
at System.ComponentModel.Composition.Primitives.Export.get_Value () [0x00012] in <0007e672dd7f4959adc6f8103d9c843f>:0
at NonWindowsCommon.MefDI.One (System.Type t) [0x00029] in <c227ad8f1c41442389e89c655163f0ce>:0
at NonWindowsCommon.MefDI.One[T] () [0x0002a] in <c227ad8f1c41442389e89c655163f0ce>:0
at Ignition.CommandLine.Program.Configure () [0x000b1] in <6b59edb08c7748fd97fda94a23fc9e1c>:0
at Ignition.CommandLine.Program..ctor () [0x00012] in <6b59edb08c7748fd97fda94a23fc9e1c>:0
at Ignition.CommandLine.Program.Main (System.String[] args) [0x00001] in <6b59edb08c7748fd97fda94a23fc9e1c>:0