I've got a .Net Framework 4.6.1 project, which creates a Windows Service. We want to have this built and deployed by an Azure Devops pipeline. We've successfully created pipelines for all of our .Net Core web services (using the ASPNETCORE_ENVIRONMENT variable and a set of appsettings.{ENV}.json files) but the Windows Services don't seem to play as nicely in terms of providing different configuration for different environments.
I've got XDT transformations working for the App.config XML file. I can right click the files in Visual Studio and "Preview Transform" and it works fine.
What's not clear is how I translate this to the pipeline configuration. The Build task seems to be capable of running the transform but then I'm not sure how we have a different transformation for different Deploy stages. What happens instead is that all environments end up with whatever transformation was applied to the Build Configuration selected as part of the Build step.
I've followed numerous blog posts - including this one, which claims you can have multiple build configurations, but for which I don't seem to have the setting.
What am I missing?