1

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

1
  • 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
    Commented Jun 21, 2012 at 9:35

2 Answers 2

0

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.

1
  • 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.
    – oftedal
    Commented Jun 22, 2012 at 8:06
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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