Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Package / Publish error on Azure

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.

like image 843
Suirtimed Avatar asked Aug 01 '13 17:08

Suirtimed


People also ask

How do I publish with Azure?

Create or open an Azure cloud service project in Visual Studio. In Solution Explorer, right-click the project, and, from the context menu, select Convert > Convert to Azure Cloud Service Project. In Solution Explorer, right-click the newly created Azure project, and, from the context menu, select Publish.

How do I publish from Azure App Service to VS code?

Create a new web application in Visual Studio Code. Publish the app to Azure App Service. Update the app in Visual Studio Code and publish the updates.

How do you publish in VS 2022?

From the Visual Studio Solutions Explorer pane, open the context menu for (right-click) the project's name, and choose Publish to AWS. This will open Publish to AWS. From Publish to AWS, choose Publish to New Target to configure a new deployment.


1 Answers

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\".

like image 62
Samir Dangol Avatar answered Sep 22 '22 00:09

Samir Dangol