.NET SDK設定
Homebrewでのインストール
Section titled “Homebrewでのインストール”最新版のインストール
Section titled “最新版のインストール”brew install --cask dotnet-sdkプロジェクト作成
Section titled “プロジェクト作成”コンソールアプリケーション
Section titled “コンソールアプリケーション”dotnet new console -o MyApp -f net7.0Web API
Section titled “Web API”dotnet new webapi -o SampleService基本コマンド
Section titled “基本コマンド”# パッケージのリストアdotnet restore
# アプリケーションの実行dotnet run
# インストール済みSDKの確認dotnet --list-sdks複数バージョンの管理
Section titled “複数バージョンの管理”Homebrew Tapの追加
Section titled “Homebrew Tapの追加”brew tap isen-ng/dotnet-sdk-versions特定バージョンのインストール
Section titled “特定バージョンのインストール”brew install --cask dotnet-sdk6-0-400brew install --cask dotnet-sdk7-0-201brew install --cask dotnet-sdk8-0-100brew install --cask dotnet-sdk8-0-200アンインストール
Section titled “アンインストール”brew uninstall --zap --cask dotnet-sdk6-0-400brew uninstall --zap --cask dotnet-sdk7-0-300brew uninstall --zap --cask dotnet-sdk8-0-100brew uninstall --zap --cask dotnet-sdk8-0-200バージョン切り替え
Section titled “バージョン切り替え”一度アンインストールして、切り替えたいバージョンでインストールする必要があります。
miseでのインストール
Section titled “miseでのインストール”# .NET 8のインストールmise use --global dotnet@8
# .NET 6のインストールmise use --global dotnet@6Entity Framework Core
Section titled “Entity Framework Core”バージョンごとにインストールが必要です:
# インストールdotnet tool install --global dotnet-ef --version 8.0.1
# アンインストールdotnet tool uninstall --global dotnet-efカバレッジレポートツール
Section titled “カバレッジレポートツール”dotnet tool install -g dotnet-reportgenerator-globaltool