0
votes

So I'm using Octopus Deploy to run an application which uses an Excel Spreadsheet. However, I'm getting this error (click on the image link):

Error Displayed on Screen

My process is: 1. Deploy Package from Octopus Server (built in) 2. Run a script

The script in #2 uses the PowerShell option and contains:

cd "C:\Repository\QA - Automation\UnitTestProject\bin\Debug"
.\UnitTestProject.exe

I can run that code snippet in PowerShell on the tentacle machine and it works perfectly. So it would be awesome if someone could give me pointers on what exactly is causing the problem. In Visual Studio I'm using Microsoft.Office.Interop.Excel 15.0.4795.1000 to access and utilize my spreadsheets and Octopus Deploy receives a NuGet package from VSTS.

Thanks in advance!

1
Does the user account the the script is running under have permissions to access the file? - Persistent13
Yes, the script is running under the same user account - Ostrava

1 Answers

0
votes

Alright, so I finally figured out the answer. Octopus-Deploy uses "Tentacles" to deploy applications and I assumed that I could access files on the machine that had the tentacle installed on it. That was false! So, my solution was to:

1) Include the Excel spreadsheet I was using into my project.
2) Push that project to Visual Studio Team Services.
3) Package it into a NuGet container.
4) Ship that package to my Octopus-Deploy Server.

Once all of that is accomplished, your Excel spreadsheet will end up as a .zip file within the directory you saved it in initially. In order to unzip that file you need to add the "Unzip" step and give it the location of the spreadsheet, and then you're finished and can finally use the file within your application!