title: WebJobs publishing to Azure doesn't create App_Data directory structure
body: <p>I am trying to setup the CI for Azure Web Jobs using local TFS 2013. The build server itself is fully patched and has Build Tools 2017 installed. I have tried a standalone Web Jobs project in a solution as well as a solution with a Web project and Web Jobs project. From VS2017 the publish (in case of Web project and Web Jobs project) and Publish as WebJobs (in case of standalone Web Jobs project) work just fine and everything gets deployed. NuGet package <code>Microsoft.Web.WebJobs.Publish</code> is included. In both scenarios, the local build/publish publish properly website as well as jobs in <code>app_data/...</code> folder but TFS builds don't even create <code>app_data</code> folders. It seems the final collection of files for publishing is trying to pick the files from <code>WebJobs/bin/**</code> folder which isn't even created in TFS build. The TFS builds add additional argument <code>/p:OutDir="C:\Builds\2\iPayment.Core\Dev-iPayment.ServiceBus.Agents\Binaries\\</code> and the assembly files for WebJobs are not collected and thus not dropped into <code>app_data/..</code>. The build parameters are passed as</p>
  
  <pre><code>/p:PublishProfile=ReleaseWebDeploy
  /p:_DestinationType=AzureWebSite
  /p:DeployOnBuild=True
  /p:WebPublishMethod=Package
  /p:PackageAsSingleFile=true
  /p:SkipInvalidConfigurations=true 
  </code></pre>
  
  <p>The symptoms are similar to what are described in <a href="http://chamindac.blogspot.com/2015/08/package-azure-web-job-with-tfs-build-to.html" rel="nofollow noreferrer">http://chamindac.blogspot.com/2015/08/package-azure-web-job-with-tfs-build-to.html</a> but my version of XAML build is slightly different than in the blog post and there is nothing to override the OutDir without probably modifying the build template itself.</p>
  
  <p>In a standalone WebJobs project, if I use the MSBuild command line without the OutDir, the <code>bin/**</code> are created and packaged properly and get deployed to Azure but that option doesn't work for the solution where both WebProject and WebJobs are in a single solution and need to be deployed together. Also, I could not find any way to empty the <code>OutDir</code> outside of XAML definition.</p>
  
  <p>I have confirmed the presence of <code>webjob-publish-settings.json</code> (in both cases) and <code>webjobs-list.json</code> (in case of where solution has WebProject as well as WebJobs), which is actually needed and works fine from VS2017 deployment. The publish profile is also correct and it is used by the VS2017 deployment. The TFS build is configured to build the solution in both cases. <code>Microsoft.Web.WebJobs.Publish.1.1.0</code> is used which is the latest version.</p>