Skip to content

Commit

Permalink
build: update dotnet installation instructions for macOS / Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
leoli0605 committed Mar 5, 2024
1 parent 6538c9b commit 57e7150
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dotnet 6.0.419
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,38 @@
# C# 程式碼範例集合

這是一個簡單的 C# 程式碼範例集合。

### 安裝 . NET SDK

* Windows

```bash
choco install -y dotnet-6.0-sdk dotnet-8.0-sdk
```
dotnet new console --framework net6.0 --use-program-main -n <project-name>

* macOS / Linux

```bash
# asdf plugin add dotnet https://github.com/hensou/asdf-dotnet.git
asdf plugin add dotnet
asdf install dotnet 6.0.419
asdf install dotnet 8.0.201
asdf local dotnet 6.0.419
dotnet --version
```

### 建立專案

```bash
dotnet new console --framework net6.0 --use-program-main -n <project-name>
```

```bash
dotnet sln add <project-name>/<project-name>.csproj
```

### 執行專案

```bash
dotnet run --project <project-name>/<project-name>.csproj
```

0 comments on commit 57e7150

Please sign in to comment.