I have created a WebJob in Azure that receives and aggregates/stores data from a sensor. At first (when I only had one project in my solution), I just ran dotnet build -c Release
and uploaded those build files to the Azure Portal. That worked fine.
Eventually I started to change the folder structure etc so now the solution has 3 projects, with one startup project (ReceiverWebJob). See below:
How can I deploy those 3 projects in just one Azure WebJob?
UPDATE: According to @Harshitha, It is still possible to use the dotnet build -c Release
command. I tried this and uploaded the created files from every project's bin/Release/net6.0
folder. The WebJob now runs without any problems.
UPDATE 2: Also according to @Harshitha it should also be possible to use an Azure Pipeline for App Service Deployment tasks. I will try this when I have finished my feature.
Check the below steps to run multiple projects in a single Azure WebJob
.
Create a Console Application.As you have mentioned I have taken .NET 6
Console Application.
With in the same Application add 2 new projects.
Navigate to each project root directory and run the dotnet build -c Release
command on each individual Application.
release
folder.Now combine all the files generated in a release folder into a new directory. Zip that folder.
Create a new Azure App Service
.
Select WebJobs
under Settings
of the App Service
and add a new WebJob
.
Browse the zipped folder and add a new Web Job
.