4

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

enter image description here

Since recently I do a lot of webPart development I want to automate the none-code part of the process, I want to develop a small console app that creates SharePoint solution as the pic, i'll use it as a template for the upcoming webParts

assume the webpart name is a var
string webPartName = "usefulLinks";

  • Create Empty SharePoint Project
  • Add Visual WebPart webPartName
  • Create Classes Folder WebPartName
  • Create an empty class inside the folder
  • add the Layouts mapped folder
  • add css and img folders to the layouts folder
  • Change part of the .webpart content to custom values
  • Same to the Elements.xml file
  • add the Resources mapped folder and add two resources files for Arabic and English
  • and finally change the feature name to be like webPartName + Feature

any good starting points? or online resources

thank you.

Community
  • 1
  • 1
Rami Alshareef
  • 7,015
  • 12
  • 47
  • 75

1 Answers1

7

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

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

This section in MSDN covers how to create project templates for Visual Studio. In particular, it sounds like the best option for you is the "Export Template Wizard", which will create a template based on an existing project you have created.

Rex M
  • 142,167
  • 33
  • 283
  • 313
  • the `Export Template Wizard extension` works just fine, but regarding `How to: Substitute Parameters in a Template` still vague for me, Couldn't locate any files related to `.vstemplate` the only file that schema-like this is `SharePointProjectItem.spdata`inside the `layout` folder and don't think its related to this matter, anyway I changed its content as article says but nothing helped, I'll be appreciated if you give me hand on this, Thanks. – Rami Alshareef Jan 24 '12 at 09:19
  • @Rami.Shareef you need to be more specific than "I followed the tutorial and it doesn't work." – Rex M Jan 24 '12 at 17:43
  • ok, to be more specific --> Q: how to use custom parameters in the `Export Template Wizard extension`? any references would be great – Rami Alshareef Jan 29 '12 at 07:30