23
Upgrading 2007 Solutions for SharePoint 2010

Upgrading Projects to Visual Studio 2010 Upgrading Projects to SharePoint 2010 Integrating with SharePoint 2010

Embed Size (px)

Citation preview

Page 1: Upgrading Projects to Visual Studio 2010 Upgrading Projects to SharePoint 2010 Integrating with SharePoint 2010

Upgrading 2007 Solutions for SharePoint 2010

Page 2: Upgrading Projects to Visual Studio 2010 Upgrading Projects to SharePoint 2010 Integrating with SharePoint 2010

Agenda

Upgrading Projects to Visual Studio 2010Upgrading Projects to SharePoint 2010Integrating with SharePoint 2010

Page 3: Upgrading Projects to Visual Studio 2010 Upgrading Projects to SharePoint 2010 Integrating with SharePoint 2010

General Upgrade Process

Two approaches to upgradingVSeWSS through Import Template

Maintains project layout

Other project types through WSP ImportImports only WSP contentImport code / settings manually

Visual Studio 2010 PackagingOne package per SharePoint projectEasy refactoringFlexible project layout

Page 4: Upgrading Projects to Visual Studio 2010 Upgrading Projects to SharePoint 2010 Integrating with SharePoint 2010

VSeWSS Import Project Template

Import VSeWSS 1.1 and upShipped separately from VS2010VB.NET and C#Supports Full Trust and Sandboxed projects

Page 5: Upgrading Projects to Visual Studio 2010 Upgrading Projects to SharePoint 2010 Integrating with SharePoint 2010

Start and Finish

WSP View in VSeWSS

Packaging Explorer in VS2010

Feature layout matches source

Page 6: Upgrading Projects to Visual Studio 2010 Upgrading Projects to SharePoint 2010 Integrating with SharePoint 2010

SharePoint Project Items (SPIs)

Visual Studio 2010 provides flexibility to packaging

Group SPIs conceptually in featuresA SharePoint SPI:

Is stored in its own folderDefines one artifact in the <Elements> file

The folder has the type identifier as metadata

Commonly contains the associated code in the same folder

Page 7: Upgrading Projects to Visual Studio 2010 Upgrading Projects to SharePoint 2010 Integrating with SharePoint 2010

Visual Studio 2010 Designers

Feature DesignerCombine SharePoint artifacts into a feature Zero or more features per project

Packaging Explorer

Add / remove features from entire solutionPackage custom assembliesOne package per SharePoint project

Page 8: Upgrading Projects to Visual Studio 2010 Upgrading Projects to SharePoint 2010 Integrating with SharePoint 2010

Upgrading Projects to SharePoint 2010

Page 9: Upgrading Projects to Visual Studio 2010 Upgrading Projects to SharePoint 2010 Integrating with SharePoint 2010

Deprecated and New Features

Important features that are deprecated

STP files for sitesToolbar User Interface

Important features that are addedFluent User InterfaceXSLT-based List RenderingLarge List Throttling

Page 10: Upgrading Projects to Visual Studio 2010 Upgrading Projects to SharePoint 2010 Integrating with SharePoint 2010

Upgrading STP Files

STP

WSP

Create Site

Upgrade to 2010

Resolve issues

Save as template

Page 11: Upgrading Projects to Visual Studio 2010 Upgrading Projects to SharePoint 2010 Integrating with SharePoint 2010

From Toolbar to Ribbon

Switch from Toolbar to Ribbon UI Toolbar actions are moved to Custom Commands tab

Similar to Office clientPossible to show toolbar in list formsCode-based actions do not migrate

Page 12: Upgrading Projects to Visual Studio 2010 Upgrading Projects to SharePoint 2010 Integrating with SharePoint 2010

Deprecated APIs

SharePoint 2010 introduces new APIs and deprecates others

Deprecated does not always unsupportedResults in compiler warnings (breaks build with Treat Warnings as Error)Many APIs deprecated since WSS 3.0 are still available

PowerShell commandlets instead of STSADM commands

Page 13: Upgrading Projects to Visual Studio 2010 Upgrading Projects to SharePoint 2010 Integrating with SharePoint 2010

Working with Compiled Code

IISBinding redirects provided from WSS 3.0 to SharePoint 2010

Timer ServiceNo binding redirects, recompile required

Custom AppsProvide own binding redirects or recompile

Compiling your project:Build for the x64 platformTarget .NET Framework 3.5 SP1

Page 14: Upgrading Projects to Visual Studio 2010 Upgrading Projects to SharePoint 2010 Integrating with SharePoint 2010

Other Considerations

Assembly referencesx86 / x64 COM referencesTypeForwardedTo attribute moves classes to other assembliesHTTP Handler / HTTP Module registrations in IIS7 integrated pipeline

Page 15: Upgrading Projects to Visual Studio 2010 Upgrading Projects to SharePoint 2010 Integrating with SharePoint 2010

Update SharePoint 2007 Constants

New installation foldersc:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14c:\Program Files\Microsoft Office Servers\14.0c:\Program Files\Microsoft Office\Office14

New registry rootsHKLM\Software\Microsoft\Shared Tools\Web Server Extensions\14.0HKLM\Software\Microsoft\Office Server\14.0

Page 16: Upgrading Projects to Visual Studio 2010 Upgrading Projects to SharePoint 2010 Integrating with SharePoint 2010

Integrating with SharePoint 2010

Page 17: Upgrading Projects to Visual Studio 2010 Upgrading Projects to SharePoint 2010 Integrating with SharePoint 2010

Backwards Compatible UI

Per site configuration of UI mode

3.0 UI

2010 Development

2010 UI

3.0 UI Mode

Toolbars3.0 CSS3.0 Themes

No Interactive calendarsNo In-Place Wiki editsNo Ribbon

SP2007 SP2010

Page 18: Upgrading Projects to Visual Studio 2010 Upgrading Projects to SharePoint 2010 Integrating with SharePoint 2010

Administrating User Experiences

Site Collection Administration

Hide Site AdministrationUpgrade all sites to 2010 mode

No turning back

Site AdministrationPreviewUpgrade

No turning back

Page 19: Upgrading Projects to Visual Studio 2010 Upgrading Projects to SharePoint 2010 Integrating with SharePoint 2010

UI Versioning in the SharePoint OM

Use code to toggle UI versionSPSite.UIVersionConfigurationEnabeled

SPWeb.UIVersionSPWeb.UIVersionConfigurationEnabled

UI versions 3 and 4 are allowedFor preview mode, UI Version is 4 and configuration is enabled

Page 20: Upgrading Projects to Visual Studio 2010 Upgrading Projects to SharePoint 2010 Integrating with SharePoint 2010

ASP.NET Versioned Controls

VersionedPlaceHolderHidden during Render

UIVersionedContentHidden during control creation

<SharePoint:VersionedPlaceHolder runat=”server” UIVersion=”4”>     <asp:Label runat=”server” Text=”Content” /></SharePoint:VersionedPlaceHolder>

<SharePoint:UIVersionedContent runat=”server” UIVersion=”4”>     <ContentTemplate>           <asp:Label runat=”server” Text=”Content” />     </ContentTemplate></SharePoint:UIVersionedContent>

Page 21: Upgrading Projects to Visual Studio 2010 Upgrading Projects to SharePoint 2010 Integrating with SharePoint 2010

Markup Overhaul

Stylesheet ChangesCSS structure totally rebuilt WSS 3.0 CSS used for v3 UI Mode

Script ChangesJavaScript minification

Markup CompliancyXHTMLWCAG 2.0 AA

Page 22: Upgrading Projects to Visual Studio 2010 Upgrading Projects to SharePoint 2010 Integrating with SharePoint 2010

Developer Dashboard

Displays developer information about page renderingProgrammable through SPMonitoredScope

using(SPMonitoredScope scope = new SPMonitoredScope(“Message”)){ // code goes here}

Page 23: Upgrading Projects to Visual Studio 2010 Upgrading Projects to SharePoint 2010 Integrating with SharePoint 2010

Summary

Upgrading Projects to Visual Studio 2010Upgrading Projects to SharePoint 2010Integrating with SharePoint 2010