I have been using VS2010 for developing web parts and deploying them to MOSS 2007 for quite some time. Unfortunately, I had to work on a fresh copy of WINDOWS with all software including MOSS 2007 & VS2010 installed. I create a simple Hello world webpart and build it, it builds fine. When I try packaging it, it says
Error: "Object reference not set to an instance of an object.
Any help will be deply appreciated. I have been trying the solution from last 2 hours, but no luck :( Edited..Code below:
[ToolboxItemAttribute(false)]
public class WebPart1 : WebPart
{
protected override void CreateChildControls()
{
Controls.Add(new Label() { Text = "Hello, world! Compiled in Visual Studio 2010!" });
}
}