I would like to create a simple ASP.NET Core Web Application (.NET Framework) and publish a WebJob alongside it to Azure.
I'm using Visual Studio 2017, but the result seems to be the same in VS2015.
To start, I create the corresponding project in VS2017:
I select the basic web application template:
At this point I get a bit lost. In the older Asp.Net MVC 5 approach, I used to be able to click on the Asp.Net project and find "Add => New Azure Webjobs Project". The WebJob would then always be linked in publishing and just "work".
With the new Asp.Net Core approach, I can't seem to find an analogously-easy way to get this happening.
I tried manually adding a WebJobs project to the solution and then manually setting up the webjobs-list.json file in the Asp.Net project, but the publish step didn't recognize it. I noticed various answers like this one which suggest hooking into the publishing process to copy the files, but the markup added to the *.pubxml file didn't have any affect (i.e. the files weren't being copied).
It seems that there's a bit of outdated information around regarding this task. Might somebody be able to detail the current process of doing this for a new solution containing an Asp.Net Core app in Visual Studio?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…