Mono on MacOSX - “The runtime version supported by this application is unavailable.” v4.5

后端 未结 1 1167
伪装坚强ぢ
伪装坚强ぢ 2021-01-20 18:40

I have just installed Mono v4.0.4 on MACOSX 10.10.5 Yosemite. The installer package was: MonoFramework-MDK-4.0.4.4.macos10.xamarin.x86.pkg downloaded from http

1条回答
  •  说谎
    说谎 (楼主)
    2021-01-20 19:24

    mono --runtime=

    That option is to control the CLR runtime:

    CLR version .NET version
    1.0         1.0
    1.1         1.1
    2.0         2.0, 3.0, 3.5
    4           4, 4.5, 4.6
    

    If you disasm xsp4.exe you will see that it requires a host that can provide the CLR 4.0 runtime:

    ikdasm xsp4.exe | head -n 2
    
    // Metadata version: v4.0.30319
    

    Or via xCorFlags:

    >>corflags xsp4.exe
    
    Mono/.NET Framework CorFlags Conversion Tool.  Version  1.0.5643.36015
    Copyright (c) SushiHangover.  All rights reserved.
    
    Version   : v4.0.30319
    CLR Header: 2.5
    PE        : PE32
    CorFlags  : 0x9
    ILONLY    : 1
    32BITREQ  : 0
    32BITPREF : 0
    Signed    : 1
    

    Mono will auto-detect the runtime required by probing the CIL that it is loading, so there is no need to specify it unless you really need to force a different runtime version.

    FYI: Mono installs shell scripts for tools/utilities for xsp4 (and others) so you do not have to hand-type the paths:

    cat `which xsp4`
    
    #!/bin/sh
    exec /Library/Frameworks/Mono.framework/Versions/4.2.1/bin/mono $MONO_OPTIONS "/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/xsp4.exe" "$@"
    

    0 讨论(0)
提交回复
热议问题