具有DataVisualization的WinForms不能在Mono中运行

时间:2018-10-26 20:42:33

标签: c# linux winforms msbuild

仅通过以下命令即可在Linux上构建使用C#开发的应用程序:

$ msbuild mySolution.sln

编译成功!但是,当我尝试使用Mono运行bin .exe时,我收到关于System.Windows.Forms.DataVisualization.Charting.Chart的错误消息(System.notImplementedException),即使.csproj曾经引用Windows.Forms [例如, (...) <Reference Include="System.Windows.Forms" />] 已安装单声道(完整)版本:

    Debug> mono --version
    Mono JIT compiler version 5.12.0.301 (tarball Wed Jul 25 15:43:48 UTC 2018)
    Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS:           __thread
    SIGSEGV:       altstack
    Notifications: epoll
    Architecture:  amd64
    Disabled:      none
    Misc:          softdebug 
    Interpreter:   yes
    LLVM:          supported, not enabled.
    GC:            sgen (concurrent by default)

输出错误听起来像这样:

    Debug> mono App.exe
    Unhandled Exception:
    System.NotImplementedException: The method or operation is not implemented.
     at System.Windows.Forms.DataVisualization.Charting.Chart.BeginInit ()
[0x00000] in :0 
    at App.Gui.StartForm.InitializeComponent () [0x00364] in :0 
    at App.Gui.StartForm..ctor () [0x0006f] in :0 
    at (wrapper remoting-invoke-with-check) App.Gui.StartForm..ctor()
    at App.Gui.StartForm.get_Main () [0x00007] in :0 
    at App.Program.Main () [0x0000b] in :0 
    [ERROR] FATAL UNHANDLED EXCEPTION: System.NotImplementedException: The method or operation is not implemented.
    at System.Windows.Forms.DataVisualization.Charting.Chart.BeginInit ()      [0x00000] in :0 
    at App.Gui.StartForm.InitializeComponent () [0x00364] in :0 
    at App.Gui.StartForm..ctor () [0x0006f] in :0 
    at (wrapper remoting-invoke-with-check) App.Gui.StartForm..ctor()
    at App.Gui.StartForm.get_Main () [0x00007] in :0 
    at App.Program.Main () [0x0000b] in :0

我该如何解决?

0 个答案:

没有答案