-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: update dotnet installation instructions for macOS / Linux
- Loading branch information
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dotnet 6.0.419 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |