Troubleshoot Outlook 2003 Add-in written in VSTO SE Deployment

  • Thread starter msnews.microsoft.com
  • Start date
M

msnews.microsoft.com

Hello Office Developers,

I need your advice on how best to troubleshoot an add-in after it gets
installed on a "client" machine. I assume it's a deployment issue, because
the add-in works on a development machine.

This add-in was created using Visual Studio 2005 C#, using the VSTO SE
Outlook 2003 template. (VSTO SE because the template creates the
"ThisAddIn" partial class.) My add-in has one line - messagebox.show(
"Hello World" ). I followed the two-part article that described "how to
deploy VS 2005 tools for office solutions using windows
installer"(http://msdn2.microsoft.com/en-us/library/aa537173(office.11).aspx).
I added the prerequisites, created an installer class that set full trust.

On the development machine, the app installs and shows "Hello World" on
startup.
On a client machine, it does not work. Something is different.

Could it due to CAS/Full-Trust? Maybe. I see the trust granted in Net 2.0
framework configuration. Caspol -rsg myaddinname.dll also shows it as full
trust. (the MS walk-thru gave full trust to the application directory) Also,
If I create an Outlook 2003 add-in using the VSTO template (not VSTO SE),
and use the same "setSecurity.cs" installer project, the VSTO add-in
successfully installs and runs on the client machine.

What's different about the VSTO SE code? The VSTO SE add-in is not on the
client's Outlook's "Disabled Items" list. It could be a Net 1.x framework
problem, although the VSTO add-in works, and there are no other add-ins (I
know of) installed in that client's Outlook.

Per Misha Shneerson's VSTO BLOG suggestion I set an environment variable
VSTO_SUPPRESSDISPLAYALERTS variable to 0. When I re-open Outlook, it throws
an exception in a message box. Is it a compatibility issue with
"Microsoft.Office.Tools.Common"? I've attached the first part of the
Outlook Error message from the pop-up to the bottom of the

This one has me stumped. How do I debug this issue?

Thanks for slogging through this long post.
-Russ
Could not load type 'Microsoft.Office.Tools.AddIn' from assembly
'Microsoft.Office.Tools.Common, Version=8.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a'.


************** Exception Text **************
System.TypeLoadException: Could not load type 'Microsoft.Office.Tools.AddIn'
from assembly 'Microsoft.Office.Tools.Common, Version=8.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
at System.Reflection.Assembly.GetType(String name, Boolean throwOnError,
Boolean ignoreCase)
at
Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.CreateStartupObject(EntryPoint
entryPoint, Dependency dependency, Assembly objectAssembly)
at
Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.ConfigureAppDomain()
at
Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.LoadAssembliesAndConfigureAppDomain(IHostServiceProvider
serviceProvider)
at
Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.ExecuteCustomization(IHostServiceProvider
serviceProvider)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:
file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Runtime
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.42
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Runtime/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Runtime.dll
----------------------------------------
Microsoft.Office.Tools.Common
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.42
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.Office.Tools.Common/8.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Common.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
TESTOUTLOOKClient
Assembly Version: 1.1.0.0
Win32 Version: 1.1.0.0
CodeBase: file:///C:/RVI/TEST/testoutlookclient.DLL
----------------------------------------
 
W

Wei Lu [MSFT]

Hello Rusty,

I would like to suggest you check the following articles to make sure your
client machine meet the pre-request for the VSTO.

How to: Prepare End User Computers to Run Office Solutions
http://msdn2.microsoft.com/en-us/library/2ac08ee2(VS.80).aspx

How to: Install the Visual Studio Tools for Office Runtime
http://msdn2.microsoft.com/en-us/library/ms178739(VS.80).aspx

According to the error message, I think you need to first check whether you
have installed the VSTO runtime.

You could follow these steps:

1. Install the .NET Framework 2.0 on the end user's computer. The .NET
Framework is required before you install the Visual Studio Tools for Office
runtime.

2. Run VSTOR.exe on the end user's computer.

VSTOR.exe is available as a redistributable package from the Microsoft
Download Center (http://go.microsoft.com/fwlink/?linkid=49612). This is the
VSTO 2005 SE version of the runtime. It provides support for both VSTO 2005
and VSTO 2005 SE solutions.

If you have VSTO 2005 or one of the Microsoft Visual Studio 2005 Team
System products, VSTOR.exe is on the Visual Studio Tools for Office
installation media. However, this is the VSTO 2005 version of the runtime.
It provides support for only VSTO 2005 solutions; it cannot be used to run
VSTO 2005 SE solutions.

The prerequisites for the Visual Studio Tools for Office runtime are the
same as the prerequisites for the .NET Framework.

3. If you have non-English settings for Windows, you can install the Visual
Studio Tools for Office Language Pack to see Visual Studio Tools for Office
runtime messages in the same language as Windows. If any end users run your
solutions with non-English settings for Windows, they must have the
language pack to see runtime messages in the same language as Windows. The
Visual Studio Tools for Office Language Pack is available from the
Microsoft Download Center (http://www.microsoft.com/downloads).

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
M

msnews.microsoft.com

A question I should have asked earlier - Is this the right newsgroup to post
this question? or should this question be posted to a different newsgroup,
such as -
"microsoft.public.office.developer.com.add_ins" or
"microsoft.public.outlook.program_addins"?
-Russ
 
R

Russ \(msnews.microsoft.com\)

Wei Lu,
Thank you for the prompt response.
I included VSTO Runtime and Office PIA as prerequisites, and put the checks
into the add-in's setup as installer launch conditions. Both VSTO runtime
and Office PIA are installed.

It turns out that VSTO Runtime was installed.
However, it was NOT the VSTO SE runtime version!

When I included it in the prerequisites, I didn't change the product code
and component ID.

Can you please provide me with the new product code & component ID, or tell
me how to find those IDs....I'll rebuild the prerequisite package and
installer. That should solve the problem.

Thanks for your help.
-Rusty
 
R

Russ \(msnews.microsoft.com\)

Wei Lu,
May I ask for the Public Key as well. Using the key from the first edition
of VSTO does not work. VS 2005 tells me the Public Key for vstor.exe is
different than that reported in the product.xml.
Thanks.
-Russ
 
W

Wei Lu [MSFT]

Hello Rusty,

You could find the Public Key in the GAC.

And I would like to know more detailed:

1. Have you installed the VSTO SE on your dev machine?

2. Have you successfully debugged the VSTO solution?

I would like to suggest you to installed the VSTO SE on a clean machine and
tested it.

Please let me know if you have any questions.

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Steve Rindsberg

A question I should have asked earlier - Is this the right newsgroup to post
this question? or should this question be posted to a different newsgroup,

This is good as any, I figure, though a crosspost to a VSTO group, if there are
any, might not be a bad idea.

I know of several other very smart people who're having trouble getting this
kind of thing to work. I'll be interested to see if MS has an answer for you.
So far, it doesn't appear that they do.
 
R

Russ \(msnews.microsoft.com\)

Hello Wei Lu,
In reponse to your note,
I have tried to look in the GAC for the public key (i tried sn -t and
gacautil and could not find the public key) however, I do see vstor.exe as
having been installed. it is file version 8.0.50727.816. Could you please
suggest another way for me to find the key.

1. I did install VSTO SE on the dev and the client machine. The add-in
worked.
I also manually installed VSTO SE on the client machine. The add-in worked.

2. I need to be able to check to see if VSTO SE is istalled -- so I am
looking for the product code and the component ID for the VSTO SE, so I can
update the install launch conditions

Again, Thank you.
-Russ
 
W

Wei Lu [MSFT]

Hello Russ,

Currently, I did not have this product code, Component ID and the public
key on my hand.

I will contact internally and try to get them or the way of how to get them
as soon as possible.

I appreciated your patience.

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
R

Russ \(msnews.microsoft.com\)

Hi Wei Lu,
I'm wondering if you have had success obtaining the three codes/ids.
Thank you so much for helping to resolve this issue.
-Russ
 
W

Wei Lu [MSFT]

Hello Russ,

I still waiting for the internal response. I will deliver this information
as soon as possible. I appreciate your patience.

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
W

Wei Lu [MSFT]

Hello Russ,

Sorry for the long delay.

I get the response from internal:

The Component ID appears to be the same as the one for VSTO 2005 RTM
runtime. "D2AC2FF1-6F93-40D1-8C0F-0E135956A2DA"

You could use the Orca MSI editor to get the information:

How to use the Orca database editor to edit Windows Installer files

http://support.microsoft.com/kb/255905



Orca install package

http://blogs.msdn.com/astebner/archive/2004/07/12/180792.aspx



Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
W

Wei Lu [MSFT]

Hi ,

How is everything going? Please feel free to let me know if you need any
assistance.

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
R

Russ \(msnews.microsoft.com\)

Wei Lu,
I knew that the component IDs were the same. This does not help me check a
client machine to determine if I had to install the Visual Studio Tools -
second edition version.

Here is what I've done since we last communicated:

I found the VSTO SE public key (it is different than the VSTO public key)
and updated the boostrap installer product.xml.

I discovered a registry key that VSTOSE uses (AND is different than VSTO
uses) after comparing the registry "before" and "after" installing VSTO SE.

I am rebuilding my C# application installer condition to check that registry
field. This seems to work on my development machine. I haven't tested it
on a client machine, yet. I expect to try it on a client machine this
Friday.

I have two questions for you:

1) I read somewhare (on someone's MSDN BLOG???) that Microsoft planned to
republish the two-part series "Deploying Visual Studio Tools for Office
Solutions" sometime in February 2007 to deal with VSTO SE. Do you know if
this is true? If it is true, when it will be published?

2) I am looking for the Outlook 2003 PIA (and Outlook 2007) download links
that I can use in the launch condition. This would be similar to the copy
of VSTOSE.EXE that is available for direct download by my clients:
http://go.microsoft.com/fwlink/?linkid=49612.

Thanks.
-Russ
 
W

Wei Lu [MSFT]

Hello Russ,

1. I did not sure about when we will publish the article. I will check MSDN
website.

2. You could not include the PIA in your setup project. The only way to
install the PIA is using the Office installation to install it.

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
W

Wei Lu [MSFT]

Hi Russ,

How is everything going? Please feel free to let me know if you need any
assistance.

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
R

Russ \(msnews.microsoft.com\)

Wei Lu,
I will let you know - it seems to be working if I tell folks to manually
install VSTO SE.
Thanks,
-Russ
 

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