MemScan-EDR/scripts/build_csharp.bat

49 lines
1.2 KiB
Batchfile
Raw Permalink Normal View History

@echo off
chcp 65001 >nul
echo ============================================
echo MemScan-EDR v2.0 - Build Script
echo AI-Powered Memory Detection
echo ============================================
echo.
:: Check .NET 8 SDK
where dotnet >nul 2>&1
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] .NET SDK not found. Please install .NET 8 SDK.
pause
exit /b 1
)
echo [1/3] Restoring NuGet packages...
dotnet restore src-csharp/MemScanEDR/MemScanEDR.csproj
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] Restore failed.
pause
exit /b 1
)
echo [2/3] Building Release (win-x64, self-contained)...
dotnet publish src-csharp/MemScanEDR/MemScanEDR.csproj ^
-c Release ^
-r win-x64 ^
--self-contained true ^
-p:PublishSingleFile=true ^
-p:IncludeNativeLibrariesForSelfExtract=true ^
-o publish
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] Build failed.
pause
exit /b 1
)
echo [3/3] Copying assets...
if exist "rules" xcopy /E /I /Y "rules" "publish\rules\" >nul
if exist "..\MemScan-EDR\rules" xcopy /E /I /Y "..\MemScan-EDR\rules" "publish\rules\" >nul
echo.
echo ============================================
echo BUILD SUCCESSFUL!
echo Output: publish\MemScan-EDR.exe
echo ============================================
pause