diff --git a/dotnet-local.cmd b/dotnet-local.cmd index d1c21fbc0493..24cdebefbe06 100644 --- a/dotnet-local.cmd +++ b/dotnet-local.cmd @@ -1,8 +1,9 @@ @echo off +setlocal enabledelayedexpansion SET ROOT=%~dp0 IF EXIST "%ROOT%\bin\dotnet\dotnet.exe" ( - SET DOTNET_ROOT=%ROOT%\bin\dotnet - SET PATH=%DOTNET_ROOT%;%PATH% + SET "DOTNET_ROOT=%ROOT%\bin\dotnet" + SET "PATH=!DOTNET_ROOT!;%PATH%" call "%ROOT%\bin\dotnet\dotnet.exe" %* ) ELSE ( echo "You must build MAUI first. Please see '.github/DEVELOPMENT.md' for details."