I've been trying to understand how to use the different config files and I just found this link which has been very helpful. The only problem is, that it seems the transforms only get taken into account when you 'publish' the solution and not if you just do a generic Debug or Run now.
Generally this wouldn't be to much of a problem, but I'm developing towards Windows Azure, which only allows you to publish to the Cloud. For general debugging I would rather run it locally within the Azure Emulator, but doing so does not 'process' my transforms.
Is there any known workaround to have them transformed during a debugging session?
Edit: ShawnC pointed me to this question.
Which lead me to this extension. I think this will do the job!
You can perform web.config transforms using msbuild. You could put this in your project's AfterBuild target to aid your debugging.
You need to look at the TransformXml
msbuild target, passing in: Source=path_to_your/web.config
Transform=path_to_your/web.$(ConfigurationName).config
and
Destination=path_to_your/web.config
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With