简体   繁体   English

使用Web Deploy使用Web App部署WebJobs

[英]Deploy WebJobs with Web App using Web Deploy

I'm migrating a Web App project to a new Azure account. 我正在将Web应用程序项目迁移到新的Azure帐户。 Everything works fine but the Web Jobs are not included when publishing. 一切正常,但发布时不包括Web Jobs。

webjobs-list.json is identical, the publishing profiles are identical etc., just the Web Jobs are missing. webjobs-list.json是相同的,发布配置文件是相同的,等等,只是缺少Web Jobs。

I can deploy them individually, though. 不过,我可以单独部署它们。

Any idea what is wrong? 知道有什么问题吗?

There are two things you need to check. 您需要检查两件事。

NO 1. The file path in webjobs-list.json is right. 否1. webjobs-list.json中的文件路径正确。 You could find the WebJob project file according this file. 您可以根据该文件找到WebJob项目文件。

{
  "$schema": "http://schemastore.org/schemas/json/webjobs-list.json",
  "WebJobs": [
    {
      "filePath": "../WebJob1/WebJob1.csproj"
    }
  ]
}

NO 2. Open the project file of your web application(ex. myapp.csproj). 否2.打开Web应用程序的项目文件(例如myapp.csproj)。 Please check whether it has been modified and lost following Import configuration section. 请按照“导入配置”部分检查它是否已被修改并丢失。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM