Skip to content

Tools Setup and git clone

Use the provided script to install development tools and git clone project repositories.

Tested on Windows 11, using 'Command prompt'. Might fail if run at once!

winget install --name "PowerShell" --exact --id 9MZ1SNWT0N5D --source msstore  --accept-package-agreements --accept-source-agreements
winget install --id=Git.Git --exact --source winget  --accept-package-agreements --accept-source-agreements
winget install --name "Visual Studio Code" --exact --id XP9KHM4BK9FZ7Q --source msstore  --accept-package-agreements --accept-source-agreements
winget install --name "Slack" --id 9WZDNCRDK3WP --exact --source msstore  --accept-package-agreements --accept-source-agreements --silent
winget install -e --id Cloudflare.Warp

winget install --id GitHub.cli
gh auth login --scopes read:packages
##  Use output from the following as password when authenticating nuget package source in IDE, if you get login prompt every time, delete credentials in Credential Manager and re-add, might have created duplicates
gh auth token

winget install --name "Visual Studio Professional 2022" --id Microsoft.VisualStudio.2022.Professional --exact --source winget --accept-package-agreements --accept-source-agreements --silent --override "--add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --add Microsoft.Net.Core.Component.SDK.2.1 --add Microsoft.NetCore.Component.Runtime.3.1 --add Microsoft.NetCore.Component.Runtime.5.0 --passive --installerUpdateArgs=--passive"
winget install --id "Microsoft.AzureCLI" --exact --accept-package-agreements --accept-source-agreements --silent
powershell -Command "iex ""& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) }"""

##  Does not work with latest VS yet. Install Resharper EAP
winget install --id "JetBrains.ReSharper" --accept-package-agreements --accept-source-agreements --silent --override "/SpecificProductNames=ReSharper;dotPeek /Silent=True"
winget install --id "JetBrains.ReSharper" --accept-package-agreements --accept-source-agreements --silent "/SpecificProductNames=ReSharper;dotPeek" --log 

winget install --id "Microsoft.SQLServerManagementStudio" --exact --accept-package-agreements --accept-source-agreements --silent
winget install --id "7zip.7zip" --exact --accept-package-agreements --accept-source-agreements --silent

##  Should not be needed
## winget install --id "Oracle.JavaRuntimeEnvironment" --exact --accept-package-agreements --accept-source-agreements --silent


##  https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script?WT.mc_id=dotnet-35129-website#examples
##  https://dotnet.microsoft.com/download/dotnet/2.2
## curl -LO "https://download.visualstudio.microsoft.com/download/pr/279de74e-f7e3-426b-94d8-7f31d32a129c/e83e8c4c49bcb720def67a5c8fe0d8df/dotnet-sdk-2.2.207-win-x64.exe"
## .\dotnet-sdk-2.2.207-win-x64.exe /quiet


##  https://docs.microsoft.com/en-us/windows/wsl/install
##  https://devblogs.microsoft.com/commandline/wsl2-will-be-generally-available-in-windows-10-version-2004/
## curl -LO "https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi"
## .\wsl_update_x64.msi
wsl --install -d Ubuntu
wsl --set-default-version 2

##  === SQL Server & RabbitMQ for local dev
##  IMPORTANT: WE USE RANCHER DESKTOP
##  DOCKER DESKTOP SHOULD NOT BE USED (for license reasons)!
winget install --id "SUSE.RancherDesktop" --exact
##  in a suitable path, do
##  (make sure you have logged in using az cli - **az login** and started Rancher Desktop (set to autostart with login)
git clone https://github.com/majority-dev/be-devtools.git
cd be-devtools/LocalDev
docker-compose up -d 

##  === Clone devtooling
git clone https://github.com/majority-dev/be-devtools.git

###  Initialize devenv-scripts in the suitable path
powershell -file .\be-devtools\LocalDev\PSModules\Initialize-DevEnv.ps1 -MajorityGitRoot [Path to your project's local git root folder, e.g. "C:\Projects"]

This sets environment variables for the git root folder and adds Powershell Modules so you can run e.g. Initialize-UserSecrets and Initialize-Db to add/update user secrets/db for an area.

Tip: Run Initialize-UserSecrets All in PowerShell to create user secrets for all Bank projects at once. (First, import the modules using the command: Import-Module .\be-devtools\LocalDev\PSModules\Initialize-UserSecrets\Initialize-UserSecrets.psm1)