SPMeta2
Powerful .NET library for provisioning SharePoint artifacts. 
Supports SharePoint Online, SharePoint 2019, 2016, 2013 via CSOM/SSOM object models. Limitedly, even SharePoint 2010!
Helping SharePoint developers all over the world
Developers teams use SPMeta2 to improve their delivery cycles.
30+
Countries
250+
Companies
5000+
Satisfied people
47000+
NuGet downloads
Get started in minutes!
SPMeta2 ships NuGet packages to support major SharePoint and .NET versions.
- Grab the latest NuGet package- There are several NuGet packages to support major .NET and SharePoint versions. 
 Simply install CSOM or SSOM package
 
- Define WHAT to provision- 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 WHAT to provision - field, content types, etc.
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 HOW to provision - the model binds things together
// - 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);
// Define API to provision - deploy model to SharePoint using CSOM provision service
var csomProvisionService = new StandardCSOMProvisionService();
csomProvisionService.DeploySiteModel(clientContext, siteModel);
Helping people on the field
There is nothing better than stories from the end-users.

Jasper Siegmund
SharePoint Architect, Atos
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?

Anton Khritonenkov
Co-Founder, Plumsail
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.

Marat Bakirov
Senior SharePoint Consultant, Ignia
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.
Resources and documentation
You aren't left alone with issues, various support options are available























