1 / 49

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

jeb
Download Presentation

Office Business Applications: Enhanced Deployment

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. 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

  3. The Deployment Timeline VS 2005 Emulated “ClickOnce”

  4. The Deployment Timeline • VS 2008 • Real ClickOnce • Publish • Installer • Pre-reqs VS 2005 Emulated “ClickOnce”

  5. The Deployment Timeline • VS 2010 • Enhanced ClickOnce • Multi-project • Post Deployment Actions • No PIAs • VS 2008 • Real ClickOnce • Publish • Installer • Pre-reqs VS 2005 Emulated “ClickOnce”

  6. 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

  7. demo An Office Business Application  Saurabh Bhatia Program Manager Visual Studio BizApps

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

  9. Deploying The Solution • Solution requires 3 projects • Excel template customization • Outlook add-in • Shared Class Library • Pre-requisites needed • .NET Framework • VSTO Runtime • Office Primary Interop Assemblies (PIA) • Solution can be deployed with ClickOnce in VS 2008

  10. demo VSTO ClickOnce Deployment In VS 2008  Saurabh Bhatia Program Manager Visual Studio BizApps

  11. 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

  12. 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 ClickOncemechansim • 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 you’re targeting, and maintain these in-sync

  13. Improvements In VS 2010 • Multi-project deployment packages • Post-deployment custom actions • “No-PIAs” – eliminate the dependency on the PIAs

  14. 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

  15. 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

  16. 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

  17. demo MultiProject Deployment  Saurabh Bhatia Program Manager Visual Studio BizApps

  18. MultiProject Application Manifest <dependency> <dependentAssemblydependencyType="install" allowDelayedBinding="true" codebase="WordAddIn1.dll" size="9728"> ... <dependentAssemblydependencyType="install" allowDelayedBinding="true" codebase="ExcelWorkbook1.dll" size="13312"> ... </dependency>

  19. MultiProject Application Manifest <vstav3:entryPoints id="WordAddIn1"> ... <vstav3:entryPoints id="ExcelWorkbook1"> ... </vstav3:entryPoints> <vstov4:customizations xmlns:vstov4="urn:schemas-microsoft-com:vsto.v4"> <vstov4:customization id="WordAddIn1"> ... <vstov4:customization id="ExcelWorkbook1"> ... </vstov4:customizations>

  20. 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

  21. 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

  22. 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

  23. Post Deployment Actions Post Deployment Actions Install / Update Download Manifests ClickOnce Security Checks Download App Files to Cache Post Deployment Actions Finish

  24. 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

  25. Creating A Post Deployment Action • Implement the IAddInPostDeploymentAction Interface • Associate the Post Deployment Action with a deployment package

  26. Post Deployment Action Interface IAddInPostDeploymentAction Interface • Execute(AddInPostDeploymentActionArgs) • AddInPostDeploymentActionArgs • InstallationStatus, AddInPath, PostActionManifestXml, Manifest, ApplicationManifestXml, DeploymentManifestXml, HostManifestXml, ProductName, Version

  27. Post Deployment Action using Microsoft.VisualStudio.Tools.Applications.Deployment; namespace Microsoft.Samples { Public class PostDeploymentActionAddInSample : IAddInPostDeploymentAction { public void Execute(AddInPostDeploymentActionArgsargs) { Switch(args.InstallationStatus) { case AddInInstallationStatus.InitialInstall: case AddInInstallationStatus.Uninstall: case AddInInstallationStatus.Update: case AddInInstallationStatus.Rollback: } } } }

  28. 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 <vstav3:postActions><vstav3:postAction> <vstav3:entryPoint class=“SamplePostAction.MyAction"> <assemblyIdentity name=“SamplePostAction" version="1.0.0.0" language="neutral" processorArchitecture="msil" /> </vstav3:entryPoint> <vstav3:postActionData> <MyData>My Post Action can read this data</MyData> </vstav3:postActionData> </vstav3:postAction></vstav3:postActions>

  29. demo Post Deployment Action  Saurabh Bhatia Program Manager Visual Studio BizApps

  30. 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 user’s My Templates should be deleted

  31. demo Updating A Deployed Solution  Saurabh Bhatia Program Manager Visual Studio BizApps

  32. 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

  33. 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

  34. 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

  35. Type EmbeddingDevelopment experience Primary Interop Assembly IntelliSense, AutoComplete Type Information VS Code Editor C#/VB Compiler Partial Type Information Client Assembly Local Types

  36. demo No PIAs  Saurabh Bhatia Program Manager Visual Studio BizApps

  37. 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

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

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

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

  41. Solution Deployment Private Shared Assembly MultiProject Deployment My Templates Folder Excel Template Customization Outlook Add-in Post Deployment Action Pre-Requisites Office PIAs VSTO Runtime .NET Framework

  42. Solution Deployment Private Shared Assembly MultiProject Deployment My Templates Folder Excel Add-in Outlook Add-in Post Deployment Action Pre-Requisites Office PIAs VSTO Runtime .NET Framework

  43. Solution Deployment Private Shared Assembly MultiProject Deployment My Templates Folder Excel Add-in Outlook Add-in Post Deployment Action Pre-Requisites VSTO Runtime .NET Framework

  44. 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 Interopremoves the need to deploy Office Primary Interop Assemblies

  45. Additional Resources • VSTO Team blog http://blogs.msdn.com/vsto • Andrew Whitechapel’s blog http://blogs.msdn.com/andreww • VSTO Developer Portal http://msdn.com/vsto • OBA Portal • http://www.microsoft.com/oba

  46. Q&A Please use the microphones provided

  47. Evals & Recordings Please fill out your evaluation for this session at: This session will be available as a recording at: www.microsoftpdc.com

  48. © 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.

More Related