发布为Azure WebJob在VS 2013中不起作用

时间:2014-09-12 13:58:31

标签: azure azure-webjobs

我尝试使用Visual Studio 2013发布Azure网站以及一些azure webjobs。我关注this tutorial

我的解决方案具有以下结构:

Solution Explorer

当我尝试将现有项目作为webjob添加到我的Web项目时,我在Project Name选项中得到一个空白下拉列表,我不能:

Add azure webjob

如果我尝试单独添加每个webjob,我也会遇到错误: enter image description here

this link中,由于webjobs位于解决方案文件夹下,因此看起来他们遇到了类似的问题。但是,该线程中的问题没有答案/解决方案。

我想知道是否有解决方案/解决方法,因为我不想摆脱项目中的解决方案文件夹以保持其有条理并且手动部署webjobs非常繁琐。

更新 这是新项目的屏幕截图,Add Azure Webjob不适用于解决方案文件夹。

new webjob

2 个答案:

答案 0 :(得分:0)

在解决方案资源管理器中展开属性...并确保您有一个名为" webjob-publish-settings"的文件。与json内容:

{
  "$schema": "http://schemastore.org/schemas/json/webjob-publish-settings.json",
  "webJobName": "[put the name of your webjob here]",
  "startTime": null,
  "endTime": null,
  "jobRecurrenceFrequency": null,
  "interval": null,
  "runMode": "Continuous"
}

答案 1 :(得分:0)

安装azure sdk2.5或更高版本可解决此问题: http://azure.microsoft.com/en-us/downloads/archive-net-downloads/