Home
Packages
Forums
Wiki
GitLab
Security
AUR
Download
コンテンツにスキップ
メインメニュー
メインメニュー
サイドバーに移動
非表示
案内
メインページ
目次
コミュニティに貢献
最近の出来事
おまかせ表示
特別ページ
交流
ヘルプ
貢献
最近の更新
最近の議論
新しいページ
統計
リクエスト
ArchWiki
検索
検索
表示
アカウント作成
ログイン
個人用ツール
アカウント作成
ログイン
.NETのソースを表示
ページ
議論
日本語
閲覧
ソースを閲覧
履歴を表示
ツール
ツール
サイドバーに移動
非表示
操作
閲覧
ソースを閲覧
履歴を表示
全般
リンク元
関連ページの更新状況
ページ情報
表示
サイドバーに移動
非表示
←
.NET
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
[[Category:フレームワーク]] [[en:.NET]] [[es:.NET Core]] [[pt:.NET Core]] [[zh-hans:.NET Core]] '''.NET'''(以前の名前は .NET Core) は Microsoft が提供する C#, Visual Basic, F# のための FOSS ソフトウェアフレームワークです。先行の .NET Framework と異なり、クロスプラットフォームでモジュール化され、近代的なアプリケーションに適した設計が行われています。 == インストール == .NET Core マネージドアプリケーションを実行したいだけの場合は {{Pkg|dotnet-runtime}} パッケージを[[インストール]]してください。 .NET Core でアプリをビルドする場合は {{Pkg|dotnet-sdk}} パッケージもインストールしてください。 Microsoft は .NET Core アプリをビルド・デバッグするときは [[Electron]] ベースのオープンソース IDE である [[Visual Studio Code]] を使うことを推奨しています。 {{Tip|{{ic|PATH}} に {{ic|~/.dotnet/tools}} を追加してください。追加しない場合は、 dotnetツールはシェルから使うことができません。}} === 手動による複数バージョンのインストール === .NET Foundation が提供する [https://dot.net/v1/dotnet-install.sh dotnet-install.sh] スクリプトを使用して、.NET Core SDK またはランタイムの複数のバージョンをインストールできます。スクリプトのドキュメントは[https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script ここ]にあります。 例えば、以下のコマンドは、{{ic|/usr/share/dotnet}} の "current" チャネルにある最新バージョンをインストールします: # ./dotnet-install.sh --install-dir /usr/share/dotnet -channel Current -version latest {{ic|-Dryrun}} を使用して、最初にインストールをシミュレートすることをお勧めします。 インストールしたら、利用可能な SDK を確認できます: $ dotnet --list-sdks 2.2.108 [/usr/share/dotnet/sdk] 3.0.103 [/usr/share/dotnet/sdk] $ dotnet --version 3.0.103 === 手動でインストールしたバージョンをアンインストールする === {{ic|dotnet-install.sh}} でインストールした古いバージョンは削除することをお勧めします。自動化された [https://docs.microsoft.com/en-us/dotnet/core/additional-tools/uninstall-tool .NET Uninstall Tool] はまだ Linux をサポートしていないため、削除は手動で行う必要があります。 {{hc|$ dotnet --list-sdks| 5.0.100 [/usr/share/dotnet/sdk] 5.0.102 [/usr/share/dotnet/sdk] }} sdk のアンインストール: $ SDK_VERSION="5.0.100" $ DOTNET_UNINSTALL_PATH="/usr/share/dotnet" # rm -rf $DOTNET_UNINSTALL_PATH/sdk/$SDK_VERSION {{ic|dotnet-install.sh}} を使用すると、dotnet ホストと共有パッケージもインストールされますが、リリースによっては追加で削除しなければならない場合もあります。 .NETバージョン ( sdk, host, shared ) の完全なアンインストール: $ SDK_VERSION="5.0.100" $ DOTNET_VERSION="5.0.0" $ DOTNET_UNINSTALL_PATH="/usr/share/dotnet" # rm -rf $DOTNET_UNINSTALL_PATH/sdk/$SDK_VERSION # rm -rf $DOTNET_UNINSTALL_PATH/shared/Microsoft.NETCore.App/$DOTNET_VERSION # rm -rf $DOTNET_UNINSTALL_PATH/shared/Microsoft.AspNetCore.All/$DOTNET_VERSION # rm -rf $DOTNET_UNINSTALL_PATH/shared/Microsoft.AspNetCore.App/$DOTNET_VERSION # rm -rf $DOTNET_UNINSTALL_PATH/host/fxr/$DOTNET_VERSION === 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}} === 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 == テレメトリ == テレメトリはデフォルトで有効になっていますが、[[環境変数|環境変数の設定]]により無効にできます。{{ic|1=DOTNET_CLI_TELEMETRY_OPTOUT=1}} == タブ補完 == {{ic|System.CommandLine.Parser}} を使用して引数を解析するすべての dotnet プログラムはオートコンプリートをサポートしています。これを有効にするには、[https://docs.microsoft.com/en-us/dotnet/core/tools/enable-tab-autocomplete#zsh それぞれのドキュメント]に記載されているように、{{ic|.bashrc}} / {{ic|.zshrc}} ファイルに数行追加するだけです。スタンドアロン・バイナリについては、 [https://github.com/dotnet/command-line-api/blob/main/docs/dotnet-suggest.md こちら]で説明されています。 == トラブルシューティング == === It was not possible to find any compatible framework version === If you get the following error when you try to run a newly created project, you no longer need to set a {{ic|DOTNET_ROOT}} variable as described in the solutions of various GitHub issues. Arch's dotnet package (as of 3.1) installs it to the Microsoft recommended location of {{ic|/usr/share/dotnet}}. {{hc|$ dotnet run|output= It was not possible to find any compatible framework version The framework 'Microsoft.AspNetCore.App', version '3.1.0' was not found. - No frameworks were found. You can resolve the problem by installing the specified framework and/or SDK. The specified framework can be found at: - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=3.1.0&arch=x64&rid=arch-x64 }} This is caused because the runtime is shipped as a separate package in Arch. You just need to make sure you have the {{Pkg|aspnet-runtime}} package installed as well. === "the required library libhostfxr.so could not be found" error === Some of the dotnet SDK tools (for example ''libman'', ''dotnet-watch'' etc.) may expect you to have the environment variable {{ic|DOTNET_ROOT}} pre-configured. If it's not, an error like this one could be observed: [https://github.com/dotnet/cli/issues/9114] A fatal error occurred, the required library libhostfxr.so could not be found. If this is a self-contained application, that library should exist in [/home/my_user/.dotnet/tools/.store/microsoft.web.librarymanager.cli/1.0.172/microsoft.web.librarymanager.cli/1.0.172/tools/netcoreapp2.1/any/]. If this is a framework-dependent application, install the runtime in the default location [/usr/share/dotnet] or use the DOTNET_ROOT environment variable to specify the runtime location. The workaround is to manually export {{ic|DOTNET_ROOT}} in your shell: {{hc|1=~/.bashrc|2= export DOTNET_ROOT=/opt/dotnet }} === Error MSB4019: The imported project "/usr/share/dotnet/sdk/.../Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.Common.targets" was not found. Confirm that the expression in the Import declaration ... is correct, and that the file exists on disk. === This happens after an update. The currently running shell / login session is storing environment variables for the dotnet SDK version different from one installed. Restarting the shell or logging in again should fix this. === SDK specified could not be found === This is believed to caused by a conflict between the Mono and MSBuild SDK libs and the dotnet core ones. To fix this export the path manually in your shell (replacing the version number as necessary) e.g: {{hc|1=~/.bashrc|2= export MSBuildSDKsPath=$( echo /usr/share/dotnet/sdk/3.*/Sdks ); }} == 参照 == * [https://dotnet.microsoft.com/ .NET ホームページ] * [https://github.com/dotnet The .NET Foundation] * [https://docs.microsoft.com/en-us/dotnet/api/index .NET API Browser]
このページで使用されているテンプレート:
テンプレート:AUR
(
ソースを閲覧
)
テンプレート:Aur
(
ソースを閲覧
)
テンプレート:Hc
(
ソースを閲覧
)
テンプレート:Ic
(
ソースを閲覧
)
テンプレート:Pkg
(
ソースを閲覧
)
テンプレート:Tip
(
ソースを閲覧
)
テンプレート:TranslationStatus
(
ソースを閲覧
)
.NET
に戻る。
検索
検索
.NETのソースを表示
話題を追加