7
votes

I've recently upgraded an Azure Project from Azure SDK 1.6 (Visual Studio 2010) to Azure SDK 2.0 (Visual Studio 2012). The project will build with no errors or warnings on the local machine. I can debug on the local machine, but I cannot package or get a build on the build server. The error I get is:

error MSB4057: The target "PipelineTransformPhase" does not exist in the project.

I've confirmed that the C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplications.targets file exists locally and on the build server.

The original project pointed to the \v10.0\ path and I manually changed that to the \v11.0\ path trying to resolve the error with no luck.

1

1 Answers

11
votes

I have noticed that when project is not able to access Microsoft.WebApplications.targets file it usually says "The target "PipelineTransformPhase" does not exist in the project."

You need to import Microsoft.WebApplications.targets file into the project. You can do it by adding following line in your project.

<Import Project="C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets" />

When importing Microsoft.WebApplication.targets into the project file, make sure you don't set explicit Condition="false". I have seen similar error when Microsoft.WebApplication.targets was imported to the project along with Condition="false".

One more thing to consider when importing Microsoft.WebApplication.targets into project file, always make sure that default variable $(MSBuildExtensionsPath32) is set to "C:\Program Files (x86)\MSBuild\".