@echo off
REM Build GeViScopeConfigReader

echo =============================================
echo Building GeViScopeConfigReader
echo =============================================
echo.

cd /d "%~dp0"

echo Restoring NuGet packages...
dotnet restore
if errorlevel 1 (
    echo ERROR: Failed to restore packages
    pause
    exit /b 1
)

echo.
echo Building project...
dotnet build --configuration Debug
if errorlevel 1 (
    echo ERROR: Build failed
    pause
    exit /b 1
)

echo.
echo =============================================
echo Build Successful!
echo =============================================
echo.
echo Output location:
echo %~dp0bin\Debug\net48\GeViScopeConfigReader.exe
echo.
echo To run the application:
echo   1. Start GeViScope Server: "C:\Program Files (x86)\GeViScopeSDK\BIN\GSCServer.exe"
echo   2. Run: %~dp0bin\Debug\net48\GeViScopeConfigReader.exe
echo.
pause
