1

I know there are so many questions and articles on this topic and I have searched hours and hours on the Internet so far, but I still couldn’t find the right answer for my question. I was assigned the task to investigate the development environment for SharePoint web parts by my company. The money is not an issue but it must be the proper way to do it.

Here is my ideal plan: at developer desktop, install VS2005/2008 (it is already installed), VS2005/2008 Extension for SharePoint and WSPBuilder. It is also installed a Virtual Machine and the VM runs windows server 2003/2008. WSS3.0 and SQL Express 2005/2008 will be also installed on VM.

Developer’s desktop is a web parts development environment. Developers use VS to develop the SharePoint web parts and then run the WSPBuilder, it will deploy the web parts into the SharePoint testing environment on VM. So the VM is just a SharePoint testing environment. It looks like a good idea, however, it doesn’t work. Why? Because VS extension can't be installed on developer’s desktop as it doesn’t have WSS3.0 installed!

I definitely don’t want to install the VS on the VM, because our developer desktop has installed VS and we don’t need to have 2 VS licences for 1 developer. Any idea what is the best way to set up the development environment for SharePoint web parts?

Thank you in advance.

theChrisKent
  • 15,029
  • 3
  • 61
  • 62
dave
  • 11
  • 2

3 Answers3

1

You won't be able to develop for SharePoint (WSS 3.0) unless your development environment includes an installation of at least WSS. In general, development is done on a Windows Server 2003 Virtual Machine (Visual Studio is installed directly on this machine). However, SharePoint can be installed on Windows Vista and Windows 7 machines, so your development machine may be able to host SharePoint itself, but it is far easier to do this on a VM.

My SharePoint development VM has the following installed:

  • Windows Server 2003 R2
  • SharePoint 2007 (Including SQL 2005)
  • Visual Studio 2008
  • Visual Studio Tools for Office
  • Office Server SDK
  • Visual Studio Extensions for WSS 1.3

Obviously you can use WSPBuilder instead, but I much prefer VSSWSS 1.3, but that is developer preference.

I believe (should be verified with Microsoft) that the licensing for Visual Studio can be extended to Virtual Machines when used by the same developer (depending on your agreement).

theChrisKent
  • 15,029
  • 3
  • 61
  • 62
  • Thank you very much for your answer. Could I ask a farther question? What is the best way to deploy the web parts into production environment? In my company we have dev, test, prod environments apart from the developer's desktop. Thank you! – dave Feb 11 '11 at 05:03
  • @dave VSSWSS 1.3 creates a deployment package (wsp) and a setup.bat. You can run "setup.bat /install /weburl " on an app server and it will deploy to your farm and activate the necessary features. – theChrisKent Feb 11 '11 at 13:42
  • I'll add a vote for WSPBuilder over VSSWSS 1.3. The biggest advantage VSSWSS has is the upgrade path to VS 2010 SharePoint solutions. Other than that in my opinion WSPBuilder is the way to go. – knight0323 Feb 11 '11 at 20:45
1

An alternative for you which may or may not work depending on your priorities.

Install Visual Studio 2010 and SharePoint 2010 Foundation to your development server.

Grab a copy of Microsoft.SharePoint.dll from a SharePoint 2007 server.

Use VS2010's tools to develop a web part but manually change the reference to the 2007 dll's (+ also see "Build a SharePoint 2007 Web Part with a Visual Studio 2010 Visual Web Part Project") so you are outputing a 2007 compatible web part.

When you delploy your 2007 web part to your local 2010 server it will just work (as its backwardly compatible)

When you deploy your 2007 web part to your test/qa/production servers it will work too.

Advantages

  • You're working with latest greatest version of VS and the sharepoint tooling so you get one click deploy, automatic creation of WSP packages etc. Nothing against WSP Builder etc (they are great) but my moneys on vs2010 sharepoint extensions for the future.
  • You're ready if/when your company moves to 2010.
  • You're developing on a Windows 7 machine, not a 2003/2008 server and or a VM so this has advantages for licensing, speed and ease of use (dual monitor support from VS running on a VM?)

Edit - to deploy web parts to other servers you create a .wsp package and then deploy via STSSADM or another tool (SharePoint solution installer or other admin tools).

Community
  • 1
  • 1
Ryan
  • 23,871
  • 24
  • 86
  • 132
  • +1 for a neat idea, I'm not permitted to do this in our environment, but if you've got the tools and the management approval, this sounds like a good way to go. @Ryan when using VS2010 do you still have to manually add a usercontrol in order to do visual design on a web part targeting 2007? – theChrisKent Feb 11 '11 at 13:45
  • Unfortunately my company is using SharePoint 2007 and I don’t know when it will be upgraded to SharePoint 2010. Thank you very much for this excellent solution. – dave Feb 13 '11 at 22:14
0

I haven't used VSSWSS or WSPBuilder. I've always used STSDEV for SharePoint 2007. And I've always used Windows XP to do it. I don't know if VSSWSS and WSPBuilder act the same, but, as Ryan was saying, I copy whatever SharePoint DLLs I need from a SharePoint 2007 server into a Solution Folder in my Visual Studio solution. I then select Add Reference in my project and browse to the DLL.

In four years, I've never had any problems with this method. The solution packages build just fine and work on any SharePoint server. I lose the option to debug, but I'd rather stay on my machine than go into a VM or Remote Desktop.

Rich Bennema
  • 10,295
  • 4
  • 37
  • 58
  • Thank you very much Rich, this environment is the most close one to my environment. Our developers use Windows XP and VS2005 (may be upgraded to VS2008 late), and our SharePoint environment is SP 2007. I am just wondering in your case, do you create the web parts at developer’s PC? I mean you don’t need to install everything in MV? Do you still need MV for SharePoint testing environment? If so, how to do deploy the web parts from developer’s PC to VM? Sorry for too many questions at one time. – dave Feb 13 '11 at 22:54
  • Yes, we did web parts, web controls, page classes, feature receivers, event receivers, timer jobs, etc. Anything that requires code can be compiled in Windows XP as long as you have a copy of the appropriate DLL. The only thing I haven't been able to do in Visual Studio on Windows XP are workflows. But yes, you will need a SharePoint server for testing. That can be a VM or an actual server. To deploy the web part, build it into a feature within a solution package (make sure that SafeControls is set in the manifest). Copy the wsp to the server and deploy with STSADM. – Rich Bennema Feb 14 '11 at 13:13