visual studio - Deploy Azure WebJob using VSTS -


i'm having issues deploying azure webjob using visual studio team services (vsts).

the webjob seems deployed breaks azure website hosted in same app service! don't have problem if deploy using vs2013.

this build task generates webjob deployment package:

build task - generate azure webjob deployment package

and deployment task:

deploy webjob task

there no errors when deploy azure webjob. if go azure portal see webjob there, , runs successfully. webjob files copied wwwroot\app_data\jobs\triggered\removeexpireddids folder expected, problem other files copied wwwroot\app_data\bin folder, break existing website deployed app service!!!

so decided find out why happening. after downloading , extracting deployment package saw there 2 folders (app_data , bin) , scheduler file (settings.job):

webjob deployment package

this explains why assemblies coppied wwwroot\app_data\bin of app service. strange thing doesn't happen when deploying vs2013!!! took msbuild log , found following line:

object dirpath ([app service name]\bin) skipped due skip directive 'skipbinfolderondeploy'.

concluding, bin folder included when deploying azure webjob vsts excluded when deploying vs2013.

so question is: how prevent bin folder being deployed when using vsts? there msbuild parameter/flag this?

refer these ways deploy webjob azure:

  1. modify visual studio build task deploy webjob filesystem (msbuild arguments: /p:deployonbuild=true /p:webpublishmethod=filesystem /p:publishurl="$(build.artifactstagingdirectory)\\webjob" /p:deploydefaulttarget=webpublish)
  2. add delete files task release definition delete bin folder (source folder: $(system.defaultworkingdirectory)/webjobvnext/drop/webjob); contents:bin)
  3. modify azure app service deploy task (1. uncheck publish using web deploy option. 2. package or folder: $(system.defaultworkingdirectory)/[artifact name] /drop/webjob)

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -