部署引用另一个WebJob的WebJob [英] Deploying a WebJob that references another WebJob

查看:66
本文介绍了部署引用另一个WebJob的WebJob的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个WebJob项目,一个项目引用另一个项目。当我尝试使用MSBuild进行部署时,它会尝试部署两者。因为他们去了不同的应用服务,我使用的密码不是
适用于其他正在部署的WebJob,所以事情就失败了。


当我通过Visual Studio进行部署时,看起来它只是部署一个。当我通过命令从MSBuild执行此操作时,它会尝试部署两者。目标中是否存在允许我仅部署
的内容。 VS如何只部署正确的一个? (我也意识到我需要一个run.cmd才能运行正确的可执行文件,但我仍需要弄清楚部署)。


我打算创建一个共享库项目来组合事物,但在那之前,我有什么选择?

解决方案

如果我在通过Visual Studio部署webjob项目时理解正确,您可以部署一个但是在尝试时通过命令MSBuild,它尝试部署两者。


您可以尝试 添加其他WebJob.exe文件的引用。
  在部署之后,在这种情况下,它只会使用webjob程序集部署单个WebJob。








选择添加引用然后浏览webjob.exe文件。









然后解决方案如下:






< p style ="margin-bottom:12.0pt;行高:正常;背景:白色; vertical-align:baseline">











在Kudu中,它将部署.exe和配置文件。


< p style ="margin-bottom:0in;边距:.0001pt;行高:正常;背景:白色; vertical-align:baseline">




I have two WebJob projects, one project references the other one. When I attempt to deploy with MSBuild, it tries to deploy both. Because they go to different App Services, the password I use doesn't work for the other WebJob that's getting deployed, so things fail.

When I deploy via Visual Studio, it looks like it's only deploying one. When I do it from MSBuild via a command, it tries to deploy both. Is there something in the targets that allows me to only deploy one. How is it that VS only deploys the correct one? (I also just became aware that I need a run.cmd in order to run the correct executable, but I still need to figure out deployment).

I'm planning on creating a shared library project to combine things, but until then, what are my options?

解决方案

If I understood properly when you are deploying webjob project via Visual Studio, you are able to deploy one but when trying from MSBuild via a command, it tries to deploy both.

You can try to add the reference of other WebJob.exe file.  After that deploy it, in this case it will only deploy the single WebJob with the webjob assembly.

Choose add reference then browse the webjob.exe file.


Then the solution would be like this:


And in the Kudu, it will deploy the .exe and config file.



这篇关于部署引用另一个WebJob的WebJob的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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