0
votes

I'm trying to create an azure package via tfs build server. my project is an Azure MVC web api project. when i trigger a build I get the error "The target "PipelineTransformPhase" does not exist in the project." But I've added the Microsoft.WebApplication.targets file to the appropriate folder in my build server. this is the line mentioned in my csproj file

Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />

Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' == ''" />

even without condition I get the same error.

could someone help to resolve this issue . many thanks in advance

1
Were you able to find any more details looking at logs or the linked SO posts? If so, can you provide them if you're still stuck?PerryC

1 Answers

0
votes

First, read these SO posts, they might have your answer:

Package / Publish error on Azure

MSBuild target package not found

Is it possible that the .targets file was never found? (If you're on a machine without Visual Studio it won't be there). That would produce an error somewhat like:

The imported project "...\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

I'll assume that isn't the problem. I would run the build with logging enabled and look at where your targets are coming from (or not coming from in this case). It might add some light to your problem. You can use the /fl switch something like my example below to get a detailed (not diagnostic -- which you could do) log from a build:

msbuild /fl /flp:logfile=<yourpath>\yourLog.log;verbosity=detailed

The lines you should be most interested in are around targets. Lines like Target "Clean" in file "..." from project "..." (entry point): and Overriding target "Clean" in project "..." with target "Clean" from project "..."