230 likes | 385 Views
Upgrading 2007 Solutions for SharePoint 2010 . Agenda. Upgrading Projects to Visual Studio 2010 Upgrading Projects to SharePoint 2010 Integrating with SharePoint 2010. General Upgrade Process. Two approaches to upgrading VSeWSS through Import Template Maintains project layout
E N D
Agenda • Upgrading Projects to Visual Studio 2010 • Upgrading Projects to SharePoint 2010 • Integrating with SharePoint 2010
General Upgrade Process • Two approaches to upgrading • VSeWSS through Import Template • Maintains project layout • Other project types through WSP Import • Imports only WSP content • Import code / settings manually • Visual Studio 2010 Packaging • One package per SharePoint project • Easy refactoring • Flexible project layout
VSeWSS Import Project Template • Import VSeWSS 1.1 and up • Shipped separately from VS2010 • VB.NET and C# • Supports Full Trust and Sandboxed projects
Start and Finish • WSP View in VSeWSS • Packaging Explorer in VS2010 Feature layout matches source
SharePoint Project Items (SPIs) • Visual Studio 2010 provides flexibility to packaging • Group SPIs conceptually in features • A SharePoint SPI: • Is stored in its own folder • Defines one artifact in the <Elements> file • The folder has the type identifier as metadata • Commonly contains the associated code in the same folder
Visual Studio 2010 Designers • Feature Designer • Combine SharePoint artifacts into a feature • Zero or more features per project • Packaging Explorer • Add / remove features from entire solution • Package custom assemblies • One package per SharePoint project
Deprecated and New Features • Important features that are deprecated • STP files for sites • Toolbar User Interface • Important features that are added • Fluent User Interface • XSLT-based List Rendering • Large List Throttling
Upgrading STP Files STP WSP
From Toolbar to Ribbon • Switch from Toolbar to Ribbon UI • Toolbar actions are moved to Custom Commands tab • Similar to Office client • Possible to show toolbar in list forms • Code-based actions do not migrate
Deprecated APIs • SharePoint 2010 introduces new APIs and deprecates others • Deprecated does not always unsupported • Results in compiler warnings (breaks build with Treat Warnings as Error) • Many APIs deprecated since WSS 3.0 are still available • PowerShellcommandlets instead of STSADM commands
Working with Compiled Code • IIS • Binding redirects provided from WSS 3.0 to SharePoint 2010 • Timer Service • No binding redirects, recompile required • Custom Apps • Provide own binding redirects or recompile • Compiling your project: • Build for the x64 platform • Target .NET Framework 3.5 SP1
Other Considerations • Assembly references • x86 / x64 COM references • TypeForwardedTo attribute moves classes to other assemblies • HTTP Handler / HTTP Module registrations in IIS7 integrated pipeline
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
Backwards Compatible UI • Per site configuration of UI mode SP2007 SP2010 2010 Development 2010 UI 3.0 UI 3.0 UI Mode Toolbars 3.0 CSS 3.0 Themes No Interactive calendars No In-Place Wiki edits No Ribbon
Administrating User Experiences • Site Collection Administration • Hide Site Administration • Upgrade all sites to 2010 mode • No turning back • Site Administration • Preview • Upgrade • No turning back
UI Versioning in the SharePoint OM • Use code to toggle UI version SPSite.UIVersionConfigurationEnabeled SPWeb.UIVersion SPWeb.UIVersionConfigurationEnabled • UI versions 3 and 4 are allowed • For preview mode, UI Version is 4 and configuration is enabled
ASP.NET Versioned Controls • VersionedPlaceHolder • Hidden during Render • UIVersionedContent • Hidden during control creation <SharePoint:VersionedPlaceHolderrunat=”server” UIVersion=”4”> <asp:Labelrunat=”server” Text=”Content” /> </SharePoint:VersionedPlaceHolder> <SharePoint:UIVersionedContentrunat=”server” UIVersion=”4”> <ContentTemplate> <asp:Labelrunat=”server” Text=”Content” /> </ContentTemplate> </SharePoint:UIVersionedContent>
Markup Overhaul • Stylesheet Changes • CSS structure totally rebuilt • WSS 3.0 CSS used for v3 UI Mode • Script Changes • JavaScript minification • Markup Compliancy • XHTML • WCAG 2.0 AA
Developer Dashboard • Displays developer information about page rendering • Programmable through SPMonitoredScope using(SPMonitoredScope scope = new SPMonitoredScope(“Message”)){ // code goes here}
Summary • Upgrading Projects to Visual Studio 2010 • Upgrading Projects to SharePoint 2010 • Integrating with SharePoint 2010