SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a project that reference log4net. In the package I have specified that the assembly should be deployed to the GAC. When I try to deploy the application from VS2010 I get the following error:

Error 23 Error occurred in deployment step 'Add Solution': Error: Cannot add the specified assembly to the global assembly cache: log4net.dll. SLV.Samh.Case.MT.SP

share|improve this question
what about if you try with gacutil? This will help to distinguish if there is a problem with the DLL or with the package. Most common issue with adding to GAC failure is the lack of signature on the DLL (snk files typically) – Steve B Jun 21 '12 at 9:35

At the risk of answering a question with a question, why use Log4Net? Why not use SharePoint's Unified Logging Service? It isn't that hard to use, though it does have a few kinks. And it would mean all your administration and logs are in the one place.

share|improve this answer
Fair question. I omitted that Sharepoint is just a part of the system so log4net will make the logs in one place. I ended up having a seperate project that just deploys my dlls into the gac. But thanks for the tip about ULS. Ill check it out. – Pantani Jun 22 '12 at 8:06
up vote 0 down vote accepted

I ended up writing a powershell script that deploys the dll to the GAC.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.