[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Deploying a VSTO add-in in the client computer

Posted on 2008-10-03
14
Medium Priority
?
1,562 Views
Last Modified: 2013-12-17
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.
0
Comment
Question by:FLUXWIRE
  • 3
  • 3
  • 2
  • +4
13 Comments
 
LVL 5

Expert Comment

by:johnaryan
ID: 22633590
Just want to verify, did the client have the .Net Framework 3.5 installed on the machine?
0
 

Author Comment

by:FLUXWIRE
ID: 22633939
yep.
net framework 3.5
windows installer 3.1
vsto 3.0
sql express 2005 sp2
all as required by the add-in
0
 
LVL 5

Expert Comment

by:johnaryan
ID: 22634048
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
Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

 

Author Comment

by:FLUXWIRE
ID: 22635826
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
 

Author Comment

by:FLUXWIRE
ID: 22640717
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
 
LVL 5

Expert Comment

by:johnaryan
ID: 22648354
sorry, beyond me.
0
 
LVL 6

Expert Comment

by:einarbrown
ID: 22656877
You can find the add-ins in Add/remove programs.
0
 
LVL 11

Expert Comment

by:Vivek Thangaswamy
ID: 22694164
0
 
LVL 1

Expert Comment

by:westerdale
ID: 23033791
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
 

Expert Comment

by:michael2705
ID: 23367318
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
 
LVL 1

Accepted Solution

by:
westerdale earned 1000 total points
ID: 23367766
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
 
LVL 3

Assisted Solution

by:drmason
drmason earned 1000 total points
ID: 24345877
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
 
LVL 3

Expert Comment

by:drmason
ID: 24345879
That should have been System.Console.WriteLine(ex.Message);

0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

865 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