@echo off
REM ============================================================
REM  BUILD - compila in Debug (licenza NON richiesta).
REM  Richiede: nuget.exe e MSBuild nel PATH (Developer Command
REM  Prompt for VS 2017+). In alternativa apri la solution in VS.
REM ============================================================
setlocal
cd /d "%~dp0.."

echo [build] restore pacchetti NuGet...
nuget restore NcProgramManager.csproj -PackagesDirectory packages
if errorlevel 1 (
  echo [build] nuget restore FALLITO. Apri la solution in Visual Studio e compila.
  goto :end
)

echo [build] compilazione Debug ^| AnyCPU...
msbuild NcProgramManager.csproj /p:Configuration=Debug /p:Platform=AnyCPU /v:minimal
if errorlevel 1 (
  echo [build] MSBuild FALLITO.
  goto :end
)

echo.
echo [build] OK -> bin\Debug\NcProgramManager.exe
echo [build] NOTA: build Debug salta il check licenza (#if !DEBUG).
echo [build]       Per testare con licenza usa Configuration=Release + license.lic.

:end
endlocal
