dotnet / android

.NET for Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#
MIT License
1.92k stars 526 forks source link

Create optional bill of materials output #9294

Open jpobst opened 1 week ago

jpobst commented 1 week ago

We often get support requests of the form "this works when I build my app on my machine, but fails when I build it on CI". These usually point to a difference in build environments between the machines. Technically, the versions used for all the build tools are probably in a .binlog, but it takes a lot of spelunking and knowledge to be able to compare two .binlog's. Some information is also available in $(IntermediateOutputPath)build.props but it's hidden deep in the obj directory.

If we made this process easier, would it empower users to self-diagnose build environment differences between machines, eliminating the need for our help?

Possible Solution

Nothing is done by default. A user can add the following MSBuild to their project to generate a BOM manifest that is written to the $(OutputPath):

<AndroidGenerateBOMManifest>true</AndroidGenerateBOMManifest>

The file written to the project output can be whatever format but should contain the following non-exhaustive list of information: