Geeks With Blogs
Scott Spradlin Developer Community Enthusiast

I wrote this series of data entry SharePoint web parts using Infragistics' UltraWebGrid in C#.  Afterwards, the client proclaimed they really wanted everything in VB so I used one of those online converters and it didn't take hardly any time at all.

The project was created with Ted Pattison's STSDEV available on CodePlex.  (I highly recommend this tool ... thanks to my buddy Brendon Schwartz, SharePoint MVP for pointing me to it.)  Unfortunately, the version of STSDEV I used only created C# projects to I had to do some things by hand to get everything converted and building properly within the STSDEV framework.

After everything was built, the solution seemed to install and everything was great up until I tried to add a web part to a page. "Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe" -- but alas, the dll is in the GAC, properly signed and is properly identified in the web.config in SafeControls.  What's wrong?

Loading the dll into Lutz Roeder's Reflector just to verify everything looked ok to me.  I brought a second pair of eyes into the situation and had my collegue and author Todd Kitta.  Todd immediately said "your namespace is wrong" and he was right.

Apparently during my by-hand conversion, in the project properties, I set the assembly name and I also set the Root Namespace to the primary namespace I was expecting.  Well, it turns out that if you actually enter something there, it is automatically prefixed to whatever namespace is in your code.  Hence, my namespace was doubling up.

Technorati Tags: ,
Posted on Monday, May 26, 2008 11:47 PM | Back to top

Comments on this post: Root Namespace in VB

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Scott Spradlin | Powered by: