monodevelop无法执行项目

Sae*_*iba 1 c# debian monodevelop

我已经安装了monodevelop并在C#console中编写了一个hello world程序但是在运行配置时我选择在外部控制台中运行复选框并单击运行按钮monodevelop说:无法执行"{Project Path}"

Os:Debian,Kali 2

编辑:和Console.ReadLine()在默认运行配置中不起作用.

屏幕商店添加了 屏幕截图

小智 9

我有同样的问题,这是我的解决方案.

操作系统:Linux Mint 18.1 Cinnamon 64-Bit

Monodevelop:6.1.2.44 flatpak安装

afaik MonoDevelop需要xterm或gnome-terminal才能在外部控制台中运行程序.如果两者都丢失,则会出现"无法执行..."错误.

MonoDevelop日志显示: ~/.var/app/com.xamarin.MonoDevelop/cache/MonoDevelop-6.0/Logs/Ide.log

ERROR [2017-01-10 19:47:49Z]: Cannot execute "/home/...exe"
System.InvalidOperationException: Cannot start process because a file name has not been provided.
Run Code Online (Sandbox Code Playgroud)

在我的情况下,我必须安装xterm并将其复制并且它依赖于flatpak运行时:

sudo apt-get install xterm
cp -v /usr/bin/xterm ~/.local/share/flatpak/runtime/org.freedesktop.Platform/x86_64/1.4/active/files/bin/
cp -v /usr/lib/x86_64-linux-gnu/libXaw* ~/.local/share/flatpak/runtime/org.freedesktop.Platform/x86_64/1.4/active/files/lib/
cp -v /usr/lib/x86_64-linux-gnu/libXmu* ~/.local/share/flatpak/runtime/org.freedesktop.Platform/x86_64/1.4/active/files/lib/
cp -v /usr/lib/x86_64-linux-gnu/libutempter* ~/.local/share/flatpak/runtime/org.freedesktop.Platform/x86_64/1.4/active/files/lib/
cp -v /lib/x86_64-linux-gnu/libpng12* ~/.local/share/flatpak/runtime/org.freedesktop.Platform/x86_64/1.4/active/files/lib/
cp -v /lib/x86_64-linux-gnu/libtinfo* ~/.local/share/flatpak/runtime/org.freedesktop.Platform/x86_64/1.4/active/files/lib/
Run Code Online (Sandbox Code Playgroud)

也许不是最好的解决方案,但它对我有用.


Rhs*_*Rhs 5

我找到了解决这个问题的几种方法:

1. 创建一个GTK 2.0项目,而不是创建控制台应用程序。例如:

using System;
using Gtk;

namespace Test
{
    class MainClass
    {
        public static void Main(string[] args)
        {
            /*Application.Init();
            MainWindow win = new MainWindow();
            win.Show();
            Application.Run(); */
            Console.WriteLine("Hello World");
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

在 中Application Output pad,您将看到“Hello World”。

  1. 安装mono-runtime( sudo apt-get install mono-runtime) 并进入bin/Debug/目录。在那里你会找到一个 .exe 文件,你可以简单地执行它./{{NameOfProject}}.exe


Tom*_*Tom 5

我在 Ubuntu 20.04 上遇到了这个问题(使用PPA的最新 monodevelop )

因为在 20.04 日,

gnome-terminal-server已从/usr/lib/gnome-terminal/移至/usr/libexec/

Monodevelop 需要更新来解决这个问题。

我的临时修复:

cd /usr/lib
sudo mkdir gnome-terminal
sudo ln -s /usr/libexec/gnome-terminal-server
Run Code Online (Sandbox Code Playgroud)