Failed to resolve CustomTransform as transformation type

I made my own web.config conversion, we will call it CustomTransform, following the appharbor example here . As in the example, mine inherits from Transform. I also committed to import my custom conversion as follows:

<xdt: import path = ". \ bin \ CustomTransformAssembly.dll" namespace = "CustomTransformAssembly.Build.Transforms" />

I can start the assembly at this point without any problems. It is only when I try to use CustomTransform that I have problems. Conversion is used this way

<add name = "AConfigElement" connectionString = "a-connection-string" xdt: Transform = "CustomTransform" />

But when I run msbuild in this project, I get the following error:

Error: Failed to resolve "CustomTransform" as type Transform

How can I reference CustomTransform so that msbuild finds it?

+4
source share
1 answer

I am using CustomTransformation and have exactly the same problem, and in my case I have to override ToolsVersion for MsBuild, it /tv:4.0works for me.

VS 2008 VS 2010, VS 2013, - .csproj ToolsVersion=12.0, CustomTransformation , , - MsBuild ToolsVersion.

0

Source: https://habr.com/ru/post/1656126/


All Articles