The target “MSDeployPublish” does not exist in the project

Had a very strange issue this morning, create a new Azure Web project as usual, went to publish it and it refused to saying, ‘The target “MSDeployPublish” does not exist in the project’. So I compared the project with one of the ones that worked and for some weird reason it was missing the following line. Once added it published without issue.

<Import Project="..\packages\Microsoft.Web.WebJobs.Publish.1.0.12\tools\webjobs.targets" Condition="Exists('..\packages\Microsoft.Web.WebJobs.Publish.1.0.12\tools\webjobs.targets')" />

One thought on “The target “MSDeployPublish” does not exist in the project

  1. Will S. August 4, 2017 / 10:01 am

    Weirdly, it happens for me on a sort-of intermittent basis. First publish attempt on a clean checkout: I get that error. Second publish attempt with no changes: it works.

    I haven’t noticed any pattern as to which of our web jobs suffer and which don’t, in case you wondered.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s