TL01: Office Business Applications: Enhanced Deployment

TL01: Office Business Applications: Enhanced Deployment

TL01 Office Business Applications: Enhanced Deployment Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation Agenda

Office solution deployment timeline An Office Business Application The deployment experience in VS 2008 ClickOnce deployment for Office Client customizations Improvements in VS 2010

Multiproject deployment Post deployment actions Advances in .NET type system The Deployment Timeline VS 2005 Emulated ClickOnce The Deployment Timeline VS 2008 Real ClickOnce -Publish -Installer -Pre-reqs

VS 2005 Emulated ClickOnce The Deployment Timeline VS 2010 Enhanced ClickOnce VS 2008 Real ClickOnce -Publish -Installer -Pre-reqs VS 2005 Emulated ClickOnce

-Multi-project -Post Deployment Actions -No PIAs The Business Problem Requirement: Regular auditing exercises Extract email data from Outlook Perform calculations/charting on it

Architecture of the solution Excel template customization talks to Outlook add-in to fetch email data for processing in Excel demo An Office Business Application Saurabh Bhatia Program Manager Visual Studio BizApps

Architecture Of The Solution Excel Template Customization Private Shared Assembly Pre-Requisites Office VSTO PIAs Runtime .NET Framework

Outlook Add-in Deploying The Solution Solution requires 3 projects Pre-requisites needed

Excel template customization Outlook add-in Shared Class Library .NET Framework VSTO Runtime Office Primary Interop Assemblies (PIA) Solution can be deployed with ClickOnce in VS 2008 demo

VSTO ClickOnce Deployment In VS 2008 Saurabh Bhatia Program Manager Visual Studio BizApps VSTO ClickOnce In Visual Studio 2008 Full end-to-end solution installation through ClickOnce Publishing in Visual Studio Prerequisites can be

installed through setup.exe Updates and Offline access via the ClickOnce Cache Customer Pain Points With VS 2008 Deployment Multiple projects deployed separately ClickOnce in VS 2008 has limited flexibility

Excel template must be moved outside of the ClickOnce mechansim This breaks the update and uninstall scenarios Office solutions have a dependency on the Office PIAs Require admin rights to install Version-specific: You must deploy the version of the PIAs that matches the version of Office youre targeting, and maintain these in-sync

Improvements In VS 2010 Multi-project deployment packages Post-deployment custom actions No-PIAs eliminate the dependency on the PIAs MultiProject Deployment A single ClickOnce package can now contain

Multiple Add-ins and document customizations Customizations for different Office Client applications All customizations Install/Update and Uninstall as one package Customizations can be added or removed as part of an update Packaging Multiple Projects In One Deployment

Application Manifest updated to contain References to all dependent files for all included customizations Multiple entry points- An entry point for every individual customization An unique id value identifying each entry point Installing MultiProject Deployment One entry is created in Programs and Features

All Application Files are downloaded to the same ClickOnce Cache location Individual customizations are registered to start with the appropriate Office Application Add-ins: \HKCU\Software\Microsoft\Office\Outlook\Addins\MyOutlookAddIn\ manifest=MultiProject.vsto|id=MyOutlookAddIn Document Customizations: _AssemblyLocation= MultiProject.vsto|id=MyExcelTemplate

demo MultiProject Deployment Saurabh Bhatia Program Manager Visual Studio BizApps MultiProject Application Manifest ...

codebase="ExcelWorkbook1.dll" size="13312"> ... MultiProject Application Manifest ... ... ... ...

MultiProject Deployment Package multiple Office customizations as one ClickOnce Package Customizations Install/Update and Uninstall as one package The Application Manifest describes the entry points for the multiple customizations Post Deployment Actions Developer defined custom actions

Provides a extensible hook into the ClickOnce deployment mechanism Runs when the VSTO customization is being Installed/Updated or Uninstalled What Can You Do With A Post Deployment Action? Anything as long as it requires Current User Privilege

Copy a template to a particular location of the end users machine Read/Write registry keys Standard ClickOnce restrictions Current user privileges (asInvoker only) Cannot display UI or interact with end user Post Deployment Actions Install / Update Download Manifests

ClickOnce Security Checks Download App Files to Cache Post Deployment Actions Finish Post Deployment Actions Multiple Post Deployment Actions are allowed in a single deployment

Each action is run sequentially Each Post Deployment Action is isolated in its own Application Domain If one of the Actions fail then the process is aborted and the remaining actions are called in reverse Creating A Post Deployment Action Implement the IAddInPostDeploymentAction Interface Associate the Post Deployment Action with a deployment package

Post Deployment Action Interface IAddInPostDeploymentAction Interface Execute(AddInPostDeploymentActionArgs) AddInPostDeploymentActionArgs InstallationStatus, AddInPath, PostActionManifestXml, Manifest, ApplicationManifestXml, DeploymentManifestXml, HostManifestXml, ProductName, Version Post Deployment Action using Microsoft.VisualStudio.Tools.Applications.Deployment;

namespace Microsoft.Samples { Public class PostDeploymentActionAddInSample : IAddInPostDeploymentAction { public void Execute(AddInPostDeploymentActionArgs args) { Switch(args.InstallationStatus) { case AddInInstallationStatus.InitialInstall: case AddInInstallationStatus.Uninstall: case AddInInstallationStatus.Update: case AddInInstallationStatus.Rollback: } } } }

Post Deployment Action XML Associate a Post Deployment Action in the Application Manifest Specify the Assembly and entry point to the Post Deployment Action Optionally specify any additional data that can be used by the Post Deployment Action

My Post Action can read this data demo Post Deployment Action Saurabh Bhatia

Program Manager Visual Studio BizApps Solution Updates Office Business Application Version 2 Update Outlook Add-in to include another method GetDataFiltered(days) Collect email data for the specified number of days

Replace Excel Template with an Excel Add-in When solution is updated to Version 2 the Excel Template in the end users My Templates should be deleted demo Updating A Deployed Solution Saurabh Bhatia Program Manager Visual Studio BizApps Post Deployment Actions

Custom extensibility hook in the ClickOnce deployment mechanism Perform as custom action under current user privilege Powerful and flexible mechanism The power is in your hands so use it wisely No More PIAs New Feature in CLR 4.0 Eliminates the need to deploy the Office Primary Interop Assemblies

Related Talk Under the Hood: Advances in the .NET Type System Misha Shneerson Type Embedding Key points Information required to call into COM objects is embedded into the assembly itself Runtime dependency on Interop Assemblies can be eliminated You can continue to develop against the Office Interop assemblies at designtime but

they are no longer needed at runtime Type Embedding Development experience IntelliSense, AutoComplete VS Code Editor Primary Interop Assembly Type Information

C#/VB Compiler Partial Type Information Client Assembly Local Types demo No PIAs Saurabh Bhatia Program Manager

Visual Studio BizApps No More PIAs .NET 4.0 targeted Office customizations do not need to deploy the Office PIAs Pre-requisites required .NET Framework 4.0 VSTO Runtime 4.0 Office PIAs

Solution Deployment Excel Template Customization Private Shared Assembly Pre-Requisites Office VSTO PIAs Runtime .NET Framework

Outlook Add-in Solution Deployment Private Shared Assembly Excel Template Customization Outlook Add-in Pre-Requisites Office VSTO PIAs Runtime

.NET Framework Solution Deployment Private Shared Assembly MultiProject Deployment Excel Template Customization Outlook Add-in Pre-Requisites Office

VSTO PIAs Runtime .NET Framework Solution Deployment Private Shared Assembly MultiProject Deployment My Templates Folder

Excel Template Customization Outlook Add-in Pre-Requisites Office VSTO PIAs Runtime .NET Framework Post Deployment Action Solution Deployment

Private Shared Assembly MultiProject Deployment My Templates Folder Excel Add-in Outlook Add-in Pre-Requisites Office VSTO

PIAs Runtime .NET Framework Post Deployment Action Solution Deployment Private Shared Assembly MultiProject Deployment My

Templates Folder Excel Add-in Outlook Add-in Pre-Requisites VSTO Runtime .NET Framework Post Deployment Action Conclusions

Multiproject Deployment allows you to combine multiple customizations into one deployment package Post Deployment Actions provide an extensible hook that can be used to run custom install steps No PIA Embedded COM Interop removes the need to deploy Office Primary Interop Assemblies Additional Resources VSTO Team blog http://blogs.msdn.com/vsto Andrew Whitechapels blog

http://blogs.msdn.com/andreww VSTO Developer Portal http://msdn.com/vsto OBA Portal http://www.microsoft.com/oba QA & Please use the microphones provided Evals & Recordings

ll fi e s a e l P r out you for n o ti a u

l eva t: a n o i s s this se This sess ion will be availa ble as a record

ing at: www.microsoftpdc.com 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Recently Viewed Presentations

  • Cellular Automata Biologically Inspired Computing Various credits for

    Cellular Automata Biologically Inspired Computing Various credits for

    Langton's Loops Langton's Loop 0 - Background cell state 3, 5, 6 - Phases of reproduction 1 - Core cell state 4 - Turning arm left by 90 degrees 2 - Sheath cell state state 7 - Arm extending forward...
  • UNIQLO - ce.etweb.fju.edu.tw

    UNIQLO - ce.etweb.fju.edu.tw

    Preparations are now underway to open another global flagship store on New York's Fifth Avenue in fall 2011. 4.HEATTECH UNIQLO developed HEATTECH in response to customers'demands for functional innerwear to complement UNIQLO's previous lineup of mostly cotton innerwear. What is...
  • Scottish Local Government Finance Statistics, 2017-18  Key Facts

    Scottish Local Government Finance Statistics, 2017-18 Key Facts

    Councils in Scotland spent an average of 10% of their General Funding on debt repayments in 2017-18, with values for individual authorities ranging between 6% and 15%. Orkney and Shetland have been excluded from this analysis, as they have large...
  • Value Added Theory of Social Movements - Weebly

    Value Added Theory of Social Movements - Weebly

    Value Added Theory of Social Movements (Neil Smelser) This theory (Neil Smelser) suggests that ALL of these conditions must be met: Structural Conduciveness: Conditions in society are conducive to the movement. People are aware of the issue and can then...
  • CS1315: Introduction to Media Computation

    CS1315: Introduction to Media Computation

    CS1315: Introduction to Media Computation Introduction to Programming Installation Installing JES and starting it up Windows users: Just copy the folder Double-click JES application Mac users: Just copy the folder Use Terminal Use "cd" into the directory Use "./JES" Fill...
  • The Battle in Europe After Kant: Relativism and Absolutism

    The Battle in Europe After Kant: Relativism and Absolutism

    The Battle in Europe after Kant: Relativism and Absolutism Introducing Philosophy, 10th edition Robert C. Solomon, Kathleen Higgins, and Clancy Martin ...
  • Blackboard Orientation for Students

    Blackboard Orientation for Students

    Accessing your Blackboard Account. All TCL students/users Log-In to a secure portal using a TCL user ID and password. All enrolled students/users are authenticated through an identity management system that provides each student/user with a unique Username and Password for...
  • Capercaillie Skye Waulking Song

    Capercaillie Skye Waulking Song

    They play traditional folk instruments (uilleannn pipes, flute, fiddle, accordian & bouzouki) over more modern instruments like drums, keyboard & bass guitar. Their singer, Karen Matheson, mainly sings in Scots Gaelic. Their music is a . mix. of traditional Celtic...