@echo off setlocal echo Compiling ClassNotify.cs to ClassNotify.exe... set DOTNETDIR=C:\Windows\Microsoft.NET\Framework64\v4.0.30319 if not exist "%DOTNETDIR%\csc.exe" ( set DOTNETDIR=C:\Windows\Microsoft.NET\Framework\v4.0.30319 ) "%DOTNETDIR%\csc.exe" /target:winexe /optimize+ /r:System.Windows.Forms.dll /r:System.Drawing.dll /r:"%DOTNETDIR%\WPF\System.Speech.dll" /out:"%~dp0ClassNotify.exe" "%~dp0ClassNotify.cs" if %ERRORLEVEL% equ 0 ( echo [SUCCESS] ClassNotify.exe built successfully! ) else ( echo [ERROR] Compilation failed with error code %ERRORLEVEL%. ) endlocal