Deploy web.config transforms

Hi,
I have different web.config files for different environment. web.QATest.config , web.Stagging.config and web.Production.config.

I am unable to deploy specific web.config files. i get message "No matching appSetting, applicationSetting, nor connectionString names were found in: "
Attached is the nuget package screen shot and octopus deploy settings and log file

I have creating new release but it doesn’t work.

Thanks,
Vipul

Attached files

Octopus_build_error.docx (478 KB)

ServerTasks-9638.log.txt (20 KB)

Hi,

Thanks for reaching out!

I can see in your log that a transform did take place:

17:31:55   Info     |       Transforming 'd:\Octopus\Applications\Integration\SPRINT\1.0.117_1\web.config' using 'd:\Octopus\Applications\Integration\SPRINT\1.0.117_1\web.QATest.config'.
  • What other transforms were you expecting to happen during that deployment?

  • Could you send a screenshot of the content of your nuget package where I can see where are the config files located inside of it?

  • Could you please follow the below instructions to send a more verbose deployment log?

1) Add these 2 variables to your project http://docs.octopusdeploy.com/display/OD/Debug+problems+with+Octopus+variables

2) Create a new release (so the new variables take effect) and deploy it. If possible skip as many steps as you can and only leave step we are troubleshooting in order to avoid the noise in the log.

3) Send us the raw log of that deployment http://docs.octopusdeploy.com/display/OD/Get+the+raw+output+from+a+task

Thanks!
Dalmiro

Hello Dalmiron,
I have already sent you Nuget package screen shot in the Octopus_build_error.docx documnent in comment section

Thanks.
Vipul

You are totally right! I’m still gonna need your help with the other 2 points of my previous reply.

Thanks!

web.QATest.config should be transformed to web.config in web-server. Attached the is variables screen shot.

Thanks for that screenshot. Could you please instead show me the variables from Projects -> [Projet name] -> Variables? The current screenshot doesn’t show me the full scope of the variable.

Also could you send me the full deployment log I asked for in the 3rd item of this other reply?

Variables and lib variables used.
[image: Inline image 1]

[image: Inline image 2]

Attached screen shots and server log file.

ServerTasks-9638.log.txt (20 KB)

Hi,

Acording to your log file, the transform is working as expected:

17:31:55   Info     |       Transforming 'd:\Octopus\Applications\Integration\SPRINT\1.0.117_1\web.config' using 'd:\Octopus\Applications\Integration\SPRINT\1.0.117_1\web.QATest.config'.

The line that says 17:31:55 Verbose | Looking for appSettings, applicationSettings, and connectionStrings in any .config files 17:31:55 Info | No matching appSetting, applicationSetting, nor connectionString names were found in: [Many files] is coming from the feature Configuration Variables which you apparently have turned on.

Beside the config transforms from web.[environment].config => web.config are you expecting variables to be replaced using Configuration Variables? If you are not and all you want is the Config Transforms, then you could disable that feature from the step and you’ll no longer see that message in your log.

Best regards,
Dalmiro

Thanks for the reply - When you publish can only web.config is published
and not not rest like web.Production.config, web,Debug.config etc?
[image: Inline image 1]

image.png

Be default Octopus wont delete any config files. You can add this functionality easily by adding the below PS script as a Post Deploy script in your package step:

Remove-Item *.config -Exclude web.config -Verbose

Regards,
Dalmiro

Notice:

This issue has been closed due to inactivity. If you encounter the same or a similar issue and require help, please open a new discussion (if we asked for logs or extra details in this thread, consider including them in the new thread). If you are the creator of this thread and believe it should not be closed let us know via our support email.