Deploying a VSTO add-in in the client computer

Hi!
I have an outlook 2007 addin build with visual studio 2008, c#. Working very well.
I publish it to an DVD media and install it in the client machine. Installs ok. When i open the outlook, in the Thrust center, the add-in is disabled. If I try to enable it, i got the message that this add-in could not be loaded. No reason explained.
If I install the Visual Studio 2008, it works. But i cannot install vs2008 in the client computer.
Any ideas how to fix this?
thx in advance.
FLUXWIREAsked:
Who is Participating?
 
westerdaleCommented:
In order for the addin to work on a target machine, you need to do a number of things
1) change the Signing in the "My Project" to a proper code signing cert.
1a) you can set Prerequisits too

2) the customization setup created when you published the addin can be used to install the addin.

3) once installed on the target pc. Go to the registry key
HKEY_CURRENT_USER\Software\Microsoft\Office\Outlook\Addins\<your addin>
and make sure the LoadBehavoir is set to 3. This will automatically load the addin when Outlook starts

Registry keys: Outtlook 2007 uses the Current User. SO if you have added the addin under Local Machine it will fail to load.

4) I would also make sure the .NET extensions in Office 2007 are also installed. I think its under Tools in the Office Setup

5) Use the VSTOR3.0. This works fine wiith the Office 2007.

6) Depending on your addin I would also use the xbapPermFix_sx.exe from Microsoft. This is a simple fix for security issues

7) I would also make sure that in the Outlook Trust Center you can see your Code signing Cert and the addin is not deactivated via the Deactivated Option below the COM addins (sorry I can't remember the precise location in English Outlook 2007)

Info:
in the published manifest make sure the loadbehavoir is set to 3
    <vstav2:application>
      <vstov3:customization xmlns:vstov3="urn:schemas-microsoft-com:vsto.v3">
        <vstov3:appAddIn application="Outlook" loadBehavior="3" keyName="myaddin">
          <vstov3:friendlyName>myaddin </vstov3:friendlyName>
          <vstov3:description>myaddin - Outlook add-in created with Visual Studio Tools for Office</vstov3:description>
        </vstov3:appAddIn>
      </vstov3:customization>
    </vstav2:application>


8) I alway makse sure the Startup Event is very quick. I saw funny effects if you so a lot of code in the
    ThisAddIn_Startup.

0
 
johnaryanCommented:
Just want to verify, did the client have the .Net Framework 3.5 installed on the machine?
0
 
FLUXWIREAuthor Commented:
yep.
net framework 3.5
windows installer 3.1
vsto 3.0
sql express 2005 sp2
all as required by the add-in
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
johnaryanCommented:
Sorry, not too sure all i can think is:
1. Maybe the installer didn't register all the components correctly... try checking the GAC to verify all neccessary dlls are there.
2. Rather than install VS on client, you could try to just install the .Net SDK... not ideal but would get you around any licencing issues.
0
 
FLUXWIREAuthor Commented:
i already install the framework 2.0 sdk into client. Didnt work.
i already install vs2008 and sp1 into client too. didnt work. i need to recompile the software into the computer to make it work.
I thoght that this was a vista problem. but my client machine is a XP sp3.
thx for your attention.
0
 
FLUXWIREAuthor Commented:
Hi.
Do you know where the add-ins are installed? because i am looking for the mdf file and I couldnt find it.May be this is the problem.
thx in advance.
0
 
johnaryanCommented:
sorry, beyond me.
0
 
einarbrownCommented:
You can find the add-ins in Add/remove programs.
0
 
Vivek ThangaswamyCommented:
0
 
westerdaleCommented:
Do you have a Publisher Certificate for the Addin? This would need to be added to the Trust Center in order for the Addin to be activated.
0
 
michael2705Commented:
Did you make sure that the regitry entries are set?
I'm not sure right now but I think for Office 2007 they have to be under HKEY_CURRENT_USER. I never tried it.
I know that for Office 2003 they can be under both current user and local machine.

Could you please post a screenshot of the registry view in visual studio?
0
 
drmasonCommented:
Further to Westerdale's #4: In Office 2k3, the PIAs are not installed if .NET is not already there. I don't know if that's true for 2k7 - if it is they might have to be installed.

Also, I used to have trouble with a different Extensibility.dll to what I'd linked to getting deployed. I discovered this using a small cmd-line utility based on the attached code: on the client computer (before the VS installation) you use the utility try to load the assembly, and see which dependencies it fails to load.


 private static void Main(string[] args)
        {
                      
            try
            {
                Assembly.LoadFile(args[0]).GetTypes();
            }
            catch(ReflectionTypeLoadException rtl)
            {
                // Look at the exceptions in rtl.LoaderExceptions
                foreach(Exception ex in rtl.LoaderExceptions)
                   System.Console.WriteLine(r.Message);
            }
           
        }

Open in new window

0
 
drmasonCommented:
That should have been System.Console.WriteLine(ex.Message);

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.