Explore Courses Blog Tutorials Interview Questions
0 votes
in Azure by (5.8k points)

I've got to a website and a webjob project in the same sln:

Sritt (The website)


In properties of Sritt there's a webjobs-list.json with the following setting:

"WebJobs": [


      "filePath": "../Sritt.WebJob/Sritt.WebJob.csproj"


I've configured the by VSTS build like this (with the new buildsystem):

Solution: **\*.sln    

MSBuild Args: /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.stagingDirectory)"

Building in VSTS gives me the following warning:

 C:\a\1\s\packages\Microsoft.Web.WebJobs.Publish.1.0.9\tools\webjobs.console.targets(149,5): warning : WebJob schedule for SrittWebJob will not be created. WebJob schedules can only be created when the publish destination is an Azure Website [C:\a\1\s\Sritt.WebJob\Sritt.WebJob.csproj]

And the following error:

packageFile= Find-Files -SearchPattern C:\a\1\a\**\*.zip

packageFile= C:\a\1\a\ C:\a\1\a\

Found more than one file to deploy with search pattern 'C:\a\1\a\**\*.zip'. There can be only one.  

How can I deploy both the website and the webjob? Do I need to split them into different solutions?

1 Answer

0 votes
by (9.6k points)

You do not have to split to different solutions. You can deploy it in separate tasks. 

Add a new task in your build definition and setting is:

"$(build.artifactstagingdirectory)\**\" and another one is "$(build.artifactstagingdirectory)\**\".

Browse Categories