Solved

VSTO SE Excel addin C# stopped working on dev machine

Posted on 2008-10-14
14
730 Views
Last Modified: 2013-11-10
Hi,
I developed a solution based on a add-in for excel made with cisual studio 2005 and vsto se 2005.
The first release was made without many problems, just a litle work for the deployment on the client machines.

But, now, I need to develop a second release of the same projects, and the development machine simply wont work.

The application is compiled without erros, and excel is oppned up, but the addin isnt displayed.
The addin appears on the COM Add-ins dialog box as disabled, and if I try to check the box, it has no effect.

I´ve already reinstalled the VSTO SE without success. I then tried to reinstall entire ms office 2003 suite and than vsto se and even so, it is not working.

I dont know what to do. the problem is happening in two machines.

Even if I start a new project with a simple message box, it doesnt work.

Can anyone help?

Thanks in advance and regards, André L Sobreiro

0
Comment
Question by:sobreiro01
  • 8
  • 6
14 Comments
 
LVL 11

Expert Comment

by:William
ID: 22712063
Have you cleaned your solution? <Right click the proj or solution in solution explorer, and select clean>
This will remove all registry entries and 'clean' your bin of amy old exe/dll's.
This is REALLY usefull for office addins, as they are all 'generally speaking' still treated like old COM addins, as all the parameters and JUNK is stored in the registry.

If this does not help, please post back more info if you have any.

BillyDvd
0
 

Author Comment

by:sobreiro01
ID: 22713371
Hi BillyDvd
I´ve already tried to clean the solution doing what you suggest. Thank you.

But it didnt solve my problem. I am not working with the that big project anymore, I created a new project with a simple messagebox (a hello world sample) to test the environment. and it doesnt work.

Can you suggest anything else.

Thank you very much.
0
 
LVL 11

Expert Comment

by:William
ID: 22714048
When testing your app are running it thru VS or opening excel and testing?
0
 

Author Comment

by:sobreiro01
ID: 22714073
Hi,
I compiled with vs2005 pushing F5 button. it oppens the excel for me. but my add-in is not beeing loaded.
0
 
LVL 11

Expert Comment

by:William
ID: 22715256
Try to add an AppDomain Unhandled Exception handler in the startup event...
This should give us something ( I Hope :) )

like....
App.Domain.Current.Unhandled += new .....
0
 

Author Comment

by:sobreiro01
ID: 22715360
I found this good blog of Sebastian. http://blog.icsharp.net/2008/01/why-my-vsto-office-2003-addin-doesn.html

This guy made me pay attention to some application I´have just installed in both machine. We have installed MS Office Communicator, wich is part of office 2007 family. And looking at what Sebastian told in the article, it could make our machines stop working.

First I tried the solution gave by Morgan, register the dll Excel Interop on GAC, without success. And then, I tried to uninstall the MS Communicator and rebuild the solution (with a clean before) and nothing works yet.

The article is about a Outlook addin solution, but I think it´s similar. I even tried the command:
"set VSTO_SUPPRESSDISPLAYALERTS=0" and then, tried to open excel by command prompt as he teel us to do with ms outlook, but it doesn´t show any error.

nothing is logged in event viewer.

I´m gonna try to implement the event handler you suggest and post what happens here.

Again, thank you very much for your help.

André L Sobreiro


0
 
LVL 11

Expert Comment

by:William
ID: 22715388
You can also google using Fusion for debugging...    It is part of the .net framework, I do not remember the details but it can also give you ALOT of info on what is going on.




Cheers
BillyDvd
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:sobreiro01
ID: 22723994
I has a lot to do with offce 2007.
Today, I lost the enviorement becouse people from support deppartment has installed entire office 2007 suite in my machine.

Now, things is working. even the addins made for excel 2003 works on excel 2007.
I don know what happend. I need to recover my system in order to continue developing for office 2003.

by now, the only thing we know is the relation between the problem and the office 2007. I gonna post again as soon as I have more info about the problem and any possible solution.

thanks,
André L Sobreiro


0
 

Author Comment

by:sobreiro01
ID: 22730073
Hi,

I have unistalled everything but visual studio system.
Now, I installed Office2003 suite and again VSTO 2005 SE.

Opened up my solution, made a clean and than recompile everything.
When I run, the addin is not loaded under Excel 2003.

I continue to investigate, and realize that the VSTO is generating the wrong set of register keys for the addin is beeing compiled for office 2003.

Comparing to the table available on "http://msdn.microsoft.com/en-us/library/bb386106.aspx" it´s creating the keys of  "...\Software\Office\Excel\Addins\My Addin Name\..." based on office 2007.

We dont have a solution yet, but I think we are on the right way...
0
 
LVL 11

Accepted Solution

by:
William earned 500 total points
ID: 22734367
I believe you will run into issues becuase the 2007 install they did for you :(
0
 

Author Comment

by:sobreiro01
ID: 22737327
Yep, I give up of the fight against vsto and office2007.
The problem is related to it, if someone find any solution to make them working together without problems, please post. It would be very nice.

Thank you Billy for your help.

I am now moving to another station without any of office 2007 application. There is everything working fine.

0
 

Author Comment

by:sobreiro01
ID: 22757937
Only one thing more. The problem happend in the new station, after the Office Communicator install.
After that, I got to work for 2 says. The problem happend after a clean solution command.

I think it removed the right set of register keys and when I compiled the application, it´s generating the wrong set of the register keys.

What can I do now? move to another station.. Aff.

0
 
LVL 11

Expert Comment

by:William
ID: 22758701
I have never used 'Office Communicator'. My first guess is this has something to do with it, however, I do not know what.
Do you know if this installs 'COM' like in the system or office or??

Sorry I can not be of more help :(

0
 

Author Comment

by:sobreiro01
ID: 22762782
Hi Billy,

About the Office communicator, I am almost sure it's because it's part of Office 2007 suite
but I have more news about the problem. I have got to make it work again by remove my profile from windows and loggin-on againg,forcing the windows xp to re-create my profile, and so, it back to work.

I did it becouse a friend of mine has logged in the same machine and with him, the machine worked well.



0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now