Export (0) Print
Expand All

Step 4: Package and Deploy the Declarative Outlook Solution

SharePoint 2010

Microsoft Business Connectivity Services (BCS) provides a public object model on the server to package all the solution artifacts of a declarative Outlook solution into a ClickOnce package. This requires coding and can only be executed on the server. To easily and quickly package an intermediate declarative Outlook solution, Business Connectivity Services also provides the BCS Solution Packaging Tool, available on MSDN Code Gallery. This tool can be run from a client computer.

Last modified: August 22, 2011

Applies to: SharePoint Server 2010

The package produced by using the BCS Declarative Solution Packaging Tool and the object model are identical and can be deployed on the client as an Outlook add-in. The binary of the add-in is not part of the package, but is provided instead by Business Connectivity Services as part of the managed DLLs currently placed in the global assembly cache at Office setup time.

To package a declarative Outlook solution using the BCS Solution Packaging Tool

  1. Download the BCS Solution Packaging Tool and copy it to a client computer that has Microsoft .NET Framework 3.5 and Microsoft Office 2010 installed.

  2. Run BCSPackageTool.exe. This displays the BCS Solution Packaging Tool dialog box.

  3. Fill in the required information as specified below, and then click the Package button.

    1. Solution Name   Specify a name for the solution package. This must be the same as the SolutionID attribute in the solution manifest (OIR.config). Otherwise, Business Connectivity Services will not autogenerate a form region for you in Outlook for the unmapped properties.

    2. Source Folder Path   Select the folder on the local computer that contains solution artifacts.

    3. Target Folder Path   Select the folder on the local computer that should contain the output files and the Office development tools for Visual Studio package.

    4. Solution Version Specify a solution version.

    5. Solution Type Select the Outlook Intermediate Declarative Solution option.

  4. Trigger solution deployment for a packaged solution by clicking the Deploy button. You can also double-click the Office development tools for Visual Studio package to start the installation.

To package a declarative Outlook solution using the Packaging object model

  1. Upload the solution artifacts to a SharePoint document library. Create another document library to store the deployment files.

  2. Depending on whether you want a signed package or an unsigned package, execute one of the code examples in the following sections on the server after providing the necessary information. You should see a .VSTO package created in the target document library.

    1. siteUrl    The SharePoint site that contains the document libraries.

    2. publishSrcTitle   The SharePoint document library that contains all of the solution artifacts.

    3. publishTargetTitle   The SharePoint document library that will contain all of the deployment files and the .VSTO package.

    4. solutionName   Must be the same as the SolutionID attribute in the solution manifest (OIR.config). Otherwise, Business Connectivity Services will not autogenerate a form region for you in Outlook for the unmapped properties.

The following example shows how to create a signed BCS declarative solution package.

 Uri siteUrl = new Uri("http://localhost"); 
string publishSrcTitle = "PublishSrcDocLib"; 
string publishTargetTitle = "PublishTargetDocLib"; 
string solutionName = "Example Solution Name";
string solutionID = "Example Solution ID";
string certFileName = "Example Solution Cert.pfx";
string certFilePassword = "password";
Version solutionVersion = new Version(1, 0, 0, 0);
X509Certificate2 packageCert = new X509Certificate2(
    certFileName, certFilePassword); 
SolutionPackage package = new SolutionPackage(
    siteUrl, publishSrcTitle, solutionName, solutionID, solutionVersion); 
string depolymentFileName = package.Generate(
    packageCert, publishTargetTitle);

The following example shows how to create an unsigned BCS declarative solution package.

Uri siteUrl = new Uri("http://localhost"); 
string publishSrcTitle = "PublishSrcDocLib"; 
string publishTargetTitle = "PublishTargetDocLib"; 
string solutionName = "Example Solution Name";
string solutionID = "Example Solution ID";
Version solutionVersion = new Version(1, 0, 0, 0);
SolutionPackage package = new SolutionPackage(
    siteUrl, publishSrcTitle, solutionName, solutionID, solutionVersion); 
string depolymentFileName = package.GenerateUnsigned(publishTargetTitle);
Show:
© 2014 Microsoft