The two options to look into are:
- Detecting the language in a pre-step of the build pipeline, and set the builder accordingly (paketo.io supports c#, see https://paketo.io/docs/howto/dotnet-core/)
- Inject the buildpack https://elements.heroku.com/buildpacks/jincod/dotnetcore-buildpack as we do with others after the detect script runs (see https://gitlab.wikimedia.org/repos/cloud/toolforge/builds-builder/-/blob/main/deployment/chart/templates/task-combined.yaml.gotmpl?ref_type=heads#L301).
What will be done:
- Upgrade the builder to the latest supported one (heroku/builder:22), that has the latest lifecycle image.
- Use the lifecycle image from the builder
- Inject buildpacks before the detect step
- Add the jincod/dotnetcore-buildpack third-party buildpack to be injected too
- Enjoy and rejoice
All this with an eye on T352389: [tbs][builder] Explore adding support for third-party buildpacks.