So far I have been using my own build Powershell script to build my code. Why? Because I like to have a binary log when a diag build is requested and have it attached to the build as an artifact.
But now that I use YAML I would like to use more of the standard tasks available with Azure DevOps. Namely the DotNet Build task. But I do not see how can I make it generate the binary log and attach to the build without writing a custom script anyway. I want it to work transparently - triggering a diag build (i.e. System.Debug
is true) should do two things:
- Pass
-bl:TheBinaryLogFilePath
to the dotnet build - Attach
TheBinaryLogFilePath
to the build as an artifact.
Is it possible in a straightforward manner without writing a custom script (otherwise not worth using the standard task anyway)?