Moving DLL Projects from GAC to Bin

We have a Sharepoint project where we deployed the project DLL to the GAC.

We have seen that it is best to use them in the bin directory. This is based on information in the answer to this question: web part dll in Gac or bin using sharepoint 2007

What are the steps we need to take to make this change?

thank

Shiraz

+2


source to share


1 answer


Essentially two things:

This allows SharePoint full trust assemblies to be used by those running under private trust (yours).



  • Write your own code access security file and add it to the web.config for the SharePoint web application.

Writing your own CAS file can be tricky and error prone if you want to do it right. If you use a tool like WSPBuilder , it can automatically generate one for you, which I highly recommend. Otherwise, there will be written guidance here . The "cheat" method is to write a CAS file that completely trusts your assembly, but that goes against the point.

Note. Some SP artifacts, such as event handlers, need to be deployed to the GAC.

+3


source







All Articles