[英]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";
webPartName
添加Visual WebPart webPartName
WebPartName
创建类文件夹WebPartName
Layouts
mapped folder 添加Layouts
映射文件夹 css
and img
folders to the layouts
folder 将css
和img
文件夹添加到layouts
文件夹 .webpart
content to custom values 将.webpart
内容的一部分更改为自定义值 Elements.xml
file 与Elements.xml
文件相同 Resources
mapped folder and add two resources files for Arabic
and English
添加Resources
映射文件夹,并为Arabic
和English
添加两个资源文件 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.