使用单声道

时间:2018-12-05 09:16:43

标签: c# .net linux mono

我正在处理一个具有很多依赖项的相当复杂的项目。在我的Debian 9安装中使用旧的Mono(Xamarin是4.8,从Xamarin进行升级时,可惜当时无法进行升级)时,当我尝试运行应用程序的可执行文件时,出现以下错误(我排除了与问题):

Mono: Assembly Loader probing location: '/home/test/Application/Microsoft.Extensions.DependencyInjection.Abstractions.dll'.
Mono: Image addref Microsoft.Extensions.DependencyInjection.Abstractions[0xa3d4aa0] -> /home/test/Application/Microsoft.Extensions.DependencyInjection.Abstractions.dll[0xa3d3ea0]: 2
Mono: Prepared to set up assembly 'Microsoft.Extensions.DependencyInjection.Abstractions' (/home/test/Application/Microsoft.Extensions.DependencyInjection.Abstractions.dll)
Mono: Assembly Microsoft.Extensions.DependencyInjection.Abstractions[0xa3d4aa0] added to domain Application.exe, ref_count=1
Mono: Assembly Loader loaded assembly from location: '/home/test/Application/Microsoft.Extensions.DependencyInjection.Abstractions.dll'.
Mono: Assembly Ref addref Microsoft.Extensions.DependencyInjection[0xa3d0f58] -> Microsoft.Extensions.DependencyInjection.Abstractions[0xa3d4aa0]: 2
Mono: Assembly Loader probing location: '/home/test/Application/System.Runtime.dll'.
Mono: Assembly Ref addref Microsoft.Extensions.DependencyInjection.Abstractions[0xa3d4aa0] -> System.Runtime[0xa3d2160]: 3
Mono: Assembly Loader probing location: '/usr/lib/mono/gac/System.Collections/4.0.0.0__b03f5f7f11d50a3a/System.Collections.dll'.
Mono: Assembly Loader probing location: '/usr/lib/System.Collections.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mono/4.5//Facades/System.Collections.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mono/gac/System.Collections/4.0.0.0__b03f5f7f11d50a3a/System.Collections.exe'.
Mono: Assembly Loader probing location: '/usr/lib/System.Collections.exe'.
Mono: Assembly Loader probing location: '/usr/lib/mono/4.5//Facades/System.Collections.exe'.
Mono: Assembly Loader probing location: '/usr/lib/mono/gac/System.Collections/4.0.0.0__b03f5f7f11d50a3a/System.Collections.dll'.
Mono: Assembly Loader probing location: '/home/test/Application/System.Collections.dll'.
Mono: Assembly Loader probing location: '/usr/lib/System.Collections.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mono/4.5//Facades/System.Collections.dll'.
Mono: Assembly Loader probing location: '/usr/lib/mono/gac/System.Collections/4.0.0.0__b03f5f7f11d50a3a/System.Collections.exe'.
Mono: Assembly Loader probing location: '/home/test/Application/System.Collections.exe'.
Mono: Assembly Loader probing location: '/usr/lib/System.Collections.exe'.
Mono: Assembly Loader probing location: '/usr/lib/mono/4.5//Facades/System.Collections.exe'.
Mono: The following assembly referenced from /home/test/Application/Microsoft.Extensions.DependencyInjection.dll could not be loaded:
     Assembly:   System.Collections    (assemblyref_index=5)
     Version:    4.0.0.0
     Public Key: b03f5f7f11d50a3a
The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (/home/test/Application/).

Mono: Failed to load assembly Microsoft.Extensions.DependencyInjection[0xa3d0f58]


Unhandled Exception:
System.TypeLoadException: Could not load type 'Microsoft.Extensions.DependencyInjection.ServiceCollection' from assembly 'Microsoft.Extensions.DependencyInjection, Version=1.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not load type 'Microsoft.Extensions.DependencyInjection.ServiceCollection' from assembly 'Microsoft.Extensions.DependencyInjection, Version=1.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.

我通过使用以下命令运行应用程序来获得此输出

MONO_LOG_LEVEL=debug MONO_LOG_MASK=asm mono Application.exe

我看到的是程序集加载器正在尝试加载DependencyInjection,该文件也存在于我的可执行文件所在的目录中。我使用 dotPeek 分解了 Microsoft.Extension.DependencyInjection.dll ,实际上其中存在System.Collection

enter image description here

我已经查看了/usr/lib(包括mono文件夹)的内部,但是找不到任何System.Collections.dll,Windows上存在.v-slot{ margin-right:5px; } .v-slot.tradeMatrixLayout{ margin-left:50px } ,并且应用程序在那儿运行得很好。

我已经尝试寻找所有Xamarin软件包,由于该版本的年代久远以及Xamarin确保在其存储库中不容易找到它的事实,事实证明这非常棘手。 该解决方案中的所有项目均以.NET 4.5.1为目标

我将尝试复制Windows版本并希望它能运行,但是仍然令我惊讶的是,找不到基本的东西。

0 个答案:

没有答案