C# 學習心得(VSCode) === ###### tags: `C#` `VSCode` --- 安裝延伸模組 C# ![](https://i.imgur.com/kdJTaBS.png) 輸入指令建立一個 C# 專案 ```bash= dotnet new console -n hello ``` 基本上應該就能開始中斷 Debug程式了 記得裝一下 NuGet Package Manager ![](https://i.imgur.com/9hDy0t2.png) 這樣才能抓 NuGet 套件 :::warning 如果想讓 Code Runner 執行 .cs 檔案 ![](https://i.imgur.com/K4veNrT.png) 官方有提供 看起來是有透過 Chocolatey 安裝 ```bash= cinst scriptcs ``` 記得用系統管理員權限安裝 :cry:目前測試 Code Runner 沒辦法正常執行 反白選取某段指令使用 Code Runner 可以執行 並產生一個暫存檔 看起來 Code Runner 還不能執行複雜的程式碼 ::: # 參考資料 [如何在 VSCode 設定完整的 .NET Core 建置、發行與部署工作](https://blog.miniasp.com/post/2019/01/22/Configure-Tasks-and-Launch-in-VSCode-for-NET-Core) [Day 24: 使用 VS Code 來開發 C#](https://ithelp.ithome.com.tw/articles/10226968) [教學課程:使用 Visual Studio Code 建立 .NET Core 主控台應用程式](https://docs.microsoft.com/zh-tw/dotnet/core/tutorials/with-visual-studio-code) [C#靜態分析工具Roslynator.Analyzers將方法數量提高了500多](https://kknews.xyz/1092)