The following steps were captured on a laptop with Windows freshly installed and the internet disconnected. All of the resources that were used for these steps were generated by running the Build-DevResources.ps1 script into a directory named bundle
.
Simple software installation list (in order of installation):
Software | Version | Notes |
---|---|---|
Visual Studio Code | 1.79.2 | |
PowerShell 7 | 7.2.11 | |
Git | 2.41.0 | Use VS Code as editor and default new repositories to main . |
.NET SDK | 7.0.305 | |
Node.js | 18.16.0 | Prevent installing online documentation shortcuts |
Azure Data Studio | 1.44.1 | |
PowerToys | 0.70.1 | |
Terminal | 1.17.11461.0 | Make sure all terminals + VS Code are closed, and just double-click the bundle. |
Azure CLI | 2.49.0 | |
SQL Server 2022 Express | 16.2211.5693.3 | New SQL Server installation. Uncheck Azure Extension for SQL Server. Named Instance: DevSql . |
Docker Desktop | 4.20.1 | Must first perform the steps in WSL + Ubuntu below |
Before Docker is installed, the system needs to be configured with WSL + Ubuntu.
From an administrative PowerShell console, enable WSL:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Restart the computer.
Install WSL2 Linux kernel update package for x64 machines, (located at bundle\wsl\wsl-kernel-x64.msi
).
Set WSL2 as the default version:
wsl --set-default-version 2
Move the Ubuntu distro from bundle\wsl\ubuntu
to $env:USERPROFILE\.wsl\ubuntu
and double-click ubuntu.exe
to initialize the distro in WSL.
Set Ubuntu as the default WSL distro, and check the status to verify:
wsl -s Ubuntu
wsl --status
Open Azure Data Studio and open the Extensions view in the left sidebar. Click the menu and select Install from VSIX...:
Navigate to bundle\extensions\ads
and install each extension individually. Once installed, the Extensions view should look as follows:
Open Visual Studio Code and open the Extensions view in the left sidebar. CLick the menu and select Install from VSIX...:
Select all .vsix
packages from bundle\extensions\vs-code
and click Install:
After all extensions have been installed, refresh the Extensions view to verify all extensions are activated:
Connect Azure Data Studio to .\DevSql
by clicking New -> New Connection
:
Set Server to .\DevSql
and change Trust Server Certificate to True
, then click Connect:
The server connection should then be setup in the Connections view:
Open wsl and change directory to bundle/linux
.
Install cached apt software:
sudo apt dpkg -i ./apt-cache/*.deb
Running echo "$(command -v <command>)"
will verify that the packages have been installed:
Install .NET SDK:
cd <path>/<to>/bundle/linux/dotnet/
DOTNET_FILE=dotnet-sdk-<version>-linux-<arch>.tar.gz
export DOTNET_ROOT=~/.dotnet/
mkdir -p "$DOTNET_ROOT" && tar zxf "$DOTNET_FILE" -C "$DOTNET_ROOT"
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
Verify with dotnet --list-sdks
:
In the .home/admin
directory, I created an offline.sig
file by running:
sudo apt-offline set ./offline.sig --update --upgrade
I transferred the .home/admin
directory to my online workstation and, pointed at the admin
directory, executed:
This step took an unreasonably long amount of time to complete. Looking into writing a script that iterates through the
.sig
file to download the updates vs. usingapt-offline
in WSL. See apt-offline: Script Package Downloads from Generated .sig Files.
sudo apt-offline get -d ./update ./offline.sig
Once complete, I transferred the admin/update
directory to .home/admin/update
and executed:
sudo apt-offline install ./<path>/<to>/<admin>/<update>
Verified that cached dependencies for both projects can be installed.
Starting from bundle/npm
, changed directory into both projects (cache
and optimus
) and ran npm i --offline
:
Moved the solution saved in bundle/nuget/Solution
to bundle/Solution
to simplify the testing process.
Configure the NuGet source:
# add bundle/nuget as the local source
dotnet nuget add source <nuget-dir> -n "local"
# remove the nuget.org source
dotnet nuget remove source "nuget.org"
Test restoring NuGet dependencies for bundle/Solution
:
dotnet build
Test loading and creating cached Docker base images.
From bundle\docker
:
# load docker images
docker load -i mcr.microsoft.com-dotnet-aspnet-latest.tar
docker load -i mcr.microsoft.com-dotnet-sdk-latest.tar
docker load -i node-latest.tar
# create docker images
docker create mcr.microsoft.com/dotnet/sdk:latest
docker create mcr.microsoft.com/dotnet/aspnet:latest
docker create node:latest