31 lines
1004 B
Batchfile
31 lines
1004 B
Batchfile
@echo off
|
|
echo Building Simple WPF Test Plugin...
|
|
|
|
REM Set MSBuild path (check Community edition first)
|
|
set MSBUILD_PATH="C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe"
|
|
|
|
REM Check if MSBuild exists, try alternative paths
|
|
if not exist %MSBUILD_PATH% (
|
|
set MSBUILD_PATH="C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\MSBuild.exe"
|
|
)
|
|
if not exist %MSBUILD_PATH% (
|
|
set MSBUILD_PATH="C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\MSBuild.exe"
|
|
)
|
|
if not exist %MSBUILD_PATH% (
|
|
echo MSBuild not found. Trying dotnet build...
|
|
dotnet build NavisworksTransportPlugin.csproj --verbosity minimal
|
|
goto :end
|
|
)
|
|
|
|
echo Using MSBuild: %MSBUILD_PATH%
|
|
|
|
REM Build the project
|
|
echo Building project...
|
|
%MSBUILD_PATH% "SimpleTestPlugin.csproj" /p:Configuration=Debug /p:Platform=AnyCPU /verbosity:minimal
|
|
|
|
:end
|
|
if %ERRORLEVEL% EQU 0 (
|
|
echo Build successful!
|
|
) else (
|
|
echo Build failed!
|
|
) |