Minimum development environment for sharepoint 2007 webparts

血红的双手。 提交于 2019-12-13 18:13:48

问题


I know there are already a couple of questions out there about sharepoint development environments, but I was wondering if there's a shortcut if all I want to do is develop a relatively simple webpart. Do I still have to create a virtual machine with windows server, install sharepoint, sql server, wss etc., etc. or is there some easy way to get up and running more quickly?

In short, what's the absolute minimum environment I need to develop a webpart for sharepoint 2007?


回答1:


Unless you are willing to put up with some serious drawbacks (like not being able to debug your web part) you will have to build a virtual machine with windows server.

The minimum development environment is : -Windows Server + SharePoint (WSS or MOSS) + Visual Studio

SQL Express will be installed with Visual Studio.

It does take time to setup your first virtual machine, but once you have it you can back it up and use it for every new project. While you could probably develop a web part on your own machine by copying a bunch of DLLs and hacking something up, it would almost definitely not be worth it. Being able to debug and to deploy fast will make your development way faster.

Even if you don't need it, I still recommend that you install WSPBuilder as part of your minimal environment. Takes 2 minutes to install and it will save you hours.




回答2:


If you can run a virtual machine with 2GB, you should be fine for web part development. I say virtual machine because I doubt you'll want to run windows server on your desktop.

Also, remember that your web parts can use the ASP.NET WebPart object and you can develop that on whatever environment you wish. If you abstract out your code enough you should be able to save SP object model code until the last possible step which would cut down your time on an actual SP environment.




回答3:


The absolute minimum is ASP.NET 2.0, a text editor, a compiler, and makecab.exe.

SharePoint web parts inherit from System.Web.UI.WebControls.WebParts.WebPart, so as long as you don't need to access the SharePoint API, you can create the class and associated XML files using any configuration that has the .NET runtime.

However, you'll probably want to use Visual Studio. Many recommend WSPBuilder, but I use a customized version of STSDEV that will work on my Windows XP laptop. Visual Studio helps with the writing of the code, while WSPBuilder or STSDEV help with the creation of the supporting XML files and the WSP solution package file.

If you need to use the SharePoint API, you can copy the necessary DLLs from a server with SharePoint installed. Place the DLLs locally and then add them to your project references.

You will not be able to debug the web part if it calls the SharePoint API. Personally, I'd rather be able to use my computer than having debugging. In place of debugging, I use logging. While developing, I create an Announcements list named Log and write anything I want logged into that list.




回答4:


The Environment you need to have for developing simple web part is:

Visual studio with WSP Builder add on.

Develop The webpart and build it. When you build the webpart you get the webpartname.wsp.

Take this file to the machine where you have the Sharepoint installed and you can Deploy it using sstadm.

If anyone wants detailed info, please let me know. Hari Gillala



来源:https://stackoverflow.com/questions/4195356/minimum-development-environment-for-sharepoint-2007-webparts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!