Posted by Alec on Wed, 13 Jan 2010, in ASP.NET C# Sharepoint Tools
I was trying to create a web part with WSPBuilder installed on Visual Studio 2008, but had the problem of rendering a user control. Then I came across this blog post, which explains the steps in wrapping usercontrol with WSPBuilder solution. What's even greater is we can setup a structure which seperates the application presentation layer with the WSP project.
One thing though, is that we need to make sure the Assembly registration tag in the usercontrol is above the Control registration tag, or else when we render in Sharepoint, it will complain as Codebind class not found or could not load the assembly error. Greg's post is just excellent and easy to follow.
A sample framework is attached here. Generally, everytime a fresh roll off, we need to:
Everytime we build UI project, everything in it will be compiled to a dll and get placed in Core project's GAC folder. And then what we do is WSPBuilder -> Build the Core project and deploy it. This is a nice platform as we can include as many tools, utilities, functions we use often in the UI (a web application) project, and also be able to use its designer mode to do any design, rather than doing everything in code behind.