Building Web Parts using VS.NET extensions for SharePoint

Mike McDonogh sent us this recommendation:


If any of you are planning on building web parts for Project Server 2007 I’d HIGHLY recommending using the VS.NET extensions for SharePoint.


The trick to get it working in VS.NET 2005 so that it will run in Project Server Sites is as follows:


1.    Create a new Web Part project

2.    Open the class and change the code System.Web.UI.WebControls.WebParts.WebPart to Microsoft.SharePoint.WebPartPages.WebPart

3.    Create a DWP file, Project Web Access site required a DWP file to be imported

<?xml version="1.0"?>

<WebPart xmlns="">

   <Assembly>DynamicProjectRegistratonModule, Version=, Culture=Neutral, PublicKeyToken=99646028e7d67527</Assembly>

   <TypeName> DynamicProjectRegistratonModule.RegisterProjectWP</TypeName>

   <Title>Web part for registering new projects in Project Server</Title>

   <Description>You can put a description here.</Description>


4.    Click deploy in Visual Studio.NET


Why would you want to use the extensions [huge time saver]:


·         Build the Web Part assembly.

·         Package the Web Part solution as a Windows SharePoint Services Feature.

·         If this Web Part solution was deployed previously, the extensions retract the previous version of the Web Part solution Feature.

·         Updates the web.config safe controls settings automatically.

·         Install your Web Part assembly to the global assembly cache.

·         Deploy and activate your Web Part solution Feature in Windows SharePoint Services.

·         Add your Web Part to the SafeControls list.

·         Restart Microsoft Internet Information Services (IIS) by invoking the iisreset command.

·         Attach to the w3wp processes to enable debugging.

·         Packaging for deployment to QA/DEV/Production in VS.NET is easy.

Comments (0)

Skip to main content