xamarin-android/build-tools/automation
Peter Collins 11fe204545
[build] Fix local workload template creation (#9250)
The targets that set up the local workload have been moved into a
separate ConfigureLocalWorkload.targets, as the Directory.Build.targets
file was getting crowded.

The template pack is no longer deleted by DeleteExtractedWorkloadPacks,
allowing dotnet-local scripts to create new templates again.

The workload files and metadata created when installing the temporary
`android-deps` workload are now cleaned up, which should fix issues
where `bin/Debug/dotnet/dotnet` invocations could fail with:

    System.Collections.Generic.KeyNotFoundException: The given key 'android-deps' was not present in the dictionary.
       at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
       at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.GetManifestFromWorkload(WorkloadId workloadId)
       at Microsoft.DotNet.Cli.WorkloadCommandParser.ShowWorkloadsInfo(ParseResult parseResult, WorkloadInfoHelper workloadInfoHelper, IReporter reporter, String dotnetDir, Boolean showVersion)
       at Microsoft.DotNet.Cli.CommandLineInfo.PrintInfo()
       at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)
       at Microsoft.DotNet.Cli.Program.Main(String[] args)

The temporary `android-deps` workload will now install all of the
runtime workloads that our workload extends, rather than a hard-coded
subset. This should allow the local workload setup to build projects
targeting both net9.0-android and net8.0-android.

The Windows build stage has been updated to use the local workload
configuration for all tests, including creating and building a template.
2024-08-27 20:05:16 -04:00
..
yaml-templates [build] Fix local workload template creation (#9250) 2024-08-27 20:05:16 -04:00
azure-pipelines-apidocs.yaml [ci] Move PR build to shared pool (#8854) 2024-07-02 10:56:46 -04:00
azure-pipelines-nightly.yaml [ci] Move PR build to shared pool (#8854) 2024-07-02 10:56:46 -04:00
azure-pipelines-release-trigger.yaml It's ".NET for Android", not ".NET Android" (#8933) 2024-05-13 12:01:00 -04:00
azure-pipelines.yaml [ci] Improve push_signed_nugets job condition (#9240) 2024-08-22 08:35:38 -04:00
onelocbuild.yaml Force loc task pool image to windows (#8983) 2024-05-24 19:39:26 -04:00
utils.groovy