Repost - Unable to run Outlook 2000 com addin built via .NET/VS 20

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Background:

I have built a com addin designed for Outlook 2000 using VS version
7.1.3088 and .NET framework version 1.1.4322 SP1. The language used
is C#.

I used the "Shared Addin" wizard to create the addin and only
selected the Outlook option. The addin is designed to load when the
host app (Outlook) starts and be available to all users.

The dependencies are: Extensibility.dll, Interop.Office.dll,
Interop.Outlook.dll, MS09.dll, msoutl9.dll, Office.dll

I have 2 major problems:

1. When installed on the box where the addin was developed the addin is run
(when Outlook starts) from the build location not the install location. That
is if the build directory is c:\myproj\bin\Debug and the install directory is
c:\program files\outlook-addin\myproj then the addin is executed from the
build directory. The install goes ok and the correct registry entries are
created. I have tested to see where the addin is running from by checking
the value of Assembly.GetExecutingAssembly and it returns the build path.
Also, if I remove the myproj.dll file from the bin\Debug directory the addin
isn't started with Outlook.

2. The other issue (and I suspect it is related to 1) is that the addin
cannot be installed onto another machine running W2K and Outlook 2000.
Again, the install goes fine but nothing happens when Outlook is started.

Strangely, the addin used to work (i.e. could be installed on another W2K
machine and run in Outlook) but nothing has changed (in terms of the
configuration of the project) for it to behave this way.

Can anyone help? I don't even know where to start looking to resolve it.

Gary

P.S. Andrew, many thanks for the response to my original post, I will try
it. I would also just like a response from Microsoft as well and when I
originally posted (after jumping through 20 rather unnecessary hoops) I
didn't have the correct settings. I need the Microsoft feedback for the
other issue of where the addin is being run from. But thank you for taking
the time to post the potential fix (I hope it works this is driving me nuts!)
 
Hi Gary,

Thanks for posting at the newsgroup!

I have reviewed your thread. Currently I am finding somebody who could help
you on it. We will post back in the newsgroup as soon as possible.

If there is anything unclear, please feel free to post in the group and we
will follow up then.

Best Regards,
Wei-Dong XU
Microsoft Product Support Services

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
Business-Critical Phone Support (BCPS) provides you with technical phone
support at no charge during critical LAN outages or "business down"
situations. This benefit is available 24 hours a day, 7 days a week to all
Microsoft technology partners in the United States and Canada.
This and other support options are available here:
BCPS:
https://partner.microsoft.com/US/technicalsupport/supportoverview/40010469
Others: https://partner.microsoft.com/US/technicalsupport/supportoverview/

If you are outside the United States, please visit our International
Support page:
http://support.microsoft.com/default.aspx?scid=/international.aspx.
=====================================================
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi

When the outlook started, it will checked the subkeys under the registry
key below.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Outlook\Addins]
e.g. a subkey is A.B
Then it will check the A.B in the HKEY_CLASS_ROOT for the progid A.B to get
the CLASSID
Then it will check the HKEY_CLASS_ROOT\CLSID to get the correct location of
the com dll.
e.g.
[HKEY_CLASSES_ROOT\CLSID\{10F9EBA7-4332-4BA2-9C79-59AC13621BD6}\InprocServer
32\1.0.1985.20452]
"Class"="MyWordAddin1.Connect"
"Assembly"="MyWordAddin1, Version=1.0.1985.20452, Culture=neutral,
PublicKeyToken=null"
"RuntimeVersion"="v1.1.4322"
"CodeBase"="file:///<path>/MyWordAddin1.DLL"


So I think you may try to use the Regmon to see if that is correct.
http://www.sysinternals.com/Utilities/Regmon.html

If setup project is not set the correct registry, I think you may try to
rebuild one to have a test, if that still did not work.
I think you may try to post in the .NET setup queue.
microsoft.public.vstudio.setup
microsoft.public.vsnet.setup

If I have any misunderstanding, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi Peter,

Thank you for the response.

I checked the addin and the registry setup in the VS project didn't contain
the entry:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Outlook\Addins

although it did have an entry for (I presume because I configured the addin,
via the wizard,
to allow only the user that installs the addin to use it):

HKEY_LOCAL_USER\SOFTWARE\Microsoft\Office\Outlook\Addins

I added the HKLM entry to the registry settings and rebuilt. However when
installed onto a
machine other than where the addin is built the registry entry:

HKEY_CLASS_ROOT\CLSID\A.B

isn't being created (and I presume the subsequent CLSID entry isn't either,
although of course I can't check that).

Is this something you can provide further help on or should I now post to
the microsoft.public.vstudio.setup and microsoft.public.vsnet.setup groups?

Thanks,

Gary
 
Hi

Thanks for your quickly reply!
You are right, the HKEY_CURRENT_USER will also have a similar key.
The difference between currentuser and localmachine is the currentuser will
load addin just for the current user, but the localmachine will load addin
for all the user.

So if the addin key is installed for the HKEY_CURRENT_USER, the addin
should be detected by word addin.
But if the addin's progid is not found in the classroot reg key, it seems
that the .NET dll is not registry for COM.
You may try to use the regasm tool to registry it.
e.g.
regasm /codebase assemblyname.dll

Also by default, the addin setup project(It is created when we create an
addin project) will set the addin registry key and registry the dll for COM
interop.
That is why I suggest you post in the dotnet setup newsgroup, because if
seems that the setup project or the deployment environment has something
wrong.
That queue has many experienced setup user/expert.

If you still have any concern, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top