runtime error during the loading of the COM add-in

  • Thread starter Patrick Schmid [MVP]
  • Start date
P

Patrick Schmid [MVP]

I have no idea what is going on...
I took an add-in for Office 2007 that I started in VS 2003, and imported
the whole thing into VS 2005. Then I added some custom .Net components
from Developer Express (devexpress.com) to the project.
I have a rather long list of references now: Accessibility, a bunch of
DevExpress components, Extensibility, Microsoft.Office.Core,
Microsoft.Interop.* (all ribbon app ones), stdole, System,
System.Drawing, System.Windows.Forms, System.XML. The setup program is
the one generated by VS 2005.
The add-in works fine on my development machine. But the moment I
install it on a different machine, it fails with a runtime error during
the loading of the COM add-in (that's what the com add-ins dialog says).
I tried it in Excel, PPT and Word. I tried displaying a message box in
the Connect and OnConnection events, but they didn't appear. So I am
thinking it crashes before it even gets into those methods, but I have
no idea what the heck it could be.
Any suggestions?

Thanks,

Patrick Schmid
 
X

XL-Dennis

Patrick,

If I understand You correctly the 2003 version of it worked as expected and
without any dev components.

At first I would simple remove the components and see if the 2005 version
add-in work in the same way as the 2003 do.

Second, I would make a clean installation of it on the developing machine to
see if it work properly. After all, running it from the IDE may not always
uncover the issues.

I find it more difficult to track down issues with the .NET then with the
classic COM so based on my own experience I've compiled an article about
troubleshooting. It's not complete and it will never be possible...
http://www.excelkb.com/article.aspx?id=10206

In my experience 'shimmed' COM Add-ins appear to have less issues then
'unshimmed' but it's not necessary the case here as it looks like it related
to the components in use.

---------------
With kind regards,
Dennis
Weekly Blog .NET & Excel: http://xldennis.wordpress.com/
My English site: http://www.excelkb.com/default.aspx
My Swedish site: http://www.xldennis.com/
 
P

Patrick Schmid [MVP]

Dennis,
If I understand You correctly the 2003 version of it worked as expected and
without any dev components. Yes.

At first I would simple remove the components and see if the 2005 version
add-in work in the same way as the 2003 do.
There is a week of development between the two versions by now. I
changed every form to be completely based on those components, so simply
going back is not an option anymore at this point. I hope I can avoid
having to go through the code and commenting out everything related to
the components so that I can compile it without them...
Second, I would make a clean installation of it on the developing machine to
see if it work properly. After all, running it from the IDE may not always
uncover the issues.
It works fine on the developing machine, even if not rum from the IDE.
That's what is puzzling me really about this.
I find it more difficult to track down issues with the .NET then with the
classic COM so based on my own experience I've compiled an article about
troubleshooting. It's not complete and it will never be possible...
http://www.excelkb.com/article.aspx?id=10206
Thanks. I'm going through it.
In my experience 'shimmed' COM Add-ins appear to have less issues then
'unshimmed' but it's not necessary the case here as it looks like it related
to the components in use.
A COM shim for this add-in is on my to do list, but I doubt it makes any
sense to shim an add-in that is crashing on startup. So the shim has to
wait till I figure out what is going on here.

Thanks for your help!!

Patrick Schmid
 
X

XL-Dennis

Patrick,

I've experienced the same result and I suspect that there are some conflicts
'under the hood' when porting a VS2003 solution to VS2005.

If You have the time and interest You can use ILDASM to view the contents of
the assemblies and compare them.

On my 'wish' list I would like to have a tool that document the installation
processes and test results to reduce the time for re-creating the solution.

---------------
With kind regards,
Dennis
Weekly Blog .NET & Excel: http://xldennis.wordpress.com/
My English site: http://www.excelkb.com/default.aspx
My Swedish site: http://www.xldennis.com/
 
X

XL-Dennis

Patrick,

The only contribution I can give on the subject is to use the beta of .NET 3.0
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnlong/html/netfx30.asp

---------------
With kind regards,
Dennis
Weekly Blog .NET & Excel: http://xldennis.wordpress.com/
My English site: http://www.excelkb.com/default.aspx
My Swedish site: http://www.xldennis.com/


Patrick Schmid said:
Hi Dennis,

Thanks for your help! I am just glad that I got it working. Now, if it
would just work in Vista...

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 Beta 2 Technical Refresh (B2TR):
http://pschmid.net/blog/2006/09/18/43
***
Customize Office 2007: http://pschmid.net/office2007/customize
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed

Patrick,

I've experienced the same result and I suspect that there are some conflicts
'under the hood' when porting a VS2003 solution to VS2005.

If You have the time and interest You can use ILDASM to view the contents of
the assemblies and compare them.

On my 'wish' list I would like to have a tool that document the installation
processes and test results to reduce the time for re-creating the solution.

---------------
With kind regards,
Dennis
Weekly Blog .NET & Excel: http://xldennis.wordpress.com/
My English site: http://www.excelkb.com/default.aspx
My Swedish site: http://www.xldennis.com/
 
P

Patrick Schmid [MVP]

Thanks,

I don't see though how that would affect the code VS 2005 generates. It
will still only do .NET 2 code.

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 Beta 2 Technical Refresh (B2TR):
http://pschmid.net/blog/2006/09/18/43
***
Customize Office 2007: http://pschmid.net/office2007/customize
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed

Patrick,

The only contribution I can give on the subject is to use the beta of .NET 3.0
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnlong/html/netfx30.asp

---------------
With kind regards,
Dennis
Weekly Blog .NET & Excel: http://xldennis.wordpress.com/
My English site: http://www.excelkb.com/default.aspx
My Swedish site: http://www.xldennis.com/


Patrick Schmid said:
Hi Dennis,

Thanks for your help! I am just glad that I got it working. Now, if it
would just work in Vista...

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 Beta 2 Technical Refresh (B2TR):
http://pschmid.net/blog/2006/09/18/43
***
Customize Office 2007: http://pschmid.net/office2007/customize
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed

Patrick,

I've experienced the same result and I suspect that there are some conflicts
'under the hood' when porting a VS2003 solution to VS2005.

If You have the time and interest You can use ILDASM to view the contents of
the assemblies and compare them.

On my 'wish' list I would like to have a tool that document the installation
processes and test results to reduce the time for re-creating the solution.

---------------
With kind regards,
Dennis
Weekly Blog .NET & Excel: http://xldennis.wordpress.com/
My English site: http://www.excelkb.com/default.aspx
My Swedish site: http://www.xldennis.com/


:

I have no idea what was wrong. I rebuilt the VS 2005 project from
scratch, and now it is working just fine.

Patrick


No ADO at all. I think I won't get around stripping it to the bare
minimum *sigh*

Patrick Schmid


Patrick,

Do You by any chance use classic ADO to populate the component(s)? If so You
may check out the version in use on the test machine compared with Your own
developing machine.

---------------
With kind regards,
Dennis
Weekly Blog .NET & Excel: http://xldennis.wordpress.com/
My English site: http://www.excelkb.com/default.aspx
My Swedish site: http://www.xldennis.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top