Skip to content

FileTransform error feedback and web.config #465

@aarondel4

Description

@aarondel4

This file spits out the same error for several different scenarios/code paths:

Everywhere isTransformationApplied is used to signal different scenarios with a single message.

Trying to run a FileTransform during the beginning of a deployment pipeline to apply transforms but I get this error.

Task:

- task: FileTransform@2
  inputs:
    folderPath: '$(Pipeline.Workspace)/drop/$(Build.BuildId)/${{ parameters.appProjectName }}.zip'
    enableXmlTransform: true
    xmlTransformationRules: |
      -transform **/Web.abc-dev.config -xml **/Web.config  

Transform(verified by downloading ADO build artifact that is input to pipeline):

<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  <system.web>
    <compilation debug="false" xdt:Transform="SetAttributes" />
  </system.web>
</configuration>

Web.config snippet(verified in build artifact):

<system.web>
	<compilation debug="true" targetFramework="4.8">
		<assemblies>
			<add assembly="System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
		</assemblies>
	</compilation>
</system.web>

Snippet Debug Log:

##[debug]  C:\a\_temp\temp_web_package_4513814385960955\Content\D_C\a\1\s\src\ABCProject\obj\Release\Package\PackageTmp\Web.config (file)
##[debug]  C:\a\_temp\temp_web_package_4513814385960955\Content\D_C\a\1\s\src\ABCProject\obj\Release\Package\PackageTmp\Web.efs-dev.config (file)
...
##[debug]  C:\a\_temp\temp_web_package_4513814385960955\parameters.xml (file)
##[debug]  C:\a\_temp\temp_web_package_4513814385960955\systemInfo.xml (file)
##[debug]2093 results
##[debug]found 2093 paths
##[debug]applying include pattern
##[debug]adjustedPattern: 'C:\a\_temp\temp_web_package_4513814385960955\**/Web.config'
##[debug]12 matches
##[debug]12 final results
##[warning]Unable to apply transformation for the given package - Changes are already present in the package.

Can see the files exist, and that the debug attribute is different, but the transform says changes are already present.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions