Publish as Azure WebJob not working in VS 2013

2020-04-10 04:22发布

I'm trying to publish a Azure website along with some azure webjobs using Visual Studio 2013. I'm following this tutorial.

My solution has the following structure:

Solution Explorer

When I try to add an existing project as a webjob to my Web project I get a blank dropdown in the Project Name options and I can't:

Add azure webjob

If I try to add each webjob individually I also have an error: enter image description here

In this link it looks like they had a similar problem and the issue due to the fact that the webjobs are under a solution folder. There's no answer/solution to the problem in that thread though.

I was wondering if there's a solution/workaround to this since I don't want to get rid of the solution folders in my project to keep it organized and deploying the webjobs manually is really tedious.

Update: Here's a screenshot of a new project and the Add Azure Webjob doesn't work with Solution Folders.

new webjob

2条回答
淡お忘
2楼-- · 2020-04-10 05:04

Expand Properties in the solution explorer... and make sure you have a file called "webjob-publish-settings" with the json content:

{
  "$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"
}
查看更多
手持菜刀,她持情操
3楼-- · 2020-04-10 05:06

Installing azure sdk2.5 or above should solve this problem: http://azure.microsoft.com/en-us/downloads/archive-net-downloads/

查看更多
登录 后发表回答