Skip to content

Commit 03a28f0

Browse files
rumyaxAlexander Smolyakov
andauthored
[MSBuildHelpers, MSBuildV1, VSBuildV1, XamarinAndroidV1] Enable fix for MSBuild.Logger (#15496)
* enableOrphanedProjectsLogs=true for MSBuild.Logger * MSBuildV1 package.json updated * bump up msbuild task version * bump up version for VSBuild and XamarinAndroid tasks * enableOrphanedProjectsLogs=true added to tests * common-npm-packages - update InvokeFunctions * update common-npm-packages - MSBuildHelpers * timeout changed from 20 sec to 30 sec * bump version from 2.196.0 to 2.197.0 Co-authored-by: Alexander Smolyakov <[email protected]>
1 parent 49a8456 commit 03a28f0

28 files changed

+35
-35
lines changed

Tasks/Common/MSBuildHelpers/InvokeFunctions.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function Invoke-MSBuild {
108108
# Hook up the custom logger.
109109
$loggerAssembly = "$PSScriptRoot\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll"
110110
Assert-VstsPath -LiteralPath $loggerAssembly -PathType Leaf
111-
$arguments = "$arguments /dl:CentralLogger,`"$loggerAssembly`";`"RootDetailId=$($detailId)|SolutionDir=$($solutionDirectory)`"*ForwardingLogger,`"$loggerAssembly`""
111+
$arguments = "$arguments /dl:CentralLogger,`"$loggerAssembly`";`"RootDetailId=$($detailId)|SolutionDir=$($solutionDirectory)|enableOrphanedProjectsLogs=true`"*ForwardingLogger,`"$loggerAssembly`""
112112
}
113113

114114
# Append additional arguments.

Tasks/Common/MSBuildHelpers/Tests/Invoke-MSBuild.CombinesMsbuildexe.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ $actual = & $module Invoke-MSBuild -ProjectFile 'Some project file' -NoTimelineL
1919
# Assert.
2020
Assert-WasCalled Assert-VstsPath -- -LiteralPath $expectedMSBuildPath -PathType Leaf
2121
Assert-WasCalled Assert-VstsPath -- -LiteralPath $expectedLoggerPath -PathType Leaf
22-
Assert-WasCalled Invoke-VstsTool -- -FileName $expectedMSBuildPath -Arguments "`"Some project file`" /nologo /nr:false /dl:CentralLogger,`"$expectedLoggerPath`";`"RootDetailId=|SolutionDir=`"*ForwardingLogger,`"$expectedLoggerPath`"" -RequireExitCodeZero
22+
Assert-WasCalled Invoke-VstsTool -- -FileName $expectedMSBuildPath -Arguments "`"Some project file`" /nologo /nr:false /dl:CentralLogger,`"$expectedLoggerPath`";`"RootDetailId=|SolutionDir=|enableOrphanedProjectsLogs=true`"*ForwardingLogger,`"$expectedLoggerPath`"" -RequireExitCodeZero
2323
Assert-WasCalled Write-VstsSetResult -Times 0
2424
Assert-AreEqual -Expected @(
2525
'Some output 1'

Tasks/Common/MSBuildHelpers/Tests/Invoke-MSBuild.FailsRootTimelineDetailOnExitCode.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Assert-WasCalled Write-VstsLogDetail -ParametersEvaluator {
3131
$State -eq 'Initialized' -and
3232
$AsOutput -eq $true
3333
}
34-
Assert-WasCalled Invoke-VstsTool -- -FileName $expectedMSBuildPath -Arguments "`"$expectedProjectFile`" /nologo /nr:false /dl:CentralLogger,`"$expectedLoggerPath`";`"RootDetailId=$script:rootDetailId|SolutionDir=C:\Some solution dir`"*ForwardingLogger,`"$expectedLoggerPath`"" -RequireExitCodeZero
34+
Assert-WasCalled Invoke-VstsTool -- -FileName $expectedMSBuildPath -Arguments "`"$expectedProjectFile`" /nologo /nr:false /dl:CentralLogger,`"$expectedLoggerPath`";`"RootDetailId=$script:rootDetailId|SolutionDir=C:\Some solution dir|enableOrphanedProjectsLogs=true`"*ForwardingLogger,`"$expectedLoggerPath`"" -RequireExitCodeZero
3535
Assert-WasCalled Write-VstsSetResult -- -Result Failed -DoNotThrow
3636
Assert-AreEqual -Expected @(
3737
'Some output 1'

Tasks/Common/MSBuildHelpers/Tests/Invoke-MSBuild.OmitsTimelineDetail.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ $actual = & $module Invoke-MSBuild -ProjectFile $expectedProjectFile -NoTimeline
2020
# Assert.
2121
Assert-WasCalled Assert-VstsPath -- -LiteralPath $expectedMSBuildPath -PathType Leaf
2222
Assert-WasCalled Assert-VstsPath -- -LiteralPath $expectedLoggerPath -PathType Leaf
23-
Assert-WasCalled Invoke-VstsTool -- -FileName $expectedMSBuildPath -Arguments "`"$expectedProjectFile`" /nologo /nr:false /dl:CentralLogger,`"$expectedLoggerPath`";`"RootDetailId=|SolutionDir=C:\Some solution dir`"*ForwardingLogger,`"$expectedLoggerPath`"" -RequireExitCodeZero
23+
Assert-WasCalled Invoke-VstsTool -- -FileName $expectedMSBuildPath -Arguments "`"$expectedProjectFile`" /nologo /nr:false /dl:CentralLogger,`"$expectedLoggerPath`";`"RootDetailId=|SolutionDir=C:\Some solution dir|enableOrphanedProjectsLogs=true`"*ForwardingLogger,`"$expectedLoggerPath`"" -RequireExitCodeZero
2424
Assert-WasCalled Write-VstsSetResult -Times 0
2525
Assert-AreEqual -Expected @(
2626
'Some output 1'

Tasks/Common/MSBuildHelpers/Tests/Invoke-MSBuild.SkipsLogUploadIfMissing.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ $actual = & $module Invoke-MSBuild -ProjectFile $expectedProjectFile -NoTimeline
2424
# Assert.
2525
Assert-WasCalled Assert-VstsPath -- -LiteralPath $expectedMSBuildPath -PathType Leaf
2626
Assert-WasCalled Assert-VstsPath -- -LiteralPath $expectedLoggerPath -PathType Leaf
27-
Assert-WasCalled Invoke-VstsTool -- -FileName $expectedMSBuildPath -Arguments "`"$expectedProjectFile`" /nologo /nr:false /fl /flp:`"logfile=$expectedLogFile;verbosity=$expectedLogFileVerbosity`" /dl:CentralLogger,`"$expectedLoggerPath`";`"RootDetailId=|SolutionDir=C:\Some solution dir`"*ForwardingLogger,`"$expectedLoggerPath`"" -RequireExitCodeZero
27+
Assert-WasCalled Invoke-VstsTool -- -FileName $expectedMSBuildPath -Arguments "`"$expectedProjectFile`" /nologo /nr:false /fl /flp:`"logfile=$expectedLogFile;verbosity=$expectedLogFileVerbosity`" /dl:CentralLogger,`"$expectedLoggerPath`";`"RootDetailId=|SolutionDir=C:\Some solution dir|enableOrphanedProjectsLogs=true`"*ForwardingLogger,`"$expectedLoggerPath`"" -RequireExitCodeZero
2828
Assert-WasCalled Write-VstsSetResult -Times 0
2929
Assert-WasCalled Write-Host -Times 0
3030
Assert-AreEqual -Expected @(

Tasks/Common/MSBuildHelpers/Tests/Invoke-MSBuild.WritesRootTimelineDetail.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Assert-WasCalled Write-VstsLogDetail -ParametersEvaluator {
3131
$State -eq 'Initialized' -and
3232
$AsOutput -eq $true
3333
}
34-
Assert-WasCalled Invoke-VstsTool -- -FileName $expectedMSBuildPath -Arguments "`"$expectedProjectFile`" /nologo /nr:false /dl:CentralLogger,`"$expectedLoggerPath`";`"RootDetailId=$script:rootDetailId|SolutionDir=C:\Some solution dir`"*ForwardingLogger,`"$expectedLoggerPath`"" -RequireExitCodeZero
34+
Assert-WasCalled Invoke-VstsTool -- -FileName $expectedMSBuildPath -Arguments "`"$expectedProjectFile`" /nologo /nr:false /dl:CentralLogger,`"$expectedLoggerPath`";`"RootDetailId=$script:rootDetailId|SolutionDir=C:\Some solution dir|enableOrphanedProjectsLogs=true`"*ForwardingLogger,`"$expectedLoggerPath`"" -RequireExitCodeZero
3535
Assert-WasCalled Write-VstsSetResult -Times 0
3636
Assert-AreEqual -Expected @(
3737
'Some output 1'

Tasks/Common/MSBuildHelpers/Tests/L0.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var psm = require('../../../../Tests/lib/psRunner');
99
var psr = null;
1010

1111
describe('Common-MSBuildHelpers Suite', function () {
12-
this.timeout(parseInt(process.env.TASK_TEST_TIMEOUT) || 20000);
12+
this.timeout(parseInt(process.env.TASK_TEST_TIMEOUT) || 30000);
1313

1414
before((done) => {
1515
if (psm.testSupported()) {

Tasks/Common/MSBuildHelpers/make.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"externals": {
33
"archivePackages": [
44
{
5-
"url": "https://vstsagenttools.blob.core.windows.net/tools/msbuildlogger/4/msbuildlogger.zip",
5+
"url": "https://vstsagenttools.blob.core.windows.net/tools/msbuildlogger/5/msbuildlogger.zip",
66
"dest": "./"
77
},
88
{

Tasks/Common/MSBuildHelpers/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tasks/Common/MSBuildHelpers/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "msbuildhelpers",
3-
"version": "1.192.1",
3+
"version": "1.197.0",
44
"description": "Azure Pipelines tasks MSBuild helpers",
55
"main": "msbuildhelpers.js",
66
"scripts": {

0 commit comments

Comments
 (0)