0

I am developing an AddIn for PowerPoint 2013 using vsto, vs ultimate 2013, and c#. During the deployment (using Msi Installer, or ClickOnce, or ClickTwice), how can I copy my data (files) from the project solution into a specific folder on the user's machine?

I am quite new to .Net. Sorry for my probably ignorance.

chipbk10
  • 5,783
  • 12
  • 49
  • 85
  • Try with the WindowsVolume property. http://stackoverflow.com/questions/11499301/vs-setup-project-install-files-in-different-directories/17077899#17077899 – Eric Bole-Feysot Jan 07 '15 at 09:23
  • You can use post build trigger. See [stackoverflow][1] [1]: http://stackoverflow.com/questions/11001822/copy-files-from-one-project-to-another-using-post-build-event-vs2010 – VSharma Jan 07 '15 at 09:28
  • @VSharma No. The question is not how to copy files during development, but during *deployment*. This has nothing to do with Visual Studio post build triggers. – Thorsten Dittmar Jan 07 '15 at 10:15
  • and how can I get the files from my project solution in code? – chipbk10 Jan 07 '15 at 10:48

2 Answers2

2

You simply need to include them to the installer as content files. See Deploying an Office Solution for more information.

Also you may find the How to deploy files with a clickonce application? forum thread helpful.

Take those files out of your \bin\debug folder and add them to your project. You can either add them to the top level of your project, or put them in a folder under the top level of your project. In the properties, set Build Action to 'content' and 'Copy to output directory' to "Copy always". They will be deployed relative to the top level of the deployment folders.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
  • There is no tutorial about how to copy file in the ClickTwice Deployment or Windows Installer? Anyway, your answer is good. It helps me to get the point where to start. – chipbk10 Jan 08 '15 at 15:44
  • 1
    I'd suggest asking Setup & Deployments questions on the [ClickOnce and Setup & Deployment Projects](https://social.msdn.microsoft.com/Forums/windows/en-US/home?forum=winformssetup) forum. Pay special attention to the [Deployment FAQ](https://social.msdn.microsoft.com/Forums/windows/en-US/407b0fad-dbbd-428f-ac0c-b6bc581b8620/deployment-faq?forum=winformssetup) . – Eugene Astafiev Jan 09 '15 at 16:50
  • The Deploying An Office Solution link is not working. – chipbk10 Jan 12 '15 at 12:15
0

I had to deploy 6 add-ins(word\excel\powerpoint) in one application. I gave up figuring this out and used Advanced Installer. It was quite easy to deploy everything using it, if you can absorb the cost that is.

ShipOfTheseus
  • 234
  • 1
  • 10
  • There are several persons mentioning the Advanced Installer. Is this http://www.advancedinstaller.com/ ? The cost is too much. – chipbk10 Jan 15 '15 at 09:55
  • Yeah, that's the right link. Professional version is more than enough for your requirements. Or you can try 30 day trial. It just makes installation really painless. But, you can surely do everything it does using Wix if you have time. If I am not wrong, Advanced installer is based on Wix. – ShipOfTheseus Jan 15 '15 at 10:02
  • at this price, I cannot purchase. So, probably that's good to know, but infeasible. – chipbk10 Jan 15 '15 at 10:36