Your SlideShare is downloading. ×
0
Deploying Code In SharePoint
Deploying Code In SharePoint
Deploying Code In SharePoint
Deploying Code In SharePoint
Deploying Code In SharePoint
Deploying Code In SharePoint
Deploying Code In SharePoint
Deploying Code In SharePoint
Deploying Code In SharePoint
Deploying Code In SharePoint
Deploying Code In SharePoint
Deploying Code In SharePoint
Deploying Code In SharePoint
Deploying Code In SharePoint
Deploying Code In SharePoint
Deploying Code In SharePoint
Deploying Code In SharePoint
Deploying Code In SharePoint
Deploying Code In SharePoint
Deploying Code In SharePoint
Deploying Code In SharePoint
Deploying Code In SharePoint
Deploying Code In SharePoint
Deploying Code In SharePoint
Deploying Code In SharePoint
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Deploying Code In SharePoint

4,998

Published on

How to deploy code in SharePoint. Given at SharePoint Saturday Kansas City - February 2009

How to deploy code in SharePoint. Given at SharePoint Saturday Kansas City - February 2009

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
4,998
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
61
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • Demo manual deployment. Copy a binary out with a web part and manually copy DLL to the GAC.Demo how to export an existing .webpart definition to build from.
  • Explain the manifest.xml and cab.ddf
  • VSeWSS
  • Demo the use of BDC Tools, the MetaData Model and the Import Process
  • Transcript

    • 1. Deploying Code in SharePoint<br />Presenter: Corey Roth<br />Senior Consultant<br />Stonebridge<br />Blog: www.dotnetmafia.com<br />
    • 2. Corey Roth<br />Consultant for Stonebridge<br />Worked in Consumer Electronics, Travel, Advertising, and Energy industries<br />Currently doing MOSS development specializing in Enterprise Search, Workflow, and ECM<br />Microsoft Award for Customer Excellence (ACE) Winner<br />E-mail: corey.roth@gmail.com<br />Blog: www.dotnetmafia.com (mirrored on sharepointblogs.com)<br />
    • 3. Challenges for New Developers<br />Learning the API<br />Setting up the development environment<br />Debugging<br />
    • 4. Deployment<br />
    • 5. 12 Hive<br />Location of most key SharePoint files: C:Program FilesCommon Filesmicrosoft sharedWeb Server Extensions12<br />
    • 6. 12 Hive (Continued)<br />
    • 7. Deploying Binaries – Two Options<br />GAC Deployment – Not recommended unless absolutely necessary (i.e.: Event Recivers, Timer jobs, Workflows, etc).<br />Requires application pool to be reset after every deployment.<br />Allows code to execute with full trust<br />Acceptable for new developers starting out because it is easier<br />
    • 8. Deploying Binaries – Two Options<br />Bin Folder Deployment – Recommended but more complex<br />Requires a developer to specify code access security settings or running SharePoint with full trust<br />Does not require application pool to be reset<br />Recommended approach but more complicated to implement<br />
    • 9. SafeControls<br />SharePoint won’t execute a web part or user control unless it knows it is safe<br />Declare an assembly and namespace safe in web.config<br />SafeControls element<br />Can be automated using a solution package (.wsp)<br />
    • 10. Deployment Options<br />Manually copy binaries, feature files, pages, and controls to appropriate folders on SharePoint server<br />Create a Feature – Would still have to manually copy files<br />Create a Solution Package (.wsp) – A cab file that contains a manifest telling SharePoint how to deploy files and what features to install<br />
    • 11. Ghetto Deployment (Manual)<br />Manually copy binaries to GAC or bin folder<br />Manually upload .webpart files to web part gallery<br />Manually copy user controls to CONTROLTEMPLATES folder<br />Manually copy features files into FEATURES folder<br />Manually copy anything else that you might need to deploy<br />
    • 12. Building and Deploying a Web Part<br />Deploys similarly to a user control<br />.webpart (or .dwp) file tells SharePoint where to find the web part’s code<br />Use a feature to add the web part to the gallery<br />Complete instructions at my blog<br />http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2008/10/22/intro-to-sharepoint-development-how-to-build-and-deploy-a-web-part.aspx<br />
    • 13. Demo<br />
    • 14. Features<br />A series of XML files that allow you to make changes to SharePoint<br />Located in the TEMPLATEFEATURES folder in the 12 hive<br />Changes can include creating lists, pages, content types, site columns, and web parts.<br />Can copy files into SharePoint’s virtual file repository but the template files still have to be deployed to the 12 hive first<br />
    • 15. Solution Packages (.wsp files)<br />A cab file that can copy binaries, features, pages, and other files to SharePoint.<br />Defined by manifest.xml and cab.ddf files<br />Created with makecab.exe<br />Can copy binaries to bin folder or GAC<br />Can apply safe control and code access security settings<br />Automatically installs features<br />Can also be upgraded and retracted / deleted.<br />Can be automated with VSeWSS, WSPBuilder, stsdev, etc.<br />
    • 16. cab.ddf<br />Specifies which files to copy into the wsp file.<br />You must specify each binary, page, XML or .webpart file you want to be copied in this file<br />Syntax for each file is source &lt;space&gt; destination<br />The destination specified is the location in the file not the location on the SharePoint server.<br />
    • 17. Manfiest.xml<br />Specifies which features to activate and which files to copy into the 12 hive.<br />Can deploy SiteTemplates<br />Specifies SafeControl settings in web.config<br />Configures Code Access Security (CAS) settings<br />Paths are relative to the TEMPLATES folder in the 12 hive<br />http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2008/09/04/more-on-manfiest-xml.aspx<br />
    • 18. Manfiest.xml Elements<br />FeatureManifests – Specifies feautres to activate<br />TemplateFiles – Required for any file that you want copied that is not a binary or feature file<br />Assemblies – Required for each binary to be deployed <br />DeploymentTarget – WebAppplication or GlobalAssemblyCache<br />SafeControls – Adds SafeControl entry to web.config<br />CodeAccessSecurity – Applies CAS policies to assembly<br />
    • 19. Deploying your solution (.wsp) file<br />Add the solution with stsadm<br />stsadm –o addsolution –filename mysolution.wsp<br />Deploy the solution with stsadm or Central Admin -&gt; Solution Management<br />stsadm –o deplysolution –name mysolution.wsp –immediate –allowGacDeployment –allowCasPolicies<br />stsadm –o execadmsvcjobs<br />-o upgradesolution – Upgrades an existing solution’s files<br />-o retractsolution – Remove the solution from a given site(s)<br />-o deletesolution – Removes the solution from the solution store<br />
    • 20. Building a User Control with Visual Studio<br />Web Application Project<br />Reference Microsoft.SharePoint.dll<br />Must be registered as safe for SharePoint to execute<br />Typically deployed to bin folder using Code Access Security<br />Controls are typically deployed to the CONTROLTEMPLATES folder in the 12 hive.<br />_ControlTemplates Virtual Directory<br />Complete instructions are on my blog<br />http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2008/11/18/introduction-to-sharepoint-development-deploy-a-user-control-in-sharepoint.aspx<br />
    • 21. Demo<br />
    • 22. Demo<br />
    • 23. References<br />Dot Net Mafia Blog<br />http://www.dotnetmafia.com<br />Visual Studio Extensions for SharePoint (VSeWSS 1.3) CTP<br />https://connect.microsoft.com/site/sitehome.aspx?SiteID=428<br />STSDev<br />http://www.codeplex.com/stsdev<br />SharePoint Blogs<br />http://www.sharepointblogs.com<br />WSPBuilder<br />http://www.codeplex.com/wspbuilder<br />
    • 24. Questions?<br />
    • 25. Thanks<br />Corey Roth<br />coreyroth@gmail.com<br />www.dotnetmafia.com<br />

    ×