Chinese (People's Republic of China)  English  Français


Supinfo-Projects.com
Supinfo Students' projects



Projects
  Last project
  Top projects
  All projects

100 User's online
3168 Projects


My Supinfo-Projects

   Login
   Create account


Synopsis

   7 Hits
   Visitors Score : 19.3
    (3 Voter)
   348 Comments

   Read the article

Evaluate this article

20
18
16
14
12
10
8
6
4
2
0


Comment this article

Author :

Email :

Your comment :



 
2006 - Note de Synthèse Stage
Creating a Microsoft Office Outlook 2007 add-in
[40 mn of reading - published 4/27/2006 10:52:26 AM - Target : Confirmé]

Author

LeHobbitRémi CHAMBARD
Student-Engineer Supinfo Paris
SUPINFO graduate year  2006

   Write to the person
   All projects of the same author
   Mini-CV of the author

6. Deploying an add-in

Contrary to the other types of more "traditional" applications, the deployment of a Microsoft Office Outlook 2007 add-in is more complicated in the way that it requires prerequisites but also to define security options in order to make it work correctly.

This part will aim to describe the various preparation stages of a Microsoft Office 2007 add-in deployment project.

6.1 Adding prerequisites

The deployment of a Microsoft Office Outlook 2007 add-in on a computer requires the installation of many prerequisites :

- Microsoft .NET Framework version 2.0.
- Microsoft Visual Studio 2005 Tools for Office v3 runtime.
- Microsoft Office 2007 primary interop assembly (installed by default during the complete installation of Microsoft Office 2007) : libraries used by the add-in to access to Microsoft Office 2007.

These various prerequisites can be added from the deployment project's properties windows. For that, you have to perform the following steps :

Step 1 : Right-click on the project and click on "Properties" :

prerequisites_1.gif

Step 2 : In the project's properties window, click on "Prerequisites..." :

prerequisites_2.gif

Step 3 : Check the "Create setup program to install prerequisite components" and "Download prerequisites from the same location as my application" options in order to make the prerequisites' installation files directly accessible from the deployment program directory :

prerequisites_3.gif

warning.gif

By default, Microsoft Visual Studio 2005 only proposes to add the Microsoft .NET Framework version 2.0 to the installation program. However, it is also possible to add manually the new prerequisites from the "C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages" directory as described in the following article.

warning.gif

The installation files of the Microsoft Visual Studio 2005 Tools for Office v3 runtime and Microsoft Office 2007 primary interop assembly prerequisites are not yet avaible to the public.

Step 4 : After having selected the prerequisites to add to the deployment project, click on "OK" twice. During the project compilation, a directory will be created for each prerequisite in the output directory. Each directory contains the required installation files.


6.2 Signing the add-in assembly

Before giving the appropriate authorizations to the assembly, you have to sign it. For that, you have to perform the following steps :

Step 1 : Double-click on the "Properties" node of the project corresponding to the add-in :

sign_1.gif

Step 2 : Click on the "Signing" tab :

sign_2.gif

Step 3 : Check the "Sign the assembly" option and then in the "Choose a strong name key file" list,  click on "<New...>" :

sign_3.gif

Step 4 : In the "Create Strong Name Key" window, enter a name for the file that will contain the key and also a password to protect it and then click on "OK" :

sign_4.gif

Step 5 : A new file that contains the key is then added to the project :

sign_5.gif


6.3 Trusting the assembly

In order to trust an assembly, you either have to do it from the .NET framework administration console (in the control panel) or directly during the installation process. In this last case, you have to perform the following steps :

Step 1 : Download the following package and extract it.

Step 2 : Copy the "C:\Program Files\Microsoft Visual Studio 2005 Tools for Office Resources\VSTO2005 Windows Installer Sample\projects\SetSecurity" directory in the solution directory.

Step 3 : In Microsoft Visual Studio 2005, right-click on the solution and then select "Add" and click on "Existing Project..." :

setsecurity_1.gif

Step 4 : In the "Add Existing Project" window, select the SetSecurity.csproj file and click on "Open" :

setsecurity_2.gif

Step 5 : The SetSecurity project is then added to the solution. Click on "File System Editor" in the solution explorer window :

setsecurity_3.gif

 

information.gif

The SetSecurity project allows to give the assembly the FullTrust authorization.

Step 6 : Right-click on the "Application Folder" node, select "Add" and click on "Project Output..." :

setsecurity_4.gif

Step 7 : In the "Add Project Output Group" window, in the "Project" list, select the SetSecurity project and click on "Primary output" and "OK" :

setsecurity_5.gif

Step 8 : Click on "Custom Actions Editor" in the solution explorer window :

setsecurity_6.gif

Step 9 : Right-click on the "Install" node, and select "Add Custom Action..." :

setsecurity_7.gif

Step 10 : In the "Select Item in Project" window, select "Primary output from SetSecurity (Active)" and click "OK" :

setsecurity_8.gif

Step 11 : Right-click on the "Primary output from SetSecurity (Active)" node and click on "Properties Window" :

setsecurity_9.gif

Step 12 : In the custom action's "CustomActionData" property, enter the following value where SampleAddin corresponds to the name of the add-in assembly and  Sample to the manufacturer :

property.gif

/assemblyName="SampleAddin.dll" /targetDir="[TARGETDIR]\"
/solutionCodeGroupName="Sample.SampleAddin"
/solutionCodeGroupDescription="Code group for sampleAddin"
/assemblyCodeGroupName="SampleAddin"
/assemblyCodeGroupDescription="Code group for SampleAddin"
/allUsers=[ALLUSERS]

setsecurity_10.gif

information.gif

This custom action allows to give the assembly the FullTrust authorization.

Step 13 : Repeat steps 9 through 12 for the "Rollback" and "Uninstall" nodes with the following value for the "CustomActionData" property :

property.gif

/solutionCodeGroupName="Sample.SampleAddin"

setsecurity_11.gif

information.gif

This custom action allows to delete the FullTrust authorization for the assembly.



6.4 Creating the deployment files

The deployment project is now ready. You only have to compile it in order to get the add-in's installation file in the ".\Release" directory.



Articles de la même catégorie

 Pages : Top


18 Hits
0 Comments
Faire un installeur NSIS
[30 mn of reading - published 4/27/2006 10:39:19 AM - Target : Confirmé]

More


29 Hits
0 Comments
Création d'un complément pour Microsoft Office Outlook 2007
[40 mn of reading - published 4/24/2006 3:56:27 PM - Target : Confirmé]

More


8 Hits
0 Comments
Your first steps with Ajax
[40 mn of reading - published 2/6/2006 10:19:46 AM - Target : Confirmé]

More

Powered by Campus-Booster Technology
Conditions d'utilisation & Copyright | Respect de la vie privée
© Copyright 1965-2006 Supinfo Paris, Paris Academy of Computer Science
Supinfo, Ecole Supérieure d'Informatique et Paris Academy Of Computer Science are trade marks.
23, rue de Château LANDON - 75010 PARIS - Phone : +33 (0) 153359 700 Fax : +33 (0) 153359 701

Web site autided by :