You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Xamarin.Android.Build.Tasks] Avoid MSB4018; use XA[A-Z]{3}7[0-9]{3} (#3609)
Changes: https://github.com/xamarin/monodroid/compare/3ed4b1921a43a6bf5718e82c923040e2512dd8cf...623845d44abe5eb7a76d9a63d48b30a27ac1bac2
Bumps to xamarin/monodroid/master@623845d4.
Errors and warning *codes* for errors and warnings reported
*within Visual Studio* from developers participating in the
[Visual Studio Customer Experience Improvement Program][0] are
reported "telemetry" events, but *only* the error and warning codes
are reported. The warning and error message contents are not sent.
Unfortunately all unhandled exceptions not caught within our MSBuild
tasks are reported as `MSB4018`, which reduces the utility of
telemetry, making it more difficult to better understand where our
build system could be improved.
Update all of our tasks to inherit from one of the new types
`AndroidTask`, `AndroidAsyncTask`, or `AndroidToolTask`. These tasks
add catch-all exception handlers that capture and log unhandled
exceptions instead of allowing them to leak out to MSBuild, producing
more useful error and warning message codes for telemetry.
Each error code contains:
1. An `XA` prefix to denote that it is from Xamarin.Android so our
codes do not collide with other components.
2. Three-letters to designate which Task is throwing the error.
For example, the `<Aot/>` task uses `AOT` while the
`<LinkAssemblies/>` task uses `LNK`.
3. A `7` to designate unhandled exceptions.
4. Three digits to specify a particular exception type, or `000`
for an unmapped exception type.
See `src/Xamarin.Android.Build.Tasks/Utilities/UnhandledExceptionLogger.cs`
for the mapping from exception types to numbers.
For example, a `NullReferenceException` thrown from the
`<LinkAssemblies>` task will now result in an XALNK7001 error
(instead of an MSB4018), while a `StackOverflowException` within the
`<Aot/>` task will result in an XAAOT7016 error.
[0]: https://docs.microsoft.com/en-us/visualstudio/ide/visual-studio-experience-improvement-program?view=vs-2019
0 commit comments