2026-02-23 20:12:10 -06:00

4.4 KiB

Minimal Machine Setup (CLI-Only, No Visual Studio)

This project can be developed with a small footprint:

  • .NET SDK only (dotnet --version should work)
  • PowerShell
  • No Visual Studio required

Why This Exists

This repo uses NuGet package references. The helper script keeps all dotnet and NuGet artifacts local to this repo, clears proxy env vars for each command, and uses restore flags that tolerate offline/unreachable remote sources. This keeps footprint small and avoids host-level environment drift.

Current status target:

  • ./scripts/dotnet-min.ps1 restore ... succeeds in this workspace.
  • If remote NuGet TLS is flaky, restores still work when package cache is present.

One-Time Check

dotnet --version
./scripts/dotnet-min.ps1 --info

Standard Workflow

Run commands from journal-master/journal:

./scripts/dotnet-min.ps1 restore Journal.Sidecar/Journal.Sidecar.csproj
./scripts/dotnet-min.ps1 restore Journal.Api/Journal.Api.csproj
./scripts/dotnet-min.ps1 build Journal.Core/Journal.Core.csproj
./scripts/dotnet-min.ps1 build Journal.Sidecar/Journal.Sidecar.csproj
./scripts/dotnet-min.ps1 build Journal.Api/Journal.Api.csproj
./scripts/dotnet-min.ps1 run --project Journal.SmokeTests/Journal.SmokeTests.csproj

If Restore Fails In A New Shell

Quick checks:

./scripts/dotnet-min.ps1 nuget list source
./scripts/dotnet-min.ps1 restore Journal.Sidecar/Journal.Sidecar.csproj

If your shell has proxy env vars set, the helper script already clears them per run. It also applies:

  • --ignore-failed-sources on restore
  • -p:RestoreIgnoreFailedSources=true
  • -p:NuGetAudit=false

Admin TLS Repair Attempt (Host-Level)

These commands must be run in an Administrator PowerShell outside this agent session.

  1. Backup the current key:
reg export "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders" "$env:USERPROFILE\Desktop\SecurityProviders_backup.reg" /y
  1. Restore standard provider list for Schannel:
reg add "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders" /v SecurityProviders /t REG_SZ /d "credssp.dll, schannel.dll, digest.dll, msnsspc.dll" /f
  1. Backup and repair LSA security packages (required if SEC_E_NO_CREDENTIALS persists):
reg export "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" "$env:USERPROFILE\Desktop\Lsa_backup.reg" /y
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa" -Name "Security Packages" -Type MultiString -Value @("kerberos","msv1_0","schannel","wdigest","tspkg","pku2u")
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa" -Name "Authentication Packages" -Type MultiString -Value @("msv1_0")
  1. Reboot, then test:
curl.exe -I https://api.nuget.org/v3/index.json
./scripts/dotnet-min.ps1 restore Journal.Sidecar/Journal.Sidecar.csproj
  1. If still broken, run system repair and reboot:
DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow

Friend Machine Export -> This Machine Import (Offline NuGet Cache)

Use this when your friend can restore packages on a healthy machine.

On friend machine (from journal-master/journal):

./scripts/nuget-export-cache.ps1 -OutputZip .\nuget-cache-export.zip

Copy nuget-cache-export.zip to this machine, then from journal-master/journal:

./scripts/nuget-import-cache.ps1 -InputZip .\nuget-cache-export.zip

If restore still reports remote source errors after import, run one more pass:

./scripts/dotnet-min.ps1 restore Journal.Sidecar/Journal.Sidecar.csproj --ignore-failed-sources
./scripts/dotnet-min.ps1 build Journal.Sidecar/Journal.Sidecar.csproj

What the export/import scripts do

  • nuget-export-cache.ps1
    • runs restores to prime cache
    • bundles .nuget/ into a zip
    • writes a small manifest file in the bundle
  • nuget-import-cache.ps1
    • expands the bundle into this repo
    • runs restores against local cache

Local Footprint Paths

The helper script keeps artifacts under this repo:

  • .dotnet_home/
  • .nuget/packages/
  • .nuget/http-cache/
  • normal build outputs (bin/, obj/)

To clean everything created for this machine:

Remove-Item -Recurse -Force .dotnet_home,.nuget -ErrorAction SilentlyContinue
Get-ChildItem -Recurse -Directory -Filter bin | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue
Get-ChildItem -Recurse -Directory -Filter obj | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue