R – Deploying New Web Parts

deploymentsharepointweb-parts

I've been trying to follow the information from:

Long URL clipped to stop breaking the page

and

http://msdn.microsoft.com/en-us/library/ms415817.aspx

Which more or less have the same instructions. I've been copying the .dll file from the build over to the BIN directory of the Sharepoint site.

When I click the Web Part Gallery and hit new, both articles say that the web part should show up in the list.

I have tried every possible way that I can think, but my web part will not show up in that list. Is there a step that I missed somewhere? Are there permissions that I should be thinking about? How exactly does Sharepoint recognize that there is a new web part. Is it simply from having the assembly placed in the BIN directory, or is it from adding the control in the safe list of web.config?

I've added it to the safe controls list. I've tried every different combination that I could think of, but nothing has worked.

Do I need to rename the .DLL assembly to something else?

For the life of me I cannot figure this out.

Best Answer

I believe the minimum you need to have a WP show up in the "New" Part of the webPart Catalog, you need the dll in the "bin" folder (bin in the web dir, not the 12 hive :)) or in the GAC and a safe control entry. I would verify the Safe control entry:
Assembly = name of dll
NameSpace = well... The NameSpace where your WebPart class resides
TypeName = the name of your webPart class

You can wildcard the NameSpace and TypeName just to be sure you are getting there:

... Namespace="*" TypeName="*" ...

I would also recommend signing the assembly and putting in a PublicKeyToken=...

Also, try setting the trust level to WSS_Medium or Full.

If this doesn't work, you can try adding a .webpart file to the wpCatalog folder in your web dir.

Edit: Clarification