0
votes

I'm trying to use the following azure devop task in a release pipeline and for some reason it won't find the attachment on the remote machine even tho it's there. How do I send an email in Azure Devops with a file on the remote machine as an attachment? Thank you.

https://marketplace.visualstudio.com/items?itemName=rvo.SendEmailTask&targetId=401273c3-b99a-45aa-9e94-b7f456f3f666

System.IO.FileNotFoundException: Could not find file 'C:\azagent\A8_work\r1\a_ECF_Database CI\ECF_Database_Files.20200515.6.zip'. PowerShell script completed with 1 errors.

1
Do you use a self-hosted build agent? Is the attachment on your self-hosted build agent machine? How did you define the attachment? - Cece Dong - MSFT
Yes it is on a deployment group. - OKolokolo
I'm wondering if I'm using the wrong azure devop task - OKolokolo
Did you try my suggestion, by publishing the attachment and specify the Attachment field as $(build.artifactstagingdirectory)\*.zip? This is a 3rd party extension, you may also post the question on the Q&A tab of the extension: marketplace.visualstudio.com/…. - Cece Dong - MSFT

1 Answers

0
votes

The attachment should be located in the machine where the build agent can access. You could publish the attachment in a build pipeline, and then add it as attachment in the release pipeline, for example, you could publish the attachment file to $(build.artifactstagingdirectory), and then specify the Attachment field as $(build.artifactstagingdirectory)\*.zip