简体   繁体   中英

Can't open the excel template file by excel add-in ribbon button after install with clickonce in vs2012 vsto solution

the question's background is:

  1. I have a solution with excel add-in and excel template projects. the simple function is there is a Ribbon button in add-in that will open the template(.xltx) file in template project to do some business.

  2. I have add the template reference in add-in, so the dependency section existed in the add-in's manifest file.

problem is : I published the add-in project by clickonce and install it. but it always throw exception when open the template.

error message: 'exce..vsto_ae2ff0e19d548faf_0001.0000_bc4bb0e76797a3d0ExcelTemplate1' could not be found. Check the spelling of the file name, and verify that the file location is correct.If you are trying to open the file from your list of most recently used files, make sure that the file has not been renamed, moved, or deleted.'

research: I almost know it's because the .xlsx file didn't be copy to the installed location ( eg C:\\Users\\XXX\\AppData\\Local\\Apps\\2.0\\XXX), and I also try to modify the manifest file in publish folder, but it's useless, and I also confused with this artile http://blogs.msdn.com/b/vsto/archive/2009/05/20/deploying-multiple-office-solutions-in-a-single-installer.aspx , how to include the vsto and .xltx file to the installed folder?

I guess you will have to build a window installer to do this. if still want to go via click once publish, you need add your windows installer as a prerequisite in VS.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM