2
votes

My solution has 2 projects: 1 web application and a console application. The console application should run every 15 minutes.

Ideally I want to put the build output (binaries) of the console application inside the web application folder: app_data\jobs\continuous\job1 (trying to follow the azure web jobs tutorial)

I setup the build pipeline to build the solution and then setup the release pipeline to deploy the build.

However, in the build log, I see that the "Build Solution task" in the build pipeline builds the web application, packages it into a ZIP file and then builds the console application. In the zip artifact that is generated, the console application binaries are missing.

How do I get it to include the console app build output inside the app_data folder?

1

1 Answers

1
votes

You could use the Copy files task and copy the compiled console app to the folder you use as PathtoPublish in the Publish artifact step. This way it would be included in the ZIP and you could use it in the deployment pipeline.

Here's an example:

- task: CopyFiles@2
  displayName: 'Copy Files to: $(build.artifactstagingdirectory)'
  inputs:
    Contents: |
     **\[path_to_your_project]\bin\$(BuildConfiguration)\**

    TargetFolder: '$(build.artifactstagingdirectory)'