From 70e36d2d2d3f5c1691a4ee2edf41d9ad1ccebece Mon Sep 17 00:00:00 2001 From: Shad Storhaug Date: Tue, 15 Oct 2024 23:10:48 +0700 Subject: [PATCH 01/11] .build/runbuild.ps1: Removed zipPublishedArtifacts and publishedArtifactZipFileName parameters because they are not in use --- .build/runbuild.ps1 | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/.build/runbuild.ps1 b/.build/runbuild.ps1 index 35f5abe667..adb2461793 100644 --- a/.build/runbuild.ps1 +++ b/.build/runbuild.ps1 @@ -44,8 +44,6 @@ properties { [string]$platform = $(if ($platform) { $platform } else { if ($env:BuildPlatform) { $env:BuildPlatform } else { "Any CPU" } }) #NOTE: Pass in as a parameter (not a property) or environment variable to override [bool]$backupFiles = $true [bool]$prepareForBuild = $true - [bool]$zipPublishedArtifacts = $false - [string]$publishedArtifactZipFileName = "artifact.zip" [int]$maximumParallelJobs = 8 @@ -195,12 +193,7 @@ task Publish -depends Compile -description "This task uses dotnet publish to pac try { $frameworksToTest = Get-FrameworksToTest - - if ($zipPublishedArtifacts) { - $outDirectory = New-TemporaryDirectory - } else { - $outDirectory = $publishDirectory - } + $outDirectory = $publishDirectory foreach ($framework in $frameworksToTest) { @@ -246,12 +239,6 @@ task Publish -depends Compile -description "This task uses dotnet publish to pac # Getting the information back from the jobs (time consuming) #Get-Job | Receive-Job - if ($zipPublishedArtifacts) { - Ensure-Directory-Exists $publishDirectory - Add-Type -assembly "System.IO.Compression.Filesystem" - [System.IO.Compression.ZipFile]::CreateFromDirectory($outDirectory, "$publishDirectory/$publishedArtifactZipFileName") - } - $success = $true } finally { #if ($success -ne $true) { From 83f8d4738e9ec398530c8bda2233abb1c6bfbebd Mon Sep 17 00:00:00 2001 From: Shad Storhaug Date: Wed, 16 Oct 2024 01:40:35 +0700 Subject: [PATCH 02/11] .build/runbuild.ps1: Changed publish command to put the output into project-specific folders. --output for publish is no longer supported. See: https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/7.0/solution-level-output-no-longer-valid --- .build/runbuild.ps1 | 7 +++---- Directory.Build.targets | 4 ++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.build/runbuild.ps1 b/.build/runbuild.ps1 index adb2461793..4fad5efe5d 100644 --- a/.build/runbuild.ps1 +++ b/.build/runbuild.ps1 @@ -204,15 +204,14 @@ task Publish -depends Compile -description "This task uses dotnet publish to pac } $logPath = "$outDirectory/$framework" - $outputPath = "$logPath" # Do this first so there is no conflict - Ensure-Directory-Exists $outputPath + Ensure-Directory-Exists $logPath Write-Host "Configuration: $configuration" - $expression = "dotnet publish `"$solutionFile`" --configuration `"$configuration`" --framework `"$framework`" --output `"$outputPath`"" - $expression = "$expression --no-build --no-restore --verbosity Normal /p:TestFrameworks=true /p:Platform=`"$platform`"" + $expression = "dotnet publish `"$solutionFile`" --configuration `"$configuration`" --framework `"$framework`"" + $expression = "$expression --no-build --no-restore --verbosity Normal /p:TestFrameworks=true /p:Platform=`"$platform`" /p:AlternatePublishRootDirectory=`"$outDirectory`"" $expression = "$expression > `"$logPath/dotnet-publish.log`" 2> `"$logPath/dotnet-publish-error.log`"" $scriptBlock = { diff --git a/Directory.Build.targets b/Directory.Build.targets index 966808152a..35988f656f 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -22,6 +22,10 @@ + + $(AlternatePublishRootDirectory)/$(TargetFramework)/$(MSBuildProjectName)/ + + From 11313f7ba97843f456ac8791f176a53103d7d198 Mon Sep 17 00:00:00 2001 From: Shad Storhaug Date: Wed, 16 Oct 2024 01:57:05 +0700 Subject: [PATCH 03/11] run-tests-on-os.yml: Don't copy the test binaries. We put them in separate directories during publish instead. --- .build/azure-templates/run-tests-on-os.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.build/azure-templates/run-tests-on-os.yml b/.build/azure-templates/run-tests-on-os.yml index a6d771d800..9ebbb55a41 100644 --- a/.build/azure-templates/run-tests-on-os.yml +++ b/.build/azure-templates/run-tests-on-os.yml @@ -205,15 +205,6 @@ steps: if (!(Test-Path "$testResultDirectory")) { New-Item "$testResultDirectory" -ItemType Directory -Force } - # Test binaries are copied to a temp directory so locking behavior of other processes doesn't interfere with this test run - $tempTestDirectory = "$tempDirectory/$framework/$testName" - if (!(Test-Path "$tempTestDirectory")) { - New-Item "$tempTestDirectory" -ItemType Directory -Force - } - $testTarget = "$tempTestDirectory/$($testBinary.Name)" - $sourceDirectory = $testBinary.Directory.FullName - - Copy-Item -Path "$sourceDirectory/*" -Destination "$tempTestDirectory" -Recurse -Force if ($isNightly -ne 'true' -and $isWeekly -ne 'true') { $blameHangTimeout = "--blame-hang-timeout 15minutes" @@ -223,7 +214,7 @@ steps: Write-Host "Running with $blameHangTimeout" - $testExpression = "dotnet test ""$testTarget"" --framework ""$framework"" --blame --no-build --no-restore" + ` + $testExpression = "dotnet test ""$($testBinary.FullName)"" --framework ""$framework"" --blame --no-build --no-restore" + ` " --logger:""console;verbosity=normal"" --logger:""trx;LogFileName=$testResultsFileName""" + ` " --results-directory:""$testResultDirectory""" + ` " --blame-hang --blame-hang-dump-type mini $blameHangTimeout" From 5eaa1ea0c560d6ee2a0d60b7e754edbc0315aea3 Mon Sep 17 00:00:00 2001 From: Shad Storhaug Date: Fri, 18 Oct 2024 16:39:18 +0700 Subject: [PATCH 04/11] azure-pipelines.yml: Removed publish from the PSake run. We will be publishing in the pipeline, instead. --- azure-pipelines.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2bd5a72676..e10701144f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -132,16 +132,12 @@ stages: $parameters = @{} $properties = @{ backupFiles='false'; - publishDirectory='$(PublishTempDirectory)'; nugetPackageDirectory='$(NuGetArtifactDirectory)' } [string[]]$tasks = @($primaryCommand) - if ($env:RunTests -ne 'false') { - [string[]]$tasks = $primaryCommand,'Publish' - } Invoke-Psake $(BuildDirectory)/runbuild.ps1 -Task $tasks -properties $properties -parameters $parameters exit !($psake.build_success) - displayName: 'PSake Build, Pack, and Publish' + displayName: 'PSake Build and Pack' #- template: '.build/azure-templates/show-all-environment-variables.yml' # Uncomment for debugging @@ -235,6 +231,8 @@ stages: framework: 'net8.0' binaryArtifactName: '$(BinaryArtifactName)' testSettingsFilePath: '$(Build.ArtifactStagingDirectory)/$(TestSettingsFileName)' + configration: '$(BuildConfiguration)' + platform: '$(BuildPlatform)' - template: '.build/azure-templates/publish-test-binaries.yml' parameters: @@ -242,6 +240,8 @@ stages: framework: 'net6.0' binaryArtifactName: '$(BinaryArtifactName)' testSettingsFilePath: '$(Build.ArtifactStagingDirectory)/$(TestSettingsFileName)' + configration: '$(BuildConfiguration)' + platform: '$(BuildPlatform)' - template: '.build/azure-templates/publish-test-binaries.yml' parameters: @@ -249,6 +249,8 @@ stages: framework: 'net5.0' binaryArtifactName: '$(BinaryArtifactName)' testSettingsFilePath: '$(Build.ArtifactStagingDirectory)/$(TestSettingsFileName)' + configration: '$(BuildConfiguration)' + platform: '$(BuildPlatform)' - template: '.build/azure-templates/publish-test-binaries.yml' parameters: @@ -256,6 +258,8 @@ stages: framework: 'net472' binaryArtifactName: '$(BinaryArtifactName)' testSettingsFilePath: '$(Build.ArtifactStagingDirectory)/$(TestSettingsFileName)' + configration: '$(BuildConfiguration)' + platform: '$(BuildPlatform)' - template: '.build/azure-templates/publish-test-binaries.yml' parameters: @@ -263,6 +267,8 @@ stages: framework: 'net48' binaryArtifactName: '$(BinaryArtifactName)' testSettingsFilePath: '$(Build.ArtifactStagingDirectory)/$(TestSettingsFileName)' + configration: '$(BuildConfiguration)' + platform: '$(BuildPlatform)' - job: Docs condition: and(succeeded(), eq(variables['GenerateDocs'], 'true')) From 81a8c494ef1982292c0b4da795c963ab6d58174f Mon Sep 17 00:00:00 2001 From: Shad Storhaug Date: Fri, 18 Oct 2024 17:10:44 +0700 Subject: [PATCH 05/11] publish-test-binaries.yml: Added dotnet publish command to build the test binaries before uploading as artifacts and to delete them after uploaded to save disk space. --- .../azure-templates/publish-test-binaries.yml | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/.build/azure-templates/publish-test-binaries.yml b/.build/azure-templates/publish-test-binaries.yml index 436b8c090c..870aca6918 100644 --- a/.build/azure-templates/publish-test-binaries.yml +++ b/.build/azure-templates/publish-test-binaries.yml @@ -1,4 +1,4 @@ -# Licensed to the Apache Software Foundation (ASF) under one +# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file @@ -26,8 +26,33 @@ parameters: framework: '' # The target framework binaryArtifactName: '' # The prefix of the binary artifact to publish $(BinaryArtifactName) testSettingsFilePath: '$(Build.ArtifactStagingDirectory)/lucene.testsettings.json' #The name of the lucene test settings file + solution: '$(Build.SourcesDirectory)/Lucene.Net.sln' + configration: '$(BuildConfiguration)' # The build configuration + platform: '$(BuildPlatform)' # The build platform steps: +- pwsh: | + $solution = "${{ parameters.solution }}" + $configuration = "${{ parameters.configration }}" + $framework = "${{ parameters.framework }}" + $publishDirectory = "${{ parameters.publishDirectory }}" + Write-Host "solution: $solution" + Write-Host "configuration: $configuration" + Write-Host "framework: $framework" + Write-Host "publishDirectory: $publishDirectory" + &dotnet publish "${{ parameters.solution }}" --configuration "${{ parameters.configration }}" --framework: "${{ parameters.framework }}" --no-build --no-restore --verbosity normal /p:TestFrameworks=true /p:Platform="${{ parameters.platform }}" /p:AlternatePublishRootDirectory="${{ parameters.publishDirectory }}" + displayName: 'Publish Projects for ${{ parameters.framework }}' + condition: and(succeeded(), ne(variables['RunTests'], 'false')) + +#- task: DotNetCoreCLI@2 +# displayName: 'Publish Projects for ${{ parameters.framework }}' +# inputs: +# command: custom +# projects: '**/*.sln' +# custom: publish +# arguments: '--configuration "${{ parameters.configuration }}" --framework: "${{ parameters.framework }}" --no-build --no-restore --verbosity normal /p:TestFrameworks=true /p:Platform="${{ parameters.platform }}" /p:AlternatePublishRootDirectory="${{ parameters.publishDirectory }}"' +# condition: and(succeeded(), ne(variables['RunTests'], 'false')) + - pwsh: | Copy-Item -Path "${{ parameters.testSettingsFilePath }}" -Destination "${{ parameters.publishDirectory }}/${{ parameters.framework }}/" -Force displayName: 'Copy lucene.testsettings.json File to: ${{ parameters.publishDirectory }}/${{ parameters.framework }}' @@ -40,3 +65,8 @@ steps: artifact: '${{ parameters.binaryArtifactName }}_${{ parameters.framework }}' publishLocation: 'pipeline' condition: and(succeeded(), ne(variables['RunTests'], 'false')) + +- pwsh: | + Remove-Item -Path "${{ parameters.publishDirectory }}/${{ parameters.framework }}/*" -Recurse -Force + displayName: 'Delete temp publish location: ${{ parameters.publishDirectory }}/${{ parameters.framework }}' + condition: and(succeeded(), ne(variables['RunTests'], 'false')) From 0a5f950041b203352dc6362561113315eb871ddb Mon Sep 17 00:00:00 2001 From: Shad Storhaug Date: Fri, 18 Oct 2024 21:01:59 +0700 Subject: [PATCH 06/11] LuceneDocsPlugins.csproj: Don't publish if not on net8.0 --- src/docs/LuceneDocsPlugins/LuceneDocsPlugins.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/docs/LuceneDocsPlugins/LuceneDocsPlugins.csproj b/src/docs/LuceneDocsPlugins/LuceneDocsPlugins.csproj index 5e7db5f2f6..75e2664d5a 100644 --- a/src/docs/LuceneDocsPlugins/LuceneDocsPlugins.csproj +++ b/src/docs/LuceneDocsPlugins/LuceneDocsPlugins.csproj @@ -38,6 +38,7 @@ under the License. true + false From ba0f1b0e7e7b69b0fafc1f438b5871fe240f5c74 Mon Sep 17 00:00:00 2001 From: Shad Storhaug Date: Fri, 18 Oct 2024 21:22:40 +0700 Subject: [PATCH 07/11] lucene-cli.csproj: Don't publish if not net8.0 or net6.0 --- src/dotnet/tools/lucene-cli/lucene-cli.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dotnet/tools/lucene-cli/lucene-cli.csproj b/src/dotnet/tools/lucene-cli/lucene-cli.csproj index 21b398da86..73a1446b07 100644 --- a/src/dotnet/tools/lucene-cli/lucene-cli.csproj +++ b/src/dotnet/tools/lucene-cli/lucene-cli.csproj @@ -27,8 +27,8 @@ net8.0;net6.0 Major - true - false + false + true true lucene From 763a9007461cf8d1cfdb94842ea79c1d62939680 Mon Sep 17 00:00:00 2001 From: Shad Storhaug Date: Sat, 19 Oct 2024 11:17:12 +0700 Subject: [PATCH 08/11] azure-pipelines.yml: Added task to delete nuget artifacts from the build agent after they have been published to the pipeline --- azure-pipelines.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e10701144f..69fcdb2a2d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -209,6 +209,14 @@ stages: TargetFolder: '$(Build.ArtifactStagingDirectory)/$(DebugArtifactName)' condition: and(succeeded(), ne(variables['ArtifactFeedID'], '')) + - task: PublishPipelineArtifact@1 + displayName: 'Publish Artifact: $(DebugArtifactName)' + inputs: + targetPath: '$(Build.ArtifactStagingDirectory)/$(DebugArtifactName)' + artifact: '$(DebugArtifactName)' + publishLocation: 'pipeline' + condition: and(succeeded(), ne(variables['ArtifactFeedID'], '')) + - task: PublishPipelineArtifact@1 displayName: 'Publish Artifact: $(NuGetArtifactName)' inputs: @@ -217,13 +225,10 @@ stages: publishLocation: 'pipeline' condition: and(succeeded(), ne(variables['RunPack'], 'false')) - - task: PublishPipelineArtifact@1 - displayName: 'Publish Artifact: $(DebugArtifactName)' - inputs: - targetPath: '$(Build.ArtifactStagingDirectory)/$(DebugArtifactName)' - artifact: '$(DebugArtifactName)' - publishLocation: 'pipeline' - condition: and(succeeded(), ne(variables['ArtifactFeedID'], '')) + - pwsh: | + Remove-Item -Path "$(Build.ArtifactStagingDirectory)/$(NuGetArtifactName)/*" -Recurse -Force + displayName: 'Delete temp publish location: $(Build.ArtifactStagingDirectory)/$(NuGetArtifactName)' + condition: and(succeeded(), ne(variables['RunPack'], 'false')) - template: '.build/azure-templates/publish-test-binaries.yml' parameters: From 43a3c8a9a0a224c62688f077d3758a69b2d1ae1c Mon Sep 17 00:00:00 2001 From: Shad Storhaug Date: Sat, 19 Oct 2024 11:26:42 +0700 Subject: [PATCH 09/11] azure-pipelines.yml: Cleaned up environment variable usage --- azure-pipelines.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 69fcdb2a2d..74f46ddcb7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -101,9 +101,6 @@ stages: pool: vmImage: 'windows-2019' - variables: - PublishTempDirectory: '$(Build.ArtifactStagingDirectory)/publish' - steps: - checkout: self # self represents the repo where the initial Pipelines YAML file was found @@ -220,19 +217,19 @@ stages: - task: PublishPipelineArtifact@1 displayName: 'Publish Artifact: $(NuGetArtifactName)' inputs: - targetPath: '$(Build.ArtifactStagingDirectory)/$(NuGetArtifactName)' + targetPath: '$(NuGetArtifactDirectory)' artifact: '$(NuGetArtifactName)' publishLocation: 'pipeline' condition: and(succeeded(), ne(variables['RunPack'], 'false')) - pwsh: | - Remove-Item -Path "$(Build.ArtifactStagingDirectory)/$(NuGetArtifactName)/*" -Recurse -Force - displayName: 'Delete temp publish location: $(Build.ArtifactStagingDirectory)/$(NuGetArtifactName)' + Remove-Item -Path "$(NuGetArtifactDirectory)/*" -Recurse -Force + displayName: 'Delete temp publish location: $(NuGetArtifactDirectory)' condition: and(succeeded(), ne(variables['RunPack'], 'false')) - template: '.build/azure-templates/publish-test-binaries.yml' parameters: - publishDirectory: $(PublishTempDirectory) + publishDirectory: $(PublishDirectory) framework: 'net8.0' binaryArtifactName: '$(BinaryArtifactName)' testSettingsFilePath: '$(Build.ArtifactStagingDirectory)/$(TestSettingsFileName)' @@ -241,7 +238,7 @@ stages: - template: '.build/azure-templates/publish-test-binaries.yml' parameters: - publishDirectory: $(PublishTempDirectory) + publishDirectory: $(PublishDirectory) framework: 'net6.0' binaryArtifactName: '$(BinaryArtifactName)' testSettingsFilePath: '$(Build.ArtifactStagingDirectory)/$(TestSettingsFileName)' @@ -250,7 +247,7 @@ stages: - template: '.build/azure-templates/publish-test-binaries.yml' parameters: - publishDirectory: $(PublishTempDirectory) + publishDirectory: $(PublishDirectory) framework: 'net5.0' binaryArtifactName: '$(BinaryArtifactName)' testSettingsFilePath: '$(Build.ArtifactStagingDirectory)/$(TestSettingsFileName)' @@ -259,7 +256,7 @@ stages: - template: '.build/azure-templates/publish-test-binaries.yml' parameters: - publishDirectory: $(PublishTempDirectory) + publishDirectory: $(PublishDirectory) framework: 'net472' binaryArtifactName: '$(BinaryArtifactName)' testSettingsFilePath: '$(Build.ArtifactStagingDirectory)/$(TestSettingsFileName)' @@ -268,7 +265,7 @@ stages: - template: '.build/azure-templates/publish-test-binaries.yml' parameters: - publishDirectory: $(PublishTempDirectory) + publishDirectory: $(PublishDirectory) framework: 'net48' binaryArtifactName: '$(BinaryArtifactName)' testSettingsFilePath: '$(Build.ArtifactStagingDirectory)/$(TestSettingsFileName)' From 3338c7531237882f6c67296377a2dd0e092658df Mon Sep 17 00:00:00 2001 From: Shad Storhaug Date: Sat, 19 Oct 2024 11:30:30 +0700 Subject: [PATCH 10/11] .github/workflows: Removed Lucene-Net-Dependency-Conflict-Warning.yml, since we are now publishing projects to individual directories. See: https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/7.0/solution-level-output-no-longer-valid --- ...Lucene-Net-Dependency-Conflict-Warning.yml | 45 ------------------- 1 file changed, 45 deletions(-) delete mode 100644 .github/workflows/Lucene-Net-Dependency-Conflict-Warning.yml diff --git a/.github/workflows/Lucene-Net-Dependency-Conflict-Warning.yml b/.github/workflows/Lucene-Net-Dependency-Conflict-Warning.yml deleted file mode 100644 index d8da6c9ddd..0000000000 --- a/.github/workflows/Lucene-Net-Dependency-Conflict-Warning.yml +++ /dev/null @@ -1,45 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# References: -# https://stackoverflow.com/a/58704739 -# https://docs.github.com/en/actions/security-guides/automatic-token-authentication - -name: 'Lucene.Net Dependency Conflict Warning' - -on: - pull_request: - paths: - - '.build/dependencies.props' - - 'src/**/*.csproj' - -jobs: - - comment: - runs-on: ubuntu-latest - steps: - - name: Add warning comment to PR - env: - URL: ${{ github.event.pull_request.comments_url }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - curl \ - -X POST \ - $URL \ - -H "Content-Type: application/json" \ - -H "Authorization: token $GITHUB_TOKEN" \ - --data '{ "body": ":warning: **IMPORTANT:** This PR may contain changes to dependency versions. The GitHub Actions test runner is not set up to detect dependency version conflicts between projects. To ensure the changes do not cause dependency conflicts, [run the tests for these changes in Azure DevOps](https://github.com/apache/lucenenet#azure-devops) before accepting this pull request. :warning:" }' From a049c0af5efe9b43e8f4d73c16064c42b4f089c7 Mon Sep 17 00:00:00 2001 From: Shad Storhaug Date: Sat, 19 Oct 2024 13:28:25 +0700 Subject: [PATCH 11/11] azure-pipelines.yml: Setup BuildPlatform env variable for current pipeline --- azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 74f46ddcb7..9c8282fda1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -109,6 +109,8 @@ stages: - pwsh: | $configuration = if ($env:BUILDCONFIGURATION) { $env:BUILDCONFIGURATION } else { "Release" } Write-Host "##vso[task.setvariable variable=BuildConfiguration;]$configuration" + $platform = if ($env:BUILDPLATFORM) { $env:BUILDPLATFORM } else { "Any CPU" } + Write-Host "##vso[task.setvariable variable=BuildPlatform;]$platform" $isRelease = if ($env:ISRELEASE -eq 'true') { 'true' } else { 'false' } Write-Host "##vso[task.setvariable variable=IsRelease;]$isRelease" $isNightly = if ($env:ISNIGHTLY -eq 'true') { 'true' } else { 'false' }