SPMeta2: a rock-solid API to provision them all

Enterprise-ready framework for provisioning SharePoint artifacts for SharePoint Online, SharePoint 2016, 2013 and 2010

Six things people love SPMeta2 for

Broad and unified provision API

SPMeta2 provisions more than 120 SharePoint artifacts in highly testable, repeatable and upgradable manner.


The library is SharePoint-agnostic. It works with SharePoint Online, SharePoint 2016, 2013 and 2010 via both CSOM or SSOM.

Fluent API, DSL and extensibility

POCO objects defines SharePoint artifacts and a then consistent fluent API and DSL is used to express your data model.


Extensible API helps to address specific project needs. Writing custom DSL as easy as writing C# extension methods.

Built BY and FOR developers

Compiled for .NET 3.5/4/4.5 and delivered via NuGet packages, SPMeta2 suits most of the custom development scenarios.


Btw, it's open source. Developed publically at gihub. And it also handles all the darkers bugs of SharePoint's API.

Rock-solid, loves Visual Studio

More than 800 regression tests run against real SharePoint farms and tenants result an outstanding quality of the SPMeta2 library.


Visual Studio extension brings snippets, project and item templates to bootstrap SPMeta2 based project and productivity.

Production ready!

SPMeta2 is recognized, trusted and used in production by 150+ companies in 25+ countries all over the world. See it in Yammer Network.


Visual Studio extension brings snippets, project and item templates to bootstrap SPMeta2 based project and productivity.

Has official support and SLA

You aren't left alone with the source-code. We provide documentation and community support via our community Yammer network.


Mission-critial projects require more attention. We also provide professonal support and SLA to meet your goals.

150+
companies
25+
countries
2000+
satisfied people

Don't wait, get started in minutes!


Define WHAT to provision

First of all, you need to define what you want to provision. Fields, lists, webs and so on - all is provided by SPMeta2's definitions.

Every SharePoint artifact has a corecponding SPMeta2 class - a pure C#.

You see FieldDefinition, ContentTypeDefinition. There are WebDefinition, ListDefinition and other classes.











Define HOW to provision

Next, define the model - a set of the artifacts to be provisioned to SharePoint. Think of the model as it were a SharePoint site collection or web. You just create the hierarhy of the definitions defining how the artifacts get along with each other.





Define API to provision

Finally, choose the right provision service for your case. SPMeta2 offers CSOM and SSOM based provision services to deploy the model to SharePoint.


var siteUrl = "http://intranet-dev";

// define fields
var clientDescriptionField = new FieldDefinition
{
    Title = "Client Description",
    InternalName = "dcs_ClientDescription",
    Group = "SPMeta2.Samples",
    Id = new Guid("06975b67-01f5-47d7-9e2e-2702dfb8c217"),
    FieldType = BuiltInFieldTypes.Note,
};

var clientNumberField = new FieldDefinition
{
    Title = "Client Number",
    InternalName = "dcs_ClientNumber",
    Group = "SPMeta2.Samples",
    Id = new Guid("22264486-7561-45ec-a6bc-591ba243693b"),
    FieldType = BuiltInFieldTypes.Number,
};

// define content type
var customerAccountContentType = new ContentTypeDefinition
{
    Name = "Customer Account",
    Id = new Guid("ddc46a66-19a0-460b-a723-c84d7f60a342"),
    ParentContentTypeId = BuiltInContentTypeId.Item,
    Group = "SPMeta2.Samples",
};

// define the model
// - deploy fields under the site scope
// - deploy content type under the site scope
// - deploy field links to the content type        
                                                
var siteModel = SPMeta2Model.NewSiteModel(site =>
{
    site
        .AddField(clientDescriptionField)
        .AddField(clientNumberField)
        .AddContentType(customerAccountContentType, contentType =>
        {
            contentType
                .AddContentTypeFieldLink(clientDescriptionField)
                .AddContentTypeFieldLink(clientNumberField);
        });
});
                            
// create SharePoint client context
var clientContext = new ClientContext(siteUrl);

// deploy the model to the SharePoint site over CSOM provision service
var csomProvisionService = new CSOMProvisionService();
csomProvisionService.DeploySiteModel(clientContext, siteModel);


SPMeta2 is open source and developed publicly since 2013

A few more opinions on our work

SPMeta brings an end to the traditional mix of XML and code to deploy and upgrade SharePoint solutions. Coded models are straightforward, clean, testable and reusable, what's not to like?

Jasper SiegmundSharePoint Architect
Atos, Netherlands

We use SPMeta2 in our projects to provision SharePoint artifacts. The functionality of the framework is impressing, and we are going to use it in future. The company provides quick and responsive support. They have growing community and continually tracking feedback. It is important for such kind of product.

Anton Khritonenkov Co-Founder
Plumsail, Russia

I started using SPMeta2 at its very first stage and always saw a high potential for provision SharePoint artifacts via code. SPMeta2 provides a repetitive and consistent way to set up a data schema for any SharePoint environment.

Marat Bakirov Senior SharePoint Consultant
Ignia, Australia
updated: Sat, 01 Apr 2017 11:04:51 GMT