@echo off echo Building SAP DI Console... rem This project references a pre-generated, machine-neutral (MSIL) interop rem assembly: Interop.SAPbobsCOM.dll (checked in next to this script). Because rem that's a plain managed (not a ), the ordinary rem .NET SDK build works - no Visual Studio / Framework MSBuild required. rem rem If the SAP B1 DI API is upgraded, regenerate the interop once: rem "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\TlbImp.exe" ^ rem "C:\Program Files (x86)\SAP\SAP Business One DI API\DI API 100\SAPbobsCOM100.dll" ^ rem /out:Interop.SAPbobsCOM.dll /namespace:SAPbobsCOM /machine:Agnostic /silent dotnet build SapDiConsole.csproj -c Release if %ERRORLEVEL% EQU 0 ( echo. echo Build successful. echo Exe: bin\Release\net472\SapDiConsole.exe ) else ( echo. echo Build failed. Make sure: echo 1. .NET SDK is installed ^(dotnet --version^) echo 2. Interop.SAPbobsCOM.dll exists in this folder ^(regenerate with TlbImp - see comment above^) echo 3. SAP B1 DI API is installed and its COM type library is registered ) pause