在Visual Studio 2015年的Azure网络招聘 - 部署与错误&QUOT工作;目标" MSDeployPublish"该项目不存在&QUOT。 [英] Azure Web Job in Visual Studio 2015 - deploy not working with error "target "MSDeployPublish" does not exist in the project."

查看:895
本文介绍了在Visual Studio 2015年的Azure网络招聘 - 部署与错误&QUOT工作;目标" MSDeployPublish"该项目不存在&QUOT。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Visual Studio 2015年和蔚蓝的SDK 2.7.1。我创建蔚蓝网络的工作。当我运行部署,我得到错误:

I use Visual Studio 2015 and azure sdk 2.7.1. I created azure web job. When I run deploy I get error:

目标MSDeployPublish并不在项目中存在

The target "MSDeployPublish" does not exist in the project.

我在Visual Studio 2013中创建网站的工作 - 部署就是工作。我的两个项目(2015年和2013年)比较 - 在​​2013年有这样的代码:

I created web job in Visual Studio 2013 - deploy is work. I compare the two projects(2015 and 2013) - in 2013 there is this code:

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



我把这个代码在我的项目在2015年,但部署是行不通的。我看到了结果
这个问题,但它不为我工作。

推荐答案

使用VS2015,在安装时, Microsoft.Web .WebJobs.Publish 的NuGet包我注意到,该install.ps1 PowerShell脚本抛出一个错误,由于缺乏执行权限的包控制台。在检查看来这个脚本是为了在我被安装到项目的.csproj内的进口参考补充。添加下面一行到我的.csproj文件的伎俩,并固定在上面的错误我;

Using VS2015, when installing the Microsoft.Web.WebJobs.Publish NuGet package I noticed in the package console that the install.ps1 powershell script threw an error due to lack of execute permissions. On inspection it appears this script was meant to add in an import reference within the .csproj of the project I was installing to. Adding the following line to my .csproj file did the trick and fixed the above error for me;

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

请注意:你的包版本可能不同,在这种情况下替换 1.0。 6 与任何版本的安装包匹配

Note: your package version might be different, in which case replace 1.0.6 with whatever version matches your installed package.

请注意:您的解决方案的设置可能会有所不同,在这种情况下,请确保您的路径< 。code> .. \packages 文件夹是正确的。

Note: Your solution setup may be different, in which case make sure your path to the ..\packages folder is correct.

请注意:出现此问题,当你不使用管理员身份运行VS权利。

Note: this issue occurs when you don't run VS with administrator rights.

这篇关于在Visual Studio 2015年的Azure网络招聘 - 部署与错误&QUOT工作;目标&QUOT; MSDeployPublish&QUOT;该项目不存在&QUOT。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆