diff --git a/images/macos/software-report/SoftwareReport.Common.psm1 b/images/macos/software-report/SoftwareReport.Common.psm1 index 7f141687a..a316ae175 100644 --- a/images/macos/software-report/SoftwareReport.Common.psm1 +++ b/images/macos/software-report/SoftwareReport.Common.psm1 @@ -156,6 +156,14 @@ function Get-PHPVersion { return $PHPVersion } +function Get-MSBuildVersion { + $msbuildVersion = msbuild -version | Select-Object -Last 1 + $result = Select-String -Path (Get-Command msbuild).Source -Pattern "msbuild" + $result -match "(?\/\S*\.dll)" | Out-Null + $msbuildPath = $Matches.path + return "MSBuild $msbuildVersion (from $msbuildPath)" +} + function Get-NodeVersion { $nodeVersion = Run-Command "node --version" return "Node.js $nodeVersion" diff --git a/images/macos/software-report/SoftwareReport.Generator.ps1 b/images/macos/software-report/SoftwareReport.Generator.ps1 index a1c77fe9e..5860e5d3e 100644 --- a/images/macos/software-report/SoftwareReport.Generator.ps1 +++ b/images/macos/software-report/SoftwareReport.Generator.ps1 @@ -32,6 +32,7 @@ $markdown += New-MDHeader "Installed Software" -Level 2 $markdown += New-MDHeader "Language and Runtime" -Level 3 $languageAndRuntimeList = @( (Get-BashVersion), + (Get-MSBuildVersion), (Get-NodeVersion), (Get-NVMVersion), (Get-NVMNodeVersionList), diff --git a/images/macos/tests/Xamarin.Tests.ps1 b/images/macos/tests/Xamarin.Tests.ps1 index 745086f91..3d7a97dde 100644 --- a/images/macos/tests/Xamarin.Tests.ps1 +++ b/images/macos/tests/Xamarin.Tests.ps1 @@ -75,9 +75,13 @@ Describe "Mono" { } } } + + It "MSBuild is available" { + "msbuild -version" | Should -ReturnZeroExitCode + } } -Describe "Xamarin.iOS" { +Describe "Xamarin.iOS" { $XAMARIN_IOS_VERSIONS | ForEach-Object { Context "$_" { $XAMARIN_IOS_VERSIONS_PATH = "/Library/Frameworks/Xamarin.iOS.framework/Versions"