Class needs to be public for WSPBuilder to add as SafeControl

When WSPBuilder builds the WSP package, it looks through all the classes in the assembly. If it sees any class that inherits from WebControl (and perhaps also Control/UserControl?), it will automatically instruct the manifest to add the assembly to the SafeControl list in the target web app’s web.config. This means when this WSP is deployed, you can go ahead and use these controls in SharePoint without having to manual edit the web.config.

Today I found that WSPBuilder will only do this if the class is public. If you don’t specify anything then, in C#, the visibility is internal and it will not be picked up by WSPBuilder.


About Bernado

Based in Australia, I am a freelance SharePoint and Dynamics CRM developer. I love developing innovative solutions that address business and everyday problems. Feel free to contact me if you think I can help you with your SharePoint or CRM implementation.
This entry was posted in WSPBuilder. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s