Skip to content

[Xamarin.Android.Build.Tests] Try to parse some errors out of the build log to surface. - #4451

Closed
jpobst wants to merge 1 commit into
masterfrom
test-message
Closed

jpobst wants to merge 1 commit into
masterfrom
test-message

Conversation

@jpobst

@jpobst jpobst commented Mar 24, 2020 •

Copy link
Copy Markdown
Contributor

When viewing a failed MSBuild test in AzDO, the surfaced message is:

Xamarin.ProjectTools.FailedBuildException : Build failure: UnnamedProject.csprojBuild log recorded at C:\A\vs2019xam000006-1_work\1\s\bin\TestRelease\temp\CheckAapt2WarningsDoNotGenerateErrors\build.log

To find the actual error, one must view the attached build.log, which if > 1MB cannot be viewed in the UI and must be downloaded and then viewed.

This PR attempts to parse MSBuild errors out the build log, and if some are found, it displays them in the original message, saving several clicks.

New message:

Xamarin.ProjectTools.FailedBuildException : 
Build failure: UnnamedProject.csproj
Build log recorded at C:\A\vs2019xam000006-1_work\1\s\bin\TestRelease\temp\CheckAapt2WarningsDoNotGenerateErrors\build.log

Error(s):
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(700,2): error XA5207: Could not find android.jar for API level 27. This means the Android SDK platform for API level 27 is not installed. Either install it in the Android SDK Manager (Tools > Android > Android SDK Manager...), or change the Xamarin.Android project to target an API version that is installed. (C:\Program Files (x86)\Android\android-sdk\platforms\android-27\android.jar missing.) [C:\A\vs2019xam000006-1\_work\1\s\bin\TestRelease\temp\CheckAapt2WarningsDoNotGenerateErrors\UnnamedProject.csproj]

@jpobst jpobst closed this Sep 9, 2020
@jpobst
jpobst deleted the test-message branch September 9, 2020 15:40
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant