Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transform is not applied when publishing a console application as an Azure Web Job #240

Closed
urig opened this issue Apr 5, 2017 · 2 comments

Comments

@urig
Copy link

urig commented Apr 5, 2017

Slow Cheetah transforms do not seem to be working for me when I publish a console application as an Azure WebJob from Visual Studio.

Steps to reproduce:

  1. Using Visual Studio 2015 with SlowCheetah v2.5.48 and Azure .Net SDK v2.9.6:
  2. Given a console application, use Slow Cheetah to add a config transform to it. Ex: App.dev.config
  3. In the Solution Explorer, right-click the project and choose "Publish as Azure WebJob"
  4. Use the Publish wizard that opens up to create a new publish profile with the same name as that of the config transform from step 2 (Ex: dev)
  5. Use the Publish wizard to publish the app as a web job to an Azure app service.

Expected result:

The config transform should be applied and the results should be seen in the .exe.config in the app service.

Actual result:

The results are not seen in the .exe.config in the app service. Instead, the content of the base .config file is present as if the transform was not applied.

Not sure if this Slow Cheetah's responsibility but if it isn't would love to know what the right approach might be to resolve. Thanks!

@urig urig changed the title Transform is not applied when publish a console app as an Azure Web Job Transform is not applied when publishing a console application as an Azure Web Job Apr 5, 2017
@urig
Copy link
Author

urig commented Apr 6, 2017

UPDATE: I've asked this question over on StackOverflow. An answer suggested a workaround of creating a build configuration with the same name as my publish profile and using that when publishing.

The workaround seems to be working. Still, I would like to ask for SlowCheetah to work without requiring the user to resort to this trick. Thanks.

@davilimap
Copy link
Collaborator

As I mentioned in #195, VS usually defaults your publish configuration to be Release, so on publish the App.Release.config transformation will be applied, if present.
The workaround of using a build configuration with the same name as the publish profile works because SlowCheetah first applies the build configuration transformation (which would still be Release) then it looks for App.$(PublishProfile).config and applies that transformation.
This needs to be documented and is being worked on, thanks for reporting this behavior. If this is not the problem that you encountered, reopen the issue and I'll take a closer look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants