xsltazure-devopsazure-pipelinesazure-pipelines-release-pipeline

Release Pipeline throws the following error: Unable to apply transformation for the given package - Changes are already present in the package


I am using the File Transform V2 task on my release pipeline for my ClickOnce application deployment.

-transform **\*.Release.config -xml **\*exe.config.deploy

I've never had issues transforming and deploying ClickOnce applications in this manner, however, for some reason, when transforming this particular application, I keep getting the following error:

Unable to apply transformation for the given package - Changes are already present in the package.

I double checked my build pipeline to make sure the transforms weren't being performed at this step, and it doesn't seem like it is. Is there a way to guarantee that transforms on an app.config do not happen from within the build pipeline, just in case?

Outside of that, I have no clue as to what the issue could be. There is no other transform step anywhere within any of my pipelines, so there shouldn't be any reason for it to be preemptively transforming, at least from what I can see.

The weird part is that even though it says that it has been transformed already, it looks to me that no transform had happened at all. All the strings and values are still the same within the app.config.

If anyone has any ideas, or needs me to provide specific logs/information, please let me know.


Solution

  • I reproduced the issue and found it only occurred when the task couldn't find the source file, see:

    enter image description here

    1.It seems that you're using something like -xml **\*exe.config.deploy in your trans rule, try using **\*.exe.config.deploy instead of **\*exe.config.deploy.

    (Or use valid name like Name.exe.config.deploy, it works well on my side)

    2.And if suggestion above can't resolve your issue, you should also check the Package or folder (folderPath in yaml) input of your File Transform task. Make sure the system can find the xx.exe.config.deploy file in correct folder.

    (Normally the folder would be $(System.DefaultWorkingDirectory), but not sure if you did some changes so the file was in another directory...)