My company ships a product that, among other things, registers SharePoint EventReceiver with SPLists, tracks changes. I register it with the GAC, where it works fine. However, one of our customers expressed dissatisfaction with our build installed in the GAC and wishes us to move our binaries to the SharePoint BIN directory and perform another security / trust voodoo that is required for this scenario to work.
When I try to register an event receiver that is not in the GAC, I get a very specific exception, whose message reads: "The event receiver collection is not in the GAC." I interpret this as SharePoint, requiring event receivers to be installed in the GAC. In addition, I found this on MSDN: http://msdn.microsoft.com/en-us/library/ff407965.aspx : the section "Event Events and Processing Events" contains
SharePoint Foundation event handlers are a compiled custom managed code module that is invoked by the specified event that you specified. The event handler code is compiled into a .dll file and deployed to the GAC.
This again implies, but does not exhaust, that installing the GAC is a requirement. Does anyone know the answer to this for sure, so I can go back to the client and explain our GAC requirement?
The next question: if I have an assembly in the GAC and I “statically link” with other assemblies, that is, I do not explicitly dynamically load them using Assembly.Load () - then should these other assemblies also reside in the PAC?
source
share