diff --git a/.codeql.yml b/.codeql.yml index 462a0be40..402e1fe9b 100644 --- a/.codeql.yml +++ b/.codeql.yml @@ -47,7 +47,6 @@ jobs: timeoutInMinutes: 90 steps: - - task: UseDotNet@2 inputs: useGlobalJson: true @@ -58,7 +57,7 @@ jobs: - script: .\build.cmd EnableSkipStrongNames displayName: Windows Build - EnableSkipStrongNames - - script: .\build.cmd Build /p:BuildPortable=true /p:Desktop=false + - script: .\build.cmd Build /p:BuildPortable=true displayName: Windows Build - task: CodeQL3000Finalize@0 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index fea01ece8..a4050925e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -65,7 +65,7 @@ jobs: - script: .\build.cmd EnableSkipStrongNames displayName: Enable SkipStrongNames - - script: .\build.cmd $(_BuildTarget) /p:Desktop=false /p:BuildPortable=true ^ + - script: .\build.cmd $(_BuildTarget) /p:BuildPortable=true ^ /binaryLogger:artifacts/msbuild.binlog /p:Configuration=$(_Configuration) /p:StyleCopEnabled=$(_StyleCopEnabled) ^ /fileLoggerParameters:LogFile=artifacts/msbuild.log;Summary;Verbosity=minimal displayName: Build diff --git a/build.cmd b/build.cmd index 5a6a4f8f9..a37e007d6 100644 --- a/build.cmd +++ b/build.cmd @@ -38,15 +38,18 @@ if exist "%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe" ( goto BuildFail ) +REM Are we running in a local dev environment (not on CI)? +if DEFINED CI (set Desktop=false) else if DEFINED TEAMCITY_VERSION (set Desktop=false) else (set Desktop=true) + if "%1" == "" goto BuildDefaults -%MSBuild% Runtime.msbuild /m /nr:false /p:Platform="Any CPU" /p:Desktop=true /v:M ^ +%MSBuild% Runtime.msbuild /m /nr:false /p:Platform="Any CPU" /p:Desktop=%Desktop% /v:M ^ /fl /fileLoggerParameters:LogFile=bin\msbuild.log;Verbosity=Normal /consoleLoggerParameters:Summary /t:%* if %ERRORLEVEL% neq 0 goto BuildFail goto BuildSuccess :BuildDefaults -%MSBuild% Runtime.msbuild /m /nr:false /p:Platform="Any CPU" /p:Desktop=true /v:M ^ +%MSBuild% Runtime.msbuild /m /nr:false /p:Platform="Any CPU" /p:Desktop=%Desktop% /v:M ^ /fl /fileLoggerParameters:LogFile=bin\msbuild.log;Verbosity=Normal /consoleLoggerParameters:Summary if %ERRORLEVEL% neq 0 goto BuildFail goto BuildSuccess