A web job can be deployed with web deploy in Visual Studio to Azure very easily. Getting a web job packaged with VS Web Application is equally simple and straight forward.
To package WebJobTest console application to the deployment package created with WebJobApp web application can be done using VS publish.
Web job getting packaged to deployment package.
A TFS Build can be defined to build the package. More information on setting up a TFS build to create web deploy package refer the post “How to Deploy to Azure Websites with TFS build 2013 and VS Release Management 2013”.
Web deployment package created with TFS Build.
But the web deployment package created with TFS build does not contain the app_data folder and the jobs in it.
Instead it is getting created as a separate package in build drop.
Investigations done in WWW pointed to below useful suggestions but none worked with TFS build as explained in them.
This issue is discussed in this forum post with Visual Studio Online.
However when tried building with msbuild locally with deploy arguments successfully packaged the web jobs into the Web Application deployment package.
With that knowledge, as a workaround (It really works :)), set the TFS Build to build to output as configured. This will build the solution with TFS Build outputs in to the local folder of the build agent, which would allow the jobs to be packaged into the web deployment package.
The next problem is getting the built package to the output folder. For that the https://tfsbuildextensions.codeplex.com/SourceControl/latest#Scripts/GatherItemsForDrop.ps1can be modified and used. Modified script is below.
Check the above script to TFS and use it in the build definition.
WebJobApp package created in build drop.
Now the TFS Build successfully packaged the jobs to the WebJobApp deployment package.
A release management template as explained in “How to Deploy to Azure Websites with TFS build 2013 and VS Release Management 2013” can be created to deploy the WebJobApp to Azure including the web job.
A new website created in Azure.
Release template created.
Creation of above tool is explained in “How to Deploy to Azure Websites with TFS build 2013 and VS Release Management 2013”
Set deploy parameters from publish profile of the Azure web application.
A release triggered with the template using the TFS build.
Job deployed with Web Application.
Web Application and the job deployed.
It is great if the latest updates to TFS can be applied as and when they are released. But for a large organization it might not be sometime...
Resolve MSB4019: The imported project "C:\Program Files\dotnet\sdk\1.0.0-rc4-004771\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found or Unable to start the process. No executable found matching command "dotnet-projectmodel-server"You might encounter compilation error in Visual Studio 2015 when a new .NET Core 1 web app is created, if you have installed Visual Studio 2...
You needed to setup dedicated machines for testing when using Run Functional Tests and you had to execute, Deploy Test Agent step and Copy...
TFS 2018 RC1 is now available and you can download it from https://www.visualstudio.com/downloads/ . Release note here explains the new fea...
If you have upgraded the TFS from TFS 2015 to TFS 2018 you will encounter a situation where your vNext build agents 1.xx are no longer valid...