Solutions to 2010
• Blog: weblogs.asp.net/soever
• Email: serge@macaw.nl
• Twitter @svdoever
About Mirjam van Olst
• Microsoft Certified Master SharePoint 2007
• MVP SharePoint Server
• SharePoint Architect at Macaw
• Co-organizing DIWUG and SDN
• Blog: www.sharepointchick.com
• Email: mirjam@macaw.nl
• Twitter @mirjamvanolst
Session Objectives
About migration of solutions from
SharePoint 2007 to SharePoint 2010
12/80/GAC approach
• SharePoint Root (“12 hive”)
• Web Application folder (80)
• Global Assembly Cache (Assemblies)
Abstraction approach
• Visual Studio project structure
• Mapping/interpretation/transformation
WSP
Builder
(12/80/GAC)
VSeWSS (abstraction)
VSeWSS WSPBuilder
Visual Studio Extensibility (2)
Macaw Solutions Factory
Quick Recap: VS2010 SharePoint Dev
Presentations:
• MSC02: Overview of the SP2010 Developer Platform (Steve Fox)
• MSC13: VS2010 SharePoint Development Tools Overview (Steve Fox)
• MSC36: VS2010 SharePoint Tools Extensibility (Wouter van Vugt)
• MPS02: Developer Deepdive into SharePoint 2010 (Wouter van Vugt)
What can we do in VS2010
PEPTalk! #7
Build and package
Build
Package
PEPTalk! #7
Mapped Folders (2)
PEPTalk! #7
User Controls
PEPTalk! #7
Application pages 101
Application pages (_layouts pages):
• Custom code allowed
• No web parts and web part zones allowed
• Usable in context of any site
• Live in “14 hive” (…\14\TEMPLATE\LAYOUTS)
These are the application pages that have safeguards against a broken master page. If these pages
encounter an error when loading the dynamic master page, a safe master page in the _layouts folder
is loaded instead.
Replaceable Parameters
• Fixed set of available tokens:
● $SharePoint.Project.FileName$, $SharePoint.Project.FileNameWithoutExtension$
● $SharePoint.Project.AssemblyFullName$
● $SharePoint.Project.AssemblyFileName$, $SharePoint.Project.AssemblyFileNameWithoutExtension$
● $SharePoint.Project.AssemblyPublicKeyToken$
● $SharePoint.Package.Name$
● $SharePoint.Package.FileName$, $SharePoint.Package.FileNameWithoutExtension$
● $SharePoint.Package.Id$
● $SharePoint.Feature.FileName$, $SharePoint.Feature.FileNameWithoutExtension$
● $SharePoint.Feature.DeploymentPath$
● $SharePoint.Feature.Id$
● $SharePoint.ProjectItem.Name$
● $SharePoint.Type.<GUID>.AssemblyQualifiedName$
● $SharePoint.Type.<GUID>.FullName$
Not as powerful as Macaw Solutions Factory [[Any PowerShell Function]] template expansion
Application page in SP context sample
Note the
page URL in
_layouts
Visual Web Part - creation
Visual Web Part – the user control
PEPTalk! #7
Visual Web Part – user control location
PEPTalk! #7
Visual Web Part – Elements.xml
PEPTalk! #7
The Visual Web Part on the page
Event Receivers (1)
Event Receivers (2)
Content Types (1)
Content Types (2)… “artifact overload”
PEPTalk! #7
The Package Explorer
• Visual representation of the resulting WSP package
• Not all elements visible (assemblies, safe controls, …)
• With duplicate names, check properties for deployment
location
Add external or project assemblies
to package
Assemblies
deployed to
GAC must
be signed
Mark types
within
assemblies
as safe
controls
Resource
assemblies
can be
added
Manually from WSPBuilder/STSDEV
to VS2010 (simplistic view)
• Complete SharePoint Root structure can
be added “as is” (or use mapped folders)
• Part of the Manifest.xml generated by
WSPBuilder/STSDEV can be added to
Package.Template.xml (exclude root files)
• Remove assemblies from root files
• Add code to project(s)
• Add assemblies to package
Import “complex” WSP package:
Macaw Solutions Factory template
Import as Farm Solution (SP2007)
Import WSP package
Select the items to import
~!@#$%^&
Result project
Resulting Manifest.xml
Original manifest.xml
“Complex” WSP import [OK]
• All feature elements are converted:
● List definition
● Modules (masterpage, ...)
● Fields
● Content types
Feature uses
custom DSL
Package uses
custom DSL
http://blog.mastykarz.nl
Community Kit for SharePoint
Dev Edition
http://cksdev.codeplex.com
• Community Extensions
– X-Copy Deployment
– Solution Upgrades
– Auto Deployment
– Sandboxed Visual Web Part
– Linq to SharePoint Classes
– SharePoint References Tab
– And much more…
• Site Settings
> Site Collection Administration
> Supported User Experiences
Site Options
• Site Settings
> Title, Description
& Appearance
(in 2007 UI Mode)
Object Model Options
• Web Level
● SPWeb.UIVersion (int values of 3 or 4)
• Site Collection
● SPSite.UIVersionConfigurationEnabled
● SPSite.UIVersionConfigurationEnabledInAllWebs
CSS Changes
PEPTalk! #7
Investigate the solution package
Thank you!