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?

M1Macで.NETの環境構築

Last updated at Posted at 2024-06-29

開発環境

  • MacBook Pro (Apple M2)
  • Sonoma 14.4.1
  • VSCodeインストール済み

手順

  1. VSCodeでプロジェクトを開く
  2. VSCodeの拡張機能で「C# Dev Kit」をインストール
  3. プロジェクトの.NETバージョンに合わせてSDKをインストール(macOSのArm64を選択)
  4. プロジェクトの依存関係をインストールする(ここは飛ばしてもbuildで自動実行されるらしい)
    $ dotnet restore
    
  5. 正しくインストールできているか確認する
    $ dotnet build
    

参考

よく使うコマンド

  • dotnet tool install --global dotnet-ef
  • dotnet ef migrations add xxx マイグレーション(事前にEntityを用意した状態で実行)
  • dotnet run --launch-profile http ローカルでサーバー起動
  • dotnet format --verbosity diagnostic xxx.csproj フォーマット
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?