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.
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.