gpt4 book ai didi

linux - .NET配置系统对带有MKBundle的Mono的依赖性

转载 作者:太空狗 更新时间:2023-10-29 11:17:32 30 4
gpt4 key购买 nike

我有一个在嵌入式Debian BeagleBone黑色系统上运行的应用程序。

我有一个设备已经安装了整个mono-complete和mono-devel软件包,以开发一切。

我有另一台设备,它只是我们在另一台BeagleBone黑色设备上的嵌入式debian安装镜像。这将是我们的目标系统。

在开发设备上,正常运行时,应用运行良好。

我使用以下命令行创建了该应用程序的 bundle 包:

mkbundle -o MyExe.exe --static --deps SourceExe.exe dll1.dll dll2.dll

这将创建一个可以在dev设备上正常运行的包。

当我尝试在目标开发设备上运行同一 bundle 包MyExe.exe时,它将开始运行并输出一些嵌入到其中的调试消息。

问题是当到达需要读取MyExe.exe.config文件的部分时。此配置文件中包含一个appSettings部分。

请记住,它在开发设备上运行良好,因此它或配置文件中没有固有的错误。

这是所有包含的程序集(注意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

我得到的异常是(您可能会忽略有关合成的部分。这只是错误的结果。主要问题是配置文件的appSettings部分遇到了麻烦。请记住,这在开发设备上有效。唯一的区别是dev设备具有完整的mono-complete和mono-devel):
[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

最佳答案

我找到了自己的问题的解决方案。与此问题相同:

Does mono application bundled with mkbundle use app.config?

关于linux - .NET配置系统对带有MKBundle的Mono的依赖性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42838559/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com