Skip to content

Commit 1fda6a0

Browse files
committed
Add guide for .NET installation scripts across platforms
This new post provides a concise guide on using .NET installation scripts for Linux, macOS, and Windows. It includes example commands, links to official documentation, and recommendations for a clean installation.
1 parent 1718cb0 commit 1fda6a0

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
tags: hardskill,dotnet,productivity
3+
banner_image: https://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyvyzqzouqfi53smfmie4.jpg
4+
---
5+
6+
# 💻.NET Installation Scripts for Linux, macOS, and Windows
7+
8+
Sempre gostei de automação seja usando [Chocolatey](https://chocolatey.org/), Python, Bash, Powersheel etc... tenho até um [dotfiles (GNU/Linux Ubuntu e Windows 10)](https://github.com/neiesc/dotfiles), depois que fiquei sabendo que o dotnet tem uma documentação sobre instalar dotnet com scripts resolvi compartilhar, pois, pode passar despercebido para muitos.
9+
10+
![Download .NET](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lvno8936skoa4rx6omol.png)
11+
12+
O site [.NET Install scripts](
13+
https://dotnet.microsoft.com/download/dotnet/scripts) como no próprio site fala scripts para instalar .NET Core no Linux, macOS e Windows. Na [documentação](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script?WT.mc_id=dotnet-35129-website) tem o modo de uso sendo bem simples:
14+
15+
![.NET Install scripts](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f4m2m4xu0jwerql0t1jp.png)
16+
17+
Exemplos para instalar versão LTS:
18+
19+
No Windows:
20+
```powershell
21+
&powershell -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -Channel LTS"
22+
```
23+
24+
Linux/macOS:
25+
```bash
26+
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel LTS
27+
```
28+
29+
PS1: Caso você tenha o dotnet já instalado é recomendado você remover todos e instalar em forma de script como esse post mostra.

0 commit comments

Comments
 (0)