title: Visual Studio Online Build and Release - Copy files to another project
body: <p>In a solution, I have three projects (for the sake of this example):</p>
  <h3>- MyWebJob</h3>
  <h3>- MyFrontendWebsite</h3>
  <h3>- MyBackendWebsite</h3>
  <ul>
  <li>/Views/EmailTemplates/SomeEmailTemplate.cshtml (file in MyBackendWebsite)</li>
  </ul>
  <p>When deployed, <strong>MyWebJob</strong> runs as we webjob below <strong>MyFrontendWebsite</strong>.</p>
  <p>However, it needs the email templates from the <strong>MyBackendWebsite</strong> Emailtemplates folder.</p>
  <hr />
  <p>I think the solution could be...:</p>
  <ol>
  <li>Publish the EmailTemplates as an artifact.</li>
  </ol>
  <p><a href="https://i.stack.imgur.com/Vbbcc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Vbbcc.png" alt="enter image description here" /></a></p>
  <ol start="2">
  <li>During release, copy that artifact to the webjob folder, using a &quot;Copy Files&quot; task.</li>
  </ol>
  <p><a href="https://i.stack.imgur.com/l9QUL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/l9QUL.png" alt="enter image description here" /></a></p>
  <p>The problem is, I don't know what to enter in the Target Folder.</p>
  <p>Using KUDU, I know that the webjob is stored in<br />
  D:\home\site\wwwroot\app_data\jobs\continuous\MyWebJob, but setting that as the target folder does not copy anything, despite the release log file telling me it did copy the file to that folder...</p>
  <pre><code>2017-10-25T15:09:11.7357129Z ##[section]Starting: Copy Files to: D:\home\site\wwwroot\app_data\jobs\continuous\MyWebJob
  2017-10-25T15:09:11.7591720Z ==============================================================================
  2017-10-25T15:09:11.7591720Z Task         : Copy Files
  2017-10-25T15:09:11.7591720Z Description  : Copy files from source folder to target folder using match patterns (The match patterns will only match file paths, not folder paths)
  2017-10-25T15:09:11.7591720Z Version      : 2.117.0
  2017-10-25T15:09:11.7591720Z Author       : Microsoft Corporation
  2017-10-25T15:09:11.7591720Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkID=708389)
  2017-10-25T15:09:11.7591720Z ==============================================================================
  2017-10-25T15:09:14.3013048Z found 1 files
  2017-10-25T15:09:14.3013048Z Copying d:\a\r1\a\MyBuildDefinition\EmailTemplates\SomeEmailTemplate.cshtml to D:\home\site\wwwroot\app_data\jobs\continuous\MyWebJob\EmailTemplates\SomeEmailTemplate.cshtml
  2017-10-25T15:09:14.3043047Z ##[section]Finishing: Copy Files to: D:\home\site\wwwroot\app_data\jobs\continuous\MyWebJob\EmailTemplates
  2017-10-25T15:09:14.3093036Z ##[section]Finishing: Release
  </code></pre>
  <p>What am I missing here? How do I copy that email template to where the webjob can get to it?</p>
  <p>Pre-empting what I myself would have asked...:</p>
  <p>Q: Why not just put the templates in the webjob project in the first place?</p>
  <p>A: Because the template is actually used in the MyBackendWebsite as well, to preview emails.</p>