コンテンツにスキップ

「.NET」の版間の差分

提供: ArchWiki
削除された内容 追加された内容
VS Code の OmniSharp 依存ライブラリ: 削除(英語版に記述なし)
インストール: 節を追加(英語版より)
13行目: 13行目:


{{Tip|{{ic|PATH}} に {{ic|~/.dotnet/tools}} を追加してください。追加しない場合は、 dotnetツールはシェルから使うことができません。}}
{{Tip|{{ic|PATH}} に {{ic|~/.dotnet/tools}} を追加してください。追加しない場合は、 dotnetツールはシェルから使うことができません。}}

=== Install multiple versions manually ===

You can install multiple versions of the .NET Core SDK or runtime side by side by using the [https://dot.net/v1/dotnet-install.sh dotnet-install.sh] script provided by the .NET Foundation. You can find the documentation of the script [https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script here].

For instance, this command would install the latest version found in the "current" channel in {{ic|/usr/share/dotnet}}:

# ./dotnet-install.sh --install-dir /usr/share/dotnet -channel Current -version latest

You may want to simulate the installation first by using the {{ic|-Dryrun}} flag.

Once installed, you can verify the SDKs available:

$ dotnet --list-sdks
2.2.108 [/usr/share/dotnet/sdk]
3.0.103 [/usr/share/dotnet/sdk]
$ dotnet --version
3.0.103

=== Install multiple versions via AUR ===

Some of the AUR dotnet packages are made to be installed alongside each other. Only one host package ({{aur|dotnet-host-bin}} or {{pkg|dotnet-host}}) is needed containing the command-line tool and you can install any of the available SDKs and Runtimes (latest packages of all major versions) next to it. List of compatible packages:

* {{aur|dotnet-host-bin}}, {{aur|dotnet-runtime-bin}}, {{aur|aspnet-runtime-bin}}, {{aur|dotnet-sdk-bin}}
* {{aur|dotnet-host-preview}}, {{aur|dotnet-runtime-preview}}, {{aur|aspnet-runtime-preview}}, {{aur|dotnet-sdk-preview}}
* {{aur|dotnet-runtime-3.0}}, {{aur|aspnet-runtime-3.0}}, {{aur|dotnet-sdk-3.0}},
* {{aur|dotnet-runtime-2.2}}, {{aur|aspnet-runtime-2.2}}, {{aur|dotnet-sdk-2.2}}, {{aur|dotnet-sdk-2.2-vs2017}}
* {{aur|dotnet-runtime-2.1}}, {{aur|aspnet-runtime-2.1}}, {{aur|dotnet-sdk-2.1}}

=== Install PowerShell Core ===
You can install PowerShell Core as a "global" tool also [https://devblogs.microsoft.com/powershell/introducing-powershell-as-net-global-tool/] [https://github.com/powershell/powershell]

# dotnet tool install --global PowerShell

to update to current version
# dotnet tool update --global PowerShell


== 参照 ==
== 参照 ==

2020年9月30日 (水) 11:46時点における版

.NET Core は Microsoft 製の新しいオープンソース C#, Visual Basic, F# ソフトウェアフレームワークです。先行の .NET Framework と異なり、クロスプラットフォームで動作し近代的なアプリケーションに適した設計が行われています。

インストール

.NET Core で管理されるアプリケーションを実行したいだけの場合は dotnet-runtime パッケージをインストールしてください。

.NET Core でアプリをビルドする場合は dotnet-sdk パッケージもインストールしてください。

Microsoft は .NET Core アプリをビルド・デバッグするときは Electron ベースのオープンソース IDE である Visual Studio Code を使うことを推奨しています。

ヒント PATH~/.dotnet/tools を追加してください。追加しない場合は、 dotnetツールはシェルから使うことができません。

Install multiple versions manually

You can install multiple versions of the .NET Core SDK or runtime side by side by using the dotnet-install.sh script provided by the .NET Foundation. You can find the documentation of the script here.

For instance, this command would install the latest version found in the "current" channel in /usr/share/dotnet:

# ./dotnet-install.sh --install-dir /usr/share/dotnet -channel Current -version latest

You may want to simulate the installation first by using the -Dryrun flag.

Once installed, you can verify the SDKs available:

$ dotnet --list-sdks                                                                 
2.2.108 [/usr/share/dotnet/sdk]
3.0.103 [/usr/share/dotnet/sdk]
$ dotnet --version
3.0.103

Install multiple versions via AUR

Some of the AUR dotnet packages are made to be installed alongside each other. Only one host package (dotnet-host-binAUR or dotnet-host) is needed containing the command-line tool and you can install any of the available SDKs and Runtimes (latest packages of all major versions) next to it. List of compatible packages:

Install PowerShell Core

You can install PowerShell Core as a "global" tool also [1] [2]

# dotnet tool install --global PowerShell

to update to current version

# dotnet tool update --global PowerShell

参照