Microsoft SharePoint Developer Documentation Team Blog
The Official Blog of the SharePoint Developer Documentation Team

October, 2010

  • Microsoft SharePoint Developer Documentation Team Blog

    How to install Sandboxed Solution with Powershell (SharePoint Management Shell)

    • 0 Comments

    Farm solutions can be installed with SharePoint Management Shell (PowerShell), but did you know that sandboxed solutions can be too?

    The cmdlets have almost the same name as the corresponding cmdlets for farm solutions, the difference being that "User" is inserted after the "SP".

    To upload a sandboxed solution to a site collection's Solution Gallery with PowerShell, use the cmdlet Add-SPUserSolution. At a minimum, you need to identify the path to the solution package (wsp file) and the target site collection by using the LiteralPath and Site parameters. Example:

    Add-SPUserSolution -LiteralPath c:\CandidateSandboxedSolutions\MySandboxedSolution.wsp -Site http://MyServer/sites/Contoso

    Now, of course, you need to deploy the solution, except that when we are talking about sandboxed solutions, this step is called "activation" instead of "deployment".  But, between you and me, it is the same thing. (And activating a sandboxed solution is not conceptually the same thing as activating a SharePoint Feature.) To deploy the solution, use the Install-SPUserSoluton cmdlet. At a minimum, you need to identify the solution that you want to deploy and the site collection by using the Identity and Site parameters. Example:

    Install-SPUserSolution -Identity MySandboxedSolution.wsp -Site http://MyServer/sites/Contoso

    You can reverse the latter step with the Uninstall-SPUserSolution cmdlet with the same two mandatory parameters. You can reverse the first step with the Remove-SPUserSolution cmdlet. It also requires the Identity and Site parameters.

    There is also an Update-SPUserSolution cmdlet which is used, of course, to update a solution that has already been "activated" (that is, deployed). The syntax is the same as the Install-SPUserSolution except that you use the Identity parameter to identify the old solution and you use ToSolution parameter to identify the new replacement solution. You must first use the Add-SPUserSolution to upload the new version of the solution to the Solution Gallery. Example:

     Add-SPUserSolution -LiteralPath c:\CandidateSandboxedSolutions\MyImprovedSandboxedSolution.wsp -Site http://MyServer/sites/Contoso

    Update-SPUserSolution -Identity MySandboxedSolution.wsp -Site http://MyServer/sites/Contoso -ToSolution MyImprovedSandboxedSolution.wsp

    There are additional, optional, parameters for all of these cmdlets. For help on any of them, use the Get-Help cmdlet followed by the name of the cmdlet and the "full" parameter. Example:

    Get-Help Add-SPUserSolution -full

  • Microsoft SharePoint Developer Documentation Team Blog

    Where are Assemblies in Sandboxed Solutions Deployed?

    • 6 Comments

    Because sandboxed solutions cannot deploy files to a server's file system, there is some puzzlement over where the assemblies in sandboxed solutions are deployed and persisted.  The situation is not helped by the fact that the package manifest of a sandboxed solution implies that such assemblies are deployed to the GAC as the following screenshot shows. This is not the case.

    The assemblies in a sandboxed solution are included in the solution's package (wsp file) and the package is deployed to the site collection's Solutions Gallery. When a sandboxed solution is accessed for the first time, such as when a user navigates to a page containing a Web Part from a sandboxed solution, any assemblies in the solution are unpacked from the wsp and copied to the file system of the server that is handling the sandbox request. The location is C:\ProgramData\Microsoft\SharePoint\UCCache. The server that handles the sandbox request is not necessarily the front-end web server that is handling the initial HTTP request: the User Code Host Service can be run on back end application servers in the farm instead. Since the sandboxed user process (SPUCWorkerProcess.exe) cannot copy anything to the file system, the copying is done by the User Code Host Service.

    The assemblies do not stay in the file cache perpetually. When the user session that accessed the assemblies ends, the assemblies stay in the cache for only a short time and they may be reloaded from there if another user session assesses them. Eventually, if they are not accessed, they are removed in accordance with a proprietary algorithm that takes into account how busy the server is and how much time has gone by since the assemblies were last accessed. If the sandboxed solution is used after that time, the assemblies unpacked again and copied to the UCCache.

    Administrators, developers, and third-party code should not add, remove, or load anything from the UCCache. It should only be accessed by the SharePoint infrastructure.

    Rick - MSFT

  • Microsoft SharePoint Developer Documentation Team Blog

    New Visual "How to" about Creating Custom Field Types

    • 0 Comments

    Ted Pattison has produced a new video showing how to create a custom field type in SharePoint.

    For a link to the video and the written summary, see Creating Custom SharePoint 2010 Field Types.

  • Microsoft SharePoint Developer Documentation Team Blog

    SharePoint Online Developer Resource Center Now Live

    • 0 Comments

    As you’ve not doubt heard by now, today Microsoft announced Microsoft Office 365, our next generation in cloud productivity suite that brings together Microsoft Office, SharePoint Online, Exchange Online and Lync Online in an always-up-to-date cloud service. As part of today’s news, Microsoft is also opening a limited beta program for Office 365 in 13 countries and regions. (To learn more about Office 365 in general, or the beta program, visit www.office365.com.)

    To support the Office 365 beta program, and to give developers their first look at the extensibility story for this new version of SharePoint Online, we’ve launched the SharePoint Online Developer Resource Center on MSDN.

    Whether you are participating in the beta program, are planning on creating solutions for SharePoint Online down the road, or are just curious to see what all the talk is about, I encourage you to check out the resource center. We created the resource center to serve as a one-stop shop that pulls together all the resources a developer needs to get up to speed on developing for SharePoint Online, no matter what their skill set and previous experience with SharePoint. This includes articles, blogs, videos, walkthroughs, and in-depth training from across Microsoft web properties such as MSDN, Channel 9, and patterns & practices. We’ve selected the resources you need to ramp up on the developer features available in this new version of SharePoint Online, such as:

    ·       SharePoint Designer customization

    ·       Sandboxed solutions

    ·       SharePoint managed, Silverlight, and ECMAScript client object models

    ·       SharePoint .NET and REST Web services

    ·       Excel, InfoPath Forms, Visio, and Access Services

    We plan on keeping the resource center up-to-date as new materials come online (either from Microsoft sources, or the Web in general), so be sure to bookmark the page and check back often. And, as always, if there’s something you want to see in the resource center and don’t, let us know.

  • Microsoft SharePoint Developer Documentation Team Blog

    New Visual "How to" about Creating Multicolumn Field Types

    • 0 Comments

    Ted Pattison has produced a new visual showing how to create a multicolumn field type in SharePoint.

    For a link to the video and the written summary, see Creating Multicolumn SharePoint 2010 Field Types.

  • Microsoft SharePoint Developer Documentation Team Blog

    Getting Started with the SharePoint Developers Tools in Visual Studio 2010

    • 0 Comments

    You can use many resources to get started developing SharePoint solutions. In addition to the MSDN Library documentation for SharePoint SDK and the SharePoint Developer Tools in Visual Studio, you can access articles and videos that are published in the Technical Articles and Visual How Tos nodes. In addition to the documentation, technical articles, and visual how-tos, you can also read Book Excerpts and Quick Notes.

    For example, you can watch this visual how-to video that explains how to create, test, and debug SharePoint 2010 projects by using Visual Studio. The accompanying walkthrough is at http://msdn.microsoft.com/en-us/library/gg131919.aspx.

    image

    There are additional videos about SharePoint that appear on the Related Videos tab, as well as the Up Next tab.

    Related MSDN Library documentation include the following topics:

    Mary Lee, Programming Writer.

  • Microsoft SharePoint Developer Documentation Team Blog

    New Visual "How to" about Extending the SharePoint Tools in Visual Studio

    • 0 Comments

    Ted Pattison has produced a visual "How to" about how to extend the SharePoint tools in Visual Studio 2010.

    For a link to the video and the written summary go to Creating Custom Extensions for SharePoint 2010 Development Tools in Visual Studio 2010.

  • Microsoft SharePoint Developer Documentation Team Blog

    Check out SharePoint in Pictures

    • 0 Comments

    We’ve launched a new blog called SharePoint in Pictures. It is a blog that will feature diagrams of SharePoint as a development platform. Check out the new blog at http://blogs.msdn.com/b/sharepointpictures/ and give us your feedback!

  • Microsoft SharePoint Developer Documentation Team Blog

    Overview of SharePoint Online Development Now Live

    • 0 Comments

    So, last week we published the SharePoint Online Developer Resource Center, to serve as a one-stop shop that pulls together all the resources a developer needs to get up to speed on developing for SharePoint Online. But what if, instead of the numerous in-depth resources we’ve included on the center, you want to get an overview of developer options for SharePoint Online in a single technical article?

    Then have we got something for you:

    SharePoint Online: An Overview for Developers

    (And seriously, would I have asked the question if we didn’t have something ready for you?)

    We’ll be rolling out detailed guidance for developing SharePoint Online solutions in the weeks and months ahead, but this article should enable you to familiarize yourself with the broad strokes of developing for SharePoint in the cloud. Use the article to learn about the developer features that are coming to SharePoint Online, strategies and patterns for successfully developing on SharePoint Online, and find links to additional resources for developers to deepen their knowledge of these extensibility features

    I’d be very interested in what you think of the article, and what questions you have about developing for SharePoint Online after reading it and visiting the Resource Center. So please leave a rating and comment on the article, or leave a comment here about what kind of coverage you’d like to see around SharePoint Online development.

Page 1 of 1 (9 items)