Linked Exe Not Included In Package

I’m trying to get a “migrate.exe” into a deployment package via OctoPack.

Following the “What is packaged?” section in the documentation at http://docs.octopusdeploy.com/display/OD/Using+OctoPack I have added a link to the “migrate.exe” to my project and set “Copy to Output Directory” to “Copy always”. The “migrate.exe” is successfully copied to the output directory. My build server says “OctoPack: Added file: migrate.exe”, but when I try to deploy the package or look at the package content, the “migrate.exe” is missing.

When I change the ‘Link’ to a regular project item it works, but then I get a copy of the migrate.exe which I would like to avoid.

Thanks,
Michael

Hi Michael,

Thanks for reaching out

It’s really odd that you can see the log saying octopack included the file.

  • Did you set that executable as ‘Content’ as explained in that link?

  • what do you mean exactly by “I get a copy of the migrator.exe”. Do you get 2 copies of this executable inside of the nuget package?

  • could you send us your build log so we can see how Octopack ran?

Regards,
Dalmiro

Oops, now it works.

Setting Build Action to “Content” and Copy to Output Directory to “Do not copy” as explained for web applications did not work (but my application is not a web application anyways), but setting Build Action to “Content” and Copy to Output Directory to “Copy always” did. I thought I had tried that combination already. But maybe I didn’t look right having tried various options.

Regarding the “copy”: migrate.exe is from the Entity Framework NuGet package. If I add it to my project as a regular project item, it will be copied from the package folder to my project folder. If then somebody updates to a newer version of Entity Framework, I still got an old copy of migrate.exe in my project folder. If I add migrate.exe as a link, then hopefully the link will break when updating to a new version of Entity Framework and we will know that we have to redirect the link to the new Entity Framework package.

Thanks for your help,
Michael

Glad to hear its working Michael :slight_smile:

Let us know if you need more help