LoginSignup
5

More than 5 years have passed since last update.

CSharp開発環境をDebian(wheezy)に構築するやり方

Posted at
  1. 必要なパッケージをインストール

    % sudo aptitude install mono-devel
    新規インストール: 163 個と多いです。

  2. コードを書く

    echo 'using System;

    public class HelloWorld
    {
    static public void Main ()
    {
    Console.WriteLine ("Hello World");
    }
    }
    ' > HelloWorld.cs

  3. コンパイル

    % mono-csc HelloWorld.cs

  4. 実行

    % mono HelloWorld.exe
    Hello World

その他便利ツール

コンソール

% csharp
Mono C# Shell, type "help;" for help

Enter statements below.
csharp> Console.WriteLine("hello");
hello
csharp>

コンソール補完

% csharp
Mono C# Shell, type "help;" for help

Enter statements below.
csharp> Console.T
~~ TAB入力
Title TreatControlCAsInput
~~~~~~~~~~~~~~~~~~~~~~~~~~ 補完候補が表示!

感想

Linuxでも簡単にCSharpが開発できて便利ですね!

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5