TransformXml task could not be loaded from Microsoft.Web.Publishing.Tasks.dll

后端 未结 10 2200
醉话见心
醉话见心 2020-12-13 05:35

Has anyone seen this error and know how to fix it?

The \"TransformXml\" task could not be loaded from the assembly C:\\Program Files (x86)\\MSBuild\\M

10条回答
  •  一生所求
    2020-12-13 06:08

    For me it started working just by adding reference to the NuGet package MSBuild.Microsoft.VisualStudio.Web.targets v14.0.0.3

    Even no need to add UsingTask element to the project file as it mentioned by the package author

    https://github.com/pdonald/nuget-webtargets

    Just install the NuGet package. The package automatically sets the $(VSToolsPath) property to use the targets file in the tools folder.

    And then I was able to use TransformXml and other tasks, defined in the package, for instance to transform app.config

      
        
        
        
        
          
          
            $(TargetFileName).config
          
        
      
    

提交回复
热议问题