jaybro
jaybro

Reputation: 1543

How to add app.config transform to a 4.8 Azure WebJob (.NET Framework) in VS 2022?

After creating a project using Azure WebJob (.NET Framework) template with 4.8.1 in VS2022, app.config transformations do not appear to be supported. The right-click to add the transform is not available. Also, hacking the csproj file to arrange transforms that are "DependentUpon" the app.config results in the correct appearance in the Solution Explorer, but build, debugging and publish do not result in any transformation taking place.

Microsoft Visual Studio Professional 2022 (64-bit) Version 17.4.4

Has anyone achieved this?

Upvotes: 1

Views: 543

Answers (1)

Harshitha
Harshitha

Reputation: 7297

I have created Azure WebJob with .Net Framework 4.8.

Even I am unable to find the option to Add the Transform.

enter image description here

  • We have SlowCheetah Package to Transform xml and json files at build time based on the Configuration.

  • Close the Visual Studio before downloading the Package, to complete the download fast.

  • Download the SlowCheetah Package, restart the Visual Studio.

SlowCheetah for VS 2017 - 2019.

SlowCheetah for VS 2022.

  • I have Downloaded Package for VS 2022.

enter image description here

enter image description here

enter image description here

  • Now I am able to see the option to Add Transform.

enter image description here

enter image description here

  • Click on Yes to continue.
  • app.Debug.config and app.Release.config got added below the app.config file.

enter image description here

Upvotes: 1

Related Questions