In my project, there is a Webservice.settings containing 3 variables. (Structure of Webservice.settings) I intent to set these variables with my release-pipeline (Azure DevOps). Therefore, I created a variable-group in DevOps, containig the variables and the values I want to set. (Structure of variable-group) The variable-group was linked to the pipeline and its scope was set to "release".
To set the variables, the release-pipeline contains a file-transform-task. (Structure of file-transform-task
After the pipeline has run, the .exe.config looks like this:
<applicationSettings>
<MyFancyProgram.App.Properties.Webservice>
<setting name="UrlEndpoint" serializeAs="String">
</value>
</setting>
<setting name="LoginName" serializeAs="String">
</value>
</setting>
<setting name="LoginPasswort" serializeAs="String">
</value>
</setting>
</MyFancyProgram.App.Properties.Webservice>
</applicationSettings>
The variables haven't been set.
My expectations were, that the .exe.config should have looked something like this:
<applicationSettings>
<MyFancyProgram.App.Properties.Webservice>
<setting name="UrlEndpoint" serializeAs="String">
<value>NoUrlEndpointNameSet</value>
</setting>
<setting name="LoginName" serializeAs="String">
<value>NoLoginNameSet</value>
</setting>
<setting name="LoginPasswort" serializeAs="String">
<value>NoLoginPasswortSet</value>
</setting>
</MyFancyProgram.App.Properties.Webservice>
</applicationSettings>
What I've tried: I assumed, that I addressed the namespace inside the variable-group wrong. So inside the variable-group, I tried different options like:
- MyFancyProgram.App.Properties.Webservice.LoginName
- Properties.Webservice.LoginName
- etc. I checked the MS-documentation, but couldn't find anything matching my case.
https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/file-transform-v1?view=azure-pipelines https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/file-transform-v2?view=azure-pipelines