0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Rider 2026.1から、Riderがfile-based C# appsに対応しそう

0
Last updated at Posted at 2026-02-14

Rider 2026.1から、Riderがfile-based C# appsに対応しそうです。

本稿初版の2026/02/15(日)段階では、上に示した該当IssueのStateが「Verified」、Available inが「Rider 2026.1 EAP 4」になっていました。そして「Rider 2026.1 EAP 4」以降バージョンのRiderで、file-based C# appsの開発が可能になりました。

※ 以下、本投稿に示すスクリーンショットや挙動、「Rider 2026.1 EAP 8」のものです。

利用例を示します。次のような「filebase_app.cs」というC#ファイルを用意します。

var person = new Person("John", "Doe");

Console.WriteLine($"Hello, {person}! It is {DateTime.Now}, now.");

public readonly record struct Person(string FirstName, string LastName)
{
    public override string ToString()
    {
        return $"{FirstName} {LastName}";
    }
}

Riderで「filebase_app.cs」を開きます。

スクリーンショット 2026-03-16 1.14.58.png

ガターに実行アイコンが表示されます。実行アイコンを押し、「Create and Run 'Run firebase_app'」を選択します。

スクリーンショット 2026-03-16 1.15.38.png

そうすると、実行されます。次に示すようにRunウィンドウに実行結果が表示されます。

スクリーンショット 2026-03-16 1.16.03.png

通常のプロジェクト中のコードと同じように、ブレークポイントを用いたデバッグも可能です。

スクリーンショット 2026-03-16 1.20.33.png

当然、コード補間、コードジャンプ、リファクタリングなどRider・JetBrains IDEの便利な機能を用いた開発が可能です。

また、コマンドライン引数を渡すには、.NET File向けのconfiguratonを作成し、Program argumentsにコマンドライン引数を渡したい文字列を設定し

スクリーンショット 2026-03-16 1.23.12.png

作成したconfigurationを指定し、実行することで渡すことができます。

 スクリーンショット 2026-03-16 1.28.10.png

また、「#:package」や「#:sdk」などのディレクティブもサポートされています。file-based C# appsについて、詳しくは次の記事を参照してください。


ちょっとしたコードをさっと書きたい場合、file-based C# appsはとても便利です。

使い慣れているとてもRiderが「file-based C# apps」をサポートしたことがとても嬉しいです。

0
0
0

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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?