当与WebJob部署不更新网站 [英] Website not updated when deployed with a WebJob

查看:377
本文介绍了当与WebJob部署不更新网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有了在Visual Studio TFS源控件的ASP.NET MVC Web应用程序的在线解决方案。该网站是在Azure中,其中每一个它是建在TFS在线时间部署网站主办。一切工作不错。

I have a solution that has an ASP.NET MVC Web Application with source control in Visual Studio TFS online. The site is hosted in Azure, which deploys the site every time it is built in TFS online. Everything is working good.

然后我使用添加>新Azure的WebJob项目增加了一个Web作业项目的解决方案,我将它设置从<一一些帮助href=\"http://azure.microsoft.com/blog/2014/08/18/enabling-command-line-or-continuous-delivery-of-azure-webjobs/\"相对=nofollow>这个职位上蔚蓝的博客。从那时起,我注意到,对Web应用程序所做的任何更改不会在部署的网站上反映了。我没有看到在构建日志中TFS网上的任何错误。

I then added a Web Job project to the solution using Add > New Azure WebJob project and I set it up with some help from this post on the azure blog. Since then, I noticed that any changes made to the web application does not reflect on the deployed site anymore. I don't see any errors in the build log in TFS online.

要解决此问题,我有1)去除溶液中的Web作业项目和2)注释掉在部署之前在Web应用程序的项目属性webjobs-list.json文件的一切。这实际上使该解决方案早在加入网络作业之前的状态。

To work around the issue, I have to 1) remove the web job project from the solution and 2) comment out everything in the webjobs-list.json file in the web application's Project Properties before deployment. This essentially puts the solution back in the state before the web job was added.

我想知道什么我可以发生做prevent我的问题。我想我可能错过了一些配置的一步,但我不知道去哪里找。

I was wondering what I could do to prevent my problem from occurring. I think I maybe missing some configuration step, but I don't know where to look.

推荐答案

Azure中的自动资源集成只会部署的首个项目(按字母顺序)在溶液中。所以,如果你的新的网络的工作被命名为提前旧MVC应用程序(按字母顺序),它会尝试,而不是部署MVC应用程序的Web工作。

Azure's automatic source integration will only deploy the first project (alphabetically) in the solution. So if your new web job is named ahead of your old MVC application (alphabetically) it will try to deploy the web job instead of the MVC application.

有两个解决办法:

1)命名您的MVC项目所以它是第一个项目,在解决方案中按字母顺序

1) Name your MVC project so it is first project in the solution alphabetically

2)把你的网站的工作在一个单独的解决方案

2) Put your web job in a separate solution

这篇关于当与WebJob部署不更新网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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