Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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
1  
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
add comment

2 Answers

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. –  Kristian Jun 22 '12 at 8:06
add comment
up vote 0 down vote accepted

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

share|improve this answer
add comment

Your Answer

 
discard

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.