diff --git a/startcode.cmd b/startcode.cmd new file mode 100644 index 0000000000..e6183646b1 --- /dev/null +++ b/startcode.cmd @@ -0,0 +1,4 @@ +@echo off +setlocal + +powershell -ExecutionPolicy ByPass -NoProfile -Command "& '%~dp0startcode.ps1'" %* diff --git a/startcode.ps1 b/startcode.ps1 new file mode 100644 index 0000000000..0dec704f1e --- /dev/null +++ b/startcode.ps1 @@ -0,0 +1,12 @@ + +# In the case the .dotnet folder exists, need to assume it's possibly where the +# dotnet sdk listed by global.json exists. Rather than parsing out global.json, +# checking for matches in that directory (non-trivial), just put it first on the +# path, enable mulit-level lookup and start code. +$dotnetPath = Join-Path (Get-Location) ".dotnet" +if (Test-Path $dotnetPath) { + $env:DOTNET_MULTILEVEL_LOOKUP=1 + $env:PATH="$dotnetPath;$env:PATH" +} + +code . \ No newline at end of file