saurabh bhatia program manager microsoft corporation andrew whitechapel senior pm microsoft...
TRANSCRIPT
![Page 1: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/1.jpg)
Office Business Applications: Enhanced Deployment
Saurabh BhatiaProgram ManagerMicrosoft Corporation
Andrew WhitechapelSenior PMMicrosoft Corporation
TL01
![Page 2: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/2.jpg)
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
Agenda
![Page 3: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/3.jpg)
The Deployment Timeline
VS 2005Emulated “ClickOnce”
![Page 4: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/4.jpg)
The Deployment Timeline
VS 2005Emulated “ClickOnce”
VS 2008Real ClickOnce-Publish-Installer-Pre-reqs
![Page 5: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/5.jpg)
The Deployment Timeline
VS 2005Emulated “ClickOnce”
VS 2008Real ClickOnce-Publish-Installer-Pre-reqs
VS 2010Enhanced ClickOnce-Multi-project-Post Deployment Actions-No PIAs
![Page 6: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/6.jpg)
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
The Business Problem
![Page 7: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/7.jpg)
An Office Business Application Saurabh Bhatia
Program ManagerVisual Studio BizApps
demo
![Page 8: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/8.jpg)
Architecture Of The Solution
Outlook Add-in
Excel Template Customization
Private Shared
Assembly
Pre-Requisites
Office PIAs
VSTO Runtime
.NET Framework
![Page 9: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/9.jpg)
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
Deploying The Solution
![Page 10: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/10.jpg)
VSTO ClickOnce Deployment In VS 2008 Saurabh Bhatia
Program ManagerVisual Studio BizApps
demo
![Page 11: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/11.jpg)
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
VSTO ClickOnce In Visual Studio 2008
![Page 12: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/12.jpg)
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 you’re targeting, and maintain these in-sync
Customer Pain Points With VS 2008 Deployment
![Page 13: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/13.jpg)
Improvements In VS 2010
Multi-project deployment packages Post-deployment custom actions “No-PIAs” – eliminate
the dependency on the PIAs
![Page 14: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/14.jpg)
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
![Page 15: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/15.jpg)
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
![Page 16: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/16.jpg)
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=MyOutlookAddInDocument Customizations:
_AssemblyLocation= MultiProject.vsto|id=MyExcelTemplate
![Page 17: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/17.jpg)
MultiProject Deployment
Saurabh BhatiaProgram ManagerVisual Studio BizApps
demo
![Page 18: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/18.jpg)
MultiProject Application Manifest
<dependency><dependentAssembly dependencyType="install"
allowDelayedBinding="true" codebase="WordAddIn1.dll" size="9728">
...<dependentAssembly dependencyType="install"
allowDelayedBinding="true" codebase="ExcelWorkbook1.dll" size="13312">
...</dependency>
![Page 19: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/19.jpg)
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>
![Page 20: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/20.jpg)
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
![Page 21: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/21.jpg)
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
![Page 22: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/22.jpg)
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
![Page 23: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/23.jpg)
Post Deployment ActionsPost Deployment Actions
Post Deployment Actions
Install / Update
Download Manifests
ClickOnce Security Checks
Download App Files to Cache
Finish
![Page 24: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/24.jpg)
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
![Page 25: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/25.jpg)
Creating A Post Deployment Action
Implement the IAddInPostDeploymentAction Interface
Associate the Post Deployment Action with a deployment package
![Page 26: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/26.jpg)
Post Deployment Action Interface
IAddInPostDeploymentAction Interface Execute(AddInPostDeploymentActionArgs)
AddInPostDeploymentActionArgs InstallationStatus, AddInPath,
PostActionManifestXml, Manifest, ApplicationManifestXml, DeploymentManifestXml, HostManifestXml, ProductName, Version
![Page 27: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/27.jpg)
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:}
}}
}
![Page 28: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/28.jpg)
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>
![Page 29: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/29.jpg)
Post Deployment Action Saurabh Bhatia
Program ManagerVisual Studio BizApps
demo
![Page 30: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/30.jpg)
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
![Page 31: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/31.jpg)
Updating A Deployed Solution Saurabh Bhatia
Program ManagerVisual Studio BizApps
demo
![Page 32: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/32.jpg)
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
![Page 33: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/33.jpg)
No More PIAs
New Feature in CLR 4.0 Eliminates the need to deploy the Office
Primary Interop Assemblies
Related TalkUnder the Hood: Advances in the .NET Type System
Misha Shneerson
![Page 34: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/34.jpg)
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
![Page 35: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/35.jpg)
IntelliSense,AutoComplete Type Information
Partial Type Information
Type EmbeddingDevelopment experience
Client Assembly
Local Types
VS Code Editor
Primary Interop
Assembly
C#/VBCompiler
![Page 36: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/36.jpg)
No PIAs
Saurabh BhatiaProgram ManagerVisual Studio BizApps
demo
![Page 37: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/37.jpg)
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
![Page 38: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/38.jpg)
Solution Deployment
Outlook Add-in
Excel Template Customization
Private Shared
Assembly
Pre-Requisites
Office PIAs
VSTO Runtime
.NET Framework
![Page 39: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/39.jpg)
Solution Deployment
Excel Template Customization
Private Shared
Assembly
Outlook Add-in
Pre-Requisites
Office PIAs
VSTO Runtime
.NET Framework
![Page 40: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/40.jpg)
Solution Deployment
Excel Template Customization
Private Shared
Assembly
Outlook Add-in
MultiProject Deployment
Pre-Requisites
Office PIAs
VSTO Runtime
.NET Framework
![Page 41: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/41.jpg)
My Templates
Folder
Post Deployment
Action
Solution Deployment
Excel Template Customization
Private Shared
Assembly
Outlook Add-in
MultiProject Deployment
Pre-Requisites
Office PIAs
VSTO Runtime
.NET Framework
![Page 42: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/42.jpg)
My Templates
Folder
Post Deployment
Action
Solution Deployment
Excel Add-in
Private Shared
Assembly
Outlook Add-in
MultiProject Deployment
Pre-Requisites
Office PIAs
VSTO Runtime
.NET Framework
![Page 43: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/43.jpg)
My Templates
Folder
Post Deployment
Action
Solution Deployment
Excel Add-in
Private Shared
Assembly
Outlook Add-in
MultiProject Deployment
Pre-Requisites
VSTO Runtime
.NET Framework
![Page 44: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/44.jpg)
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
![Page 45: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/45.jpg)
VSTO Team bloghttp://blogs.msdn.com/vsto
Andrew Whitechapel’s bloghttp://blogs.msdn.com/andreww
VSTO Developer Portalhttp://msdn.com/vsto
OBA Portal http://www.microsoft.com/oba
Additional Resources
![Page 46: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/46.jpg)
Please use the microphones provided
Q&A
![Page 47: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/47.jpg)
Evals & Recordings
Please fill
out your
evaluation for
this session at:
This session will be available as a recording at:
www.microsoftpdc.com
![Page 48: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/48.jpg)
© 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.
![Page 49: Saurabh Bhatia Program Manager Microsoft Corporation Andrew Whitechapel Senior PM Microsoft Corporation TL01](https://reader035.vdocuments.us/reader035/viewer/2022081518/551a5fc5550346cb358b60e8/html5/thumbnails/49.jpg)