Closed AmeetAB closed 7 years ago
@AmeetAB , Currently transformation is applied using Release-Environment Name.
You need to change Release Environment Name and not Release Configuration.
Please change the Environment name to (CloudQa, CloudUat or CloudProd).
Old Editor View:
That is what I got:
@AmeetAB , .Release.config is selected by default when available( in the same folder).
Order of Transformation applied is as follows: `.Release.configfollowed by
*.
If Web.Release.config has no significance in your package, can you remove the file or provide the below tag in the same file ?
<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
</configuration>
@vincentdass applied
<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
</configuration>
to both Web.Debug.config and Web.Release.config and made the CI build configuration to run on "Debug" this resulted in the release picking the environment specific config file for transformation for the web api.
We, however, also have a web job as part of the solution which we'd like deployed. Although I'm getting the webjob deployed as desired, the transformation of App.config isn't happening. Here's the log from the release:
It seems that the XML Transformation is looking for a Web.config and the transformation file instead of App.config. How do we handle App.config transformation? Here are the tasks in CloudProd
environment:
And this is the config of the web job deploy task:
We have a lot of components using webjobs and releases with webjobs are important as part of ALM. Your help is appreciated!
@AmeetAB, To apply transformation in App.config
file, your transformation configuration files should be named App.Release.config
or App.<EnvironmentName>.config
Can you please ensure that the files are present in same folder as well?
@vincentdass they're in a different project but at the root and in the format App.
In our case, App.CloudDev.config and so on.
@AmeetAB , can you please share the debug logs for the release (by setting variable system.debug = true
)?
Need to confirm whether the artifact contains the config and transform file in the same folder.
@vincentdass here's some more information from my research:
I have also found another "gotcha":
On the project that contains the transformation files, this
<FilesToIncludeForPublish>AllFilesInTheProject</FilesToIncludeForPublish>
has to be entered as a sub element of this property group of the csproj file
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
Our CI build runs on debug
configuration so that's where I've got that
Unless the above happens, the config files are not part of the artifact package and transformation at release time cannot find the
With webjob kind projects, in the build, this happens:
2017-07-13T07:22:33.2974267Z _CopyAppConfigFile:
2017-07-13T07:22:33.2974267Z Copying file from "App.config" to "bin\Debug\Transactions.WebJob.exe.config".
Obviously, at this point the App.config file has been changed into Transactions.WebJob.exe.config in the artifact package. I'm trying to apply the transformation at Release time and it cannot find the App.config or the corresponding App.
@AmeetAB , As you mentioned App.config is renamed to "
You need to rename your transform files something like this
App.CloudProd.config => Transactions.WebJob.exe.CloudProd.config
App.CloudQA.config => Transactions.WebJob.exe.CloudQA.config
@vincentdass did what you recommended and although the files are part of the artifact, the transformation task still seems to be looking for Web.config file for transformation.
Transform files:
Actual config file:
@AmeetAB , please share the debug logs for the same.
@vincentdass what's the best way to send you these logs?
@AmeetAB , you can paste the logs here. You can also send the logs to RM_Customer_Queries@Microsoft.com with subject as "Config transform in Release when using AzureRmWebAppDeployment #4776" for reference.
@AmeetAB , closing the thread as there is no action item on us. (Based on the offline discussion) Feel free to reopen or create a new issue, if required.
Hi,
We have a product version specific build that has a release pipeline that goes from QA -> UAT -> PROD all on Azure.
We've somehow got the config transform to execute but will issues. The issue is that it picks up the Web.Release.config even when the environment variable "ReleaseConfiguration" is set to CloudQa, CloudUat & CloudProd in the variables section. Also the task for deployment fails without any logs so I've had to literally wait for it to come to a point when it fails while watching the logs and take a printscreen. That's how we've found out that the transform is happening with Web.Release.config which does not have any transform related entries in it.
How do I force the task to transform using the "ReleaseConfiguration" value?