简体   繁体   English

以编程方式创建“SharePoint解决方案”

[英]Create 'SharePoint Solution' programmatically

I found something related here but did not give me a good start 我在这里找到了相关的东西但没有给我一个良好的开端

在此输入图像描述

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 从最近我做了很多webPart开发我希望自动化该过程的非代码部分,我想开发一个小型控制台应用程序,创建SharePoint解决方案作为图片,我将它用作即将到来的webParts的模板

assume the webpart name is a var 假设webpart名称是var
string webPartName = "usefulLinks";

  • Create Empty SharePoint Project 创建空SharePoint项目
  • Add Visual WebPart webPartName 添加Visual WebPart webPartName
  • Create Classes Folder WebPartName 创建类文件夹WebPartName
  • Create an empty class inside the folder 在文件夹中创建一个空类
  • add the Layouts mapped folder 添加Layouts映射文件夹
  • add css and img folders to the layouts folder cssimg文件夹添加到layouts文件夹
  • Change part of the .webpart content to custom values .webpart内容的一部分更改为自定义值
  • Same to the Elements.xml file Elements.xml文件相同
  • add the Resources mapped folder and add two resources files for Arabic and English 添加Resources映射文件夹,并为ArabicEnglish添加两个资源文件
  • and finally change the feature name to be like webPartName + Feature 最后将feature名称更改为webPartName + Feature

any good starting points? 有什么好的起点吗? or online resources 或在线资源

thank you. 谢谢。

What you are really describing is a custom SharePoint Solution Project , not a Visual Studio solution. 您真正描述的是自定义SharePoint解决方案项目 ,而不是Visual Studio解决方案。

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. MSDN中的这一部分介绍了如何为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. 特别是,对您来说,最好的选择是“导出模板向导” ,它将根据您创建的现有项目创建模板。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 以编程方式创建SharePoint列表 - Programmatically create SharePoint list 以编程方式创建文件夹共享点基础 - Create folder sharepoint foundation Programmatically 以编程方式创建新DocumentSet [SharePoint]时发生异常 - Exception on programmatically create new DocumentSet [SharePoint] SharePoint 2007-如何以编程方式创建网站模板 - SharePoint 2007 - How to create a site template programmatically 以编程方式在SharePoint中创建asp:Button和attach事件 - Programmatically create asp:Button and attach event in SharePoint 在SharePoint 2010中以编程方式创建.NET程序集连接器 - Create .NET assembly connector programmatically in SharePoint 2010 如何以编程方式创建多个项目的解决方案? - How to create solution with multiple projects programmatically? 创建工作流解决方案以发送有关在SharePoint中创建新列表项的电子邮件 - Create a workflow solution to send an email on new list item creation in SharePoint 使用 XML 定义文件以编程方式创建 SharePoint 2010 内容类型 - Programmatically create SharePoint 2010 content type using XML definition file 如何以编程方式在vs 2008中创建新的空白解决方案? - How can I create new blank solution in vs 2008 programmatically?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM