Creating a "SharePoint Solution" programmatically

I found something related here , but did not give me a good start

enter image description here

Recently, I have been developing web pages, I want to automate a part of the code that is not part of the code, I want to develop a small console application that creates a SharePoint solution as pic. I will use it as a template for upcoming web pages.

Suppose the name of the web part is var string webPartName = "usefulLinks";

  • Create an empty SharePoint project
  • Add Visual WebPart webPartName
  • Create class folder webPartName
  • Create an empty class inside the folder
  • add Layouts display folder
  • add css and img folders to the Layouts folder
  • Change part of .webpart content to custom values
  • Same thing with Elements.xml
  • add the mapped Resources folder and add two resource files for Arabic and English
  • and finally change the name of feature as webPartName + Feature

good starting points? or online resources

thanks.

+4
source share
1 answer

What you are really describing is a special SharePoint Project solution, not a Visual Studio solution.

Project templates provide the files that are needed for a particular type of project, include standard assembly references and set the project properties to default and compiler options.

This section of MSDN describes how to create project templates for Visual Studio. In particular, this is the best option for you: Template Wizard " , which will create a template based on an existing project that you created.

+7
source

Source: https://habr.com/ru/post/1391628/


All Articles