28
Information Technology Solutions Customizing the Visual Studio 2010 SharePoint Deployment Process Eric Shupps SharePoint Server MVP

Customizing the visual studio 2010 share point deployment process

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Customizing the visual studio 2010 share point deployment process

Information Technology Solutions

Customizing the Visual Studio 2010 SharePoint Deployment Process

Eric ShuppsSharePoint Server MVP

Page 2: Customizing the visual studio 2010 share point deployment process

Information Technology SolutionsAbout Me

• SharePoint Server MVP• President, BinaryWave• Member, Patterns & Practices Advisory

Board (spg.codeplex.com)• Web: www.binarywave.com • Blog: www.sharepointcowboy.com• Twitter: @eshupps• Facebook:

www.facebook.com/sharepointcowboy

Page 3: Customizing the visual studio 2010 share point deployment process

Information Technology SolutionsAgenda

• Introduction to Code Deployment • Code Deployment Fundamentals• Customizing Code Deployment• Demos

– Deploying SharePoint Assets– Creating Custom SharePoint Commands– Creating a Custom Deployment Step– Creating a Custom Deployment Configuration

Page 4: Customizing the visual studio 2010 share point deployment process

Information Technology Solutions

Introduction to Code Deployment

Page 5: Customizing the visual studio 2010 share point deployment process

Information Technology SolutionsCode Deployment Objectives

• Implementation of packaged code in development environment

• Modification of deployment options and parameters

• Retraction of deployed solutions• Elimination of repetitive manual processes

which decrease productivity• Single-click build/package/deploy process

integrated into VS IDE

Page 6: Customizing the visual studio 2010 share point deployment process

Information Technology SolutionsLegacy Code Deployment

Create Solution

Files

AssetsFeatures

Build Solution

Package Solution

Deploy

Solution

MSBuild

Scripts

Tools

Solution Package

Manifests

Directives

WSP’s

Scripts

STSADM

Powershell

Page 7: Customizing the visual studio 2010 share point deployment process

Information Technology SolutionsLegacy Deployment Tools

WSP Builder

STSDEVVSeWSS

MSBuild STSADM MakeCab Batch Files

Page 8: Customizing the visual studio 2010 share point deployment process

Information Technology SolutionsLegacy Deployment Challenges

Poor Integration

Obfuscation

Modification

AutomationRetraction

Upgrades

Artifact Removal

Page 9: Customizing the visual studio 2010 share point deployment process

Information Technology Solutions

Code Deployment Fundamentals

Page 10: Customizing the visual studio 2010 share point deployment process

Information Technology SolutionsSP 2010 Code Deployment

Create Build Package Deploy

F5

Page 11: Customizing the visual studio 2010 share point deployment process

Information Technology SolutionsVisual Studio Integration

• Single unified interface for code build, package and deployment process

• Auto-discovery of mapped assets• Visual package explorer• Edit-in-place configuration files

(manifest.xml)• Extensible framework which can be

modified to suit various requirements

Page 12: Customizing the visual studio 2010 share point deployment process

Information Technology SolutionsVS2010 Deployment Process

Deploy

Deployment Tasks Deployment Actions Conflict Resolution

PackageManifest Directives Cabinet (WSP)

BuildPre-Build Actions Post-Build Actions

CreateFeatures Artifacts

Page 13: Customizing the visual studio 2010 share point deployment process

Information Technology SolutionsCreate

• SP Project Items (SPI’s) provide pre-configured artifacts for common SharePoint projects

• Automatic generation of Features, Manifests, .webpart and supporting files

• Additional SPI’s via CKS:DEV

Page 14: Customizing the visual studio 2010 share point deployment process

Information Technology SolutionsBuild

• Projects expose SharePoint-specific properties

• Selectable deployment to BIN or GAC

• Scripts and STSADM may continue to be used with pre- and post-build commands

Page 15: Customizing the visual studio 2010 share point deployment process

Information Technology SolutionsPackage

• Packaging occurs after the build process and before the deployment process

• Dependent upon auto-generated configuration files

• All projects in solution will be packaged but only those marked as “start up” will be deployed

Build

Package

Deploy

Page 16: Customizing the visual studio 2010 share point deployment process

Information Technology SolutionsPackage Elements

• Manifest– Auto-generated– Merge and overwrite

options• Directives

– No DDF file required• Cabinet

– WSP constructed from project assets

– Use Packaging Explorer to determine contents of package

Page 17: Customizing the visual studio 2010 share point deployment process

Information Technology SolutionsDeploy

• New set of extendable deployment interfaces

• Deployment Configurations

• Deployment Steps• Conflict Resolution• SharePoint Commands

Page 18: Customizing the visual studio 2010 share point deployment process

Information Technology SolutionsDeployment Configurations

• Deployment configurations are comprised of a set of deployment steps and related actions

• Pre and post-deployment commands may be attached to any deployment configuration

• Two deployment configurations ship OOTB:– Default– No activation

• Custom configurations can be created using any combination of steps

• Only one active configuration per project

Page 19: Customizing the visual studio 2010 share point deployment process

Information Technology SolutionsDeployment Steps

• Drag-and-drop association with Deployment Configuration

• Specifies order of execution for both deployment and retraction

• Each step comprised of one or more tasks

Page 20: Customizing the visual studio 2010 share point deployment process

Information Technology SolutionsConflict Resolution

• Built-in conflict resolution for default SPI’s– Automatic– Prompt– None

• Customizable detection and resolution via SharePoint Project Item Extensions

• Removes artifacts previously installed and activated– Delete list, remove web part from page and

gallery, disassociate workflow, etc.

Page 21: Customizing the visual studio 2010 share point deployment process

Information Technology Solutions

Deploying SharePoint Assets

DEMO

Page 22: Customizing the visual studio 2010 share point deployment process

Information Technology SolutionsDeployment Elements

Deployment Configuration

Default

No Activation

Custom

Deployment Steps

Pre-Deployment

Retract Solution

Recycle App Pool

Add Solution

Post-Deployment

SharePoint CommandsObject Model STSADM PowerShell

Page 23: Customizing the visual studio 2010 share point deployment process

Information Technology Solutions

Creating a Custom SharePoint Command

DEMO

Page 24: Customizing the visual studio 2010 share point deployment process

Information Technology SolutionsSharePoint Commands

• Execute SharePoint-specific commands in a 64-bit process

• Provide full access to SharePoint Object Model from deployment context

x86

x64

Page 25: Customizing the visual studio 2010 share point deployment process

Information Technology Solutions

Creating a Custom Deployment Step

DEMO

Page 26: Customizing the visual studio 2010 share point deployment process

Information Technology SolutionsDeployment Steps

• Custom code inheriting from IDeploymentStep interface

• Container for invoking custom SharePoint Commands SharePoint Commands

Object Model STSADM PowerShel

l

CanExecute?

Deployment Step

Page 27: Customizing the visual studio 2010 share point deployment process

Information Technology Solutions

Creating a Custom Deployment Configuration

DEMO

Page 28: Customizing the visual studio 2010 share point deployment process

Information Technology SolutionsDeployment Configuration

Deployment Configuration

Deployment Steps

SharePoint Commands

Default No Activation Custom