更新:
例如,如果要手动将控制台应用程序部署为webjob。
Create a Console app. Below is my code:
using System;
namespace testwebjob { class Program { static void Main(string[] args) { Console.WriteLine("This is my first webjob!"); } } }
2.Build the console app, then right click and choose this:
3.Go to bin -> Debug -> xxx, then you will find a folder with below files,add a run.cmd and zip them.
This is the content of my run.cmd:
@echo off
dotnet testwebjob.dll
4.Go to azure web app, search webjob. Click add and upload the zip file.
5.Then the web job has be deployed. This is the log:
Original Answer:
From the documentation, you will find that 'Enable automatic WebJobs deployment with a web project' is a feature supported by .net framework web app. It seems .net core web app is not supported.
In fact there is already a feedback about this. You can vote here:
也许您可以尝试不使用此功能,并选择在部署Web应用程序后部署Web作业。:)
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句