Problems with Excel Customization Deployment
I apologize in advance if this is simple, but I have looked around for 2 days now...
I have developed an Excel customization using VS2010 beta2 (based on VB). The app works fine when I run it via DEBUG....START DEBUGGING. I need to deploy this to several machines, but for now I am simply trying to install on a VM which is a clean XP and Office 2007 box. The publish process works fine. I then copy the directory structure created by the publish event to my VM in the My Docs directory. When I run the setup.exe from My Docs on the VM, it successfully installs the 3 prereqs:
1-PIA
2-.NET 3.5 (even though using VS2010, my customization is built on 3.5, not 4.0 <I have tried deploying wiht .NET4 as a test and got the same results as 3.5> )
3-VS2010 Tools for Office runtime
And it also successfully installs my customization. Not sure I need to, but I have fully trusted the My Docs folder and all subfolders from Excel. However, when I open my Excel file (also in the My Docs directory), here is what happens:
* File opens and I see the Ribbon element that is part of my customization
* The ribbon is missing its title (the title shows properly when I run in debug mode on my development PC)
* None of the functions execute when I click on their respective buttons in the ribbon bar. I also get no error, just no response to the click events.
So my code is not executing, but interestingly the custom ribbon bar is loading. I also notice that the ACCDB that my customization interacts with is not on my VM hard drive. The ACCDB is present in its .deploy format from the publish process. When I run debug on my development PC, all of the ancillary files including the ACCDB and the DLLs are put into the debug directory.
So my questions are:
1 - When I run the setup.exe and it seems to install everything including my customization, where does it actually put the XLSX, ACCDB, DLL, and other files? I cannot locate them on the only HD in my VM.
2 - Where ever they are, is that where I should run my XLSX, rather than from the My Docs directory that I installed from?
Last observation: even after installing .NET3.5, PIA, & VS Tools for Office runtime: the .VSTO manifest file is associated correctly (dbl clicking it initiates the install), but it does not have the proper ICON. It has no icon in fact - same as if it was not associated with anything. I have done this install at least 20x (resetting the VM to a clean snashot each time) varying things like use of .NET4, manually installing prereqs instead of click once, installing from different locations -> but I always seem to get the same result that my code is not executing.
Any help is greatly appreciated.
-Denis
Answers
- Bessie,
Thank you for your assistance. I believe I have now resolved the issue. When you mentioned it could be my code, I created the simplest custoization and it worked fine on the deployment machine. So I then started commenting out pieces of my code. The disappearing label on the ribbon bar was due to a line:
With the line in, the label is lost, with it out the label is fine. I can work around it easily now that I know, but I am still going to report it as a bug to the Visual Studio 2010 team.Globals.ThisWorkbook.Application.DisplayDocumentActionTaskPane = False
I had thought it was an issue with my deployment process since the label is not lost when testing on my dev box, only on the deployment box.
Thanks again!- Marked As Answer byburkeden Friday, November 06, 2009 1:30 PM
All Replies
- Further update: still having the issue, but I do notice that the files are installed in and around:
C:\Documents and Settings\test\Local Settings\Apps\2.0\Data\X5BBZKKK.PW1
(The XLSX was not there, but seemingly all of the other files are there without the .deploy extension.) - Hello,
It seems to be a Excel document-level project using Access database. Do you have install this customization in other machines and Does it work fine? If not, for deploying a solution using ClickOnce, please refer to this link: How to: Deploy an Office Solution by Using ClickOnce. You could try this link. And does it work fine?
Best regards,
Bessie
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us. - Thanks for responding Bessie.
I have not been able to deploy successfully anywhere (though the app works fine on the development box). I have followed the MSDN deployment instructions you sent, and they give me the results I detailed in my original post.
I would think that missing the title of the custom ribbon bar is indicative of something, but I am not sure what.
After installation, should I be able to run the Excel file which is associated with the customization from any location or do I need to always run it from a certain path?
Thanks,
Denis Based on my understanding, this project works fine on debug model, but does not work fine when installing it anywhere. In my side, I have made a test in Office 2007. When I install it on my Virtual PC with Office 2007, this customization works fine. Could you please tell us the reproducing steps and the version of Office? Are the same in development machine and VM? If the versions of Office are not the same, I am thinking it is incompatible between them.
After installation, we could copy this excel file anywhere, and do not need to always run it in a certain path.
Best regards,
Bessie.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.Thank you have answered one of my questions (after installation, the Excel file can be run from anywhere). Though I have discovered it seems to need a trusted location, since I do not have signed publisher.
I am using the exact same version of Office on both dev machine and test machines (Office 2007, fully patched). In terms of reproducing steps, I tried to lay them out in my original post - please let me know if those steps are not clear.
Let me again summarize my problem:
1-app works fine when running in debug mode on development PC
2-creation of 1-click deployment package seems to work fine
3-installation on target PC seems to complete without issue
4-when I run the customization (by opening the XLSX file), ribbon customization is visible (but title missing) and none of the buttons actually seem to run the code behind them. I can click on them but they act as if they had no code behind them.
Thanks again,
DenisThanks for further clarification. Now I can get a better understanding.
Unfortunately, I am still not able to reproduce this issue without code. Here I guess that the title missing is the button label. If yes, in order to troubleshoot this issue, I suggest you create a simple document-level project, publish this project using ClickOnce, and then install it on VM/other machine, especially on machines. If this customization does works fine, I am afraid that it has something with the code in your project you mentioned above. Could you share code with us? Try this, and I will follow up here.
I also show the steps creating a Excel Workbook project.
1. Create a Excel Workbook, add a new item (Ribbon Designer), add a button and dropdown to group1 on TabAddIns(Built-In) tab from toolbox. Label property of this button and dropdown are button1 and dropDown1. Add code to button1_Click event handler.
2. Publish this project using ClickOnce, copy the publish file (default) to anther machine following the link above, click Setup.exe and open the xlsx file. It works fine. The label of button and dropdown do not disappear. Click button and event fires. For test, just show a message box.
private void button1_Click(object sender, RibbonControlEventArgs e)
{
MessageBox.Show("New Button Click");
}
If I have mistaken any scenario, please point me out.
Best regards,
Bessie
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- Bessie,
Thank you for your assistance. I believe I have now resolved the issue. When you mentioned it could be my code, I created the simplest custoization and it worked fine on the deployment machine. So I then started commenting out pieces of my code. The disappearing label on the ribbon bar was due to a line:
With the line in, the label is lost, with it out the label is fine. I can work around it easily now that I know, but I am still going to report it as a bug to the Visual Studio 2010 team.Globals.ThisWorkbook.Application.DisplayDocumentActionTaskPane = False
I had thought it was an issue with my deployment process since the label is not lost when testing on my dev box, only on the deployment box.
Thanks again!- Marked As Answer byburkeden Friday, November 06, 2009 1:30 PM
- Thank you very much for taking a moment to come back and report this. I'm sure this will help others in the future.
Best regards,
Bessie
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.


