search cancel

System.IO.FileNotFoundException: Could not load file or assembly 'log4net.dll' when Symantec Protection for Sharepoint Servers is installed.


Article ID: 174861


Updated On:


Protection for SharePoint Servers



When attempting to publish workflows using platform type as “SharePoint 2013 Workflow” the error:  “Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'log4net.dll” is generated.



During the installation of Symantec Protection for Sharepoint Server (SPSS) an independant copy of the into the installation directory.  This DLL is utilized by SPSS to perform logging functionality.  SPSS does not register the DLL into the system or into the GAC. 

Under some configurations Sharepoint Projects / Sites / Workflows can be configured to leverage log4net.dll for logging purposes.  In this circumstance Microsoft.NET will attempt to load the highest version of the dll present on the system.  If the Sharepoint implementation cannot access this resource the error can be thrown. 


As a workaround to this issue we have created a tool that places log4net.dll version ( that is compatible with .NET 4.0 and a log4net.dll version ( that is comptible with .NET 2.0 inside of the GAC.

  1. Download and extract to the SPSS server.
  2. Navigate into <Extract Path>\Release and run (As administrator) "InstallDllinGAC.exe"
  3. Restart IIS from Run or Cmd.exe prompt (iisreset /restart)

To confirm the successful placement of the log4net.dll into the GAC you can run the following Microsoft Powershell commands:

gci C:\Windows\assembly\GAC_MSIL -Recurse | Where-Object {$ -like "*log4net.dll*"} | Select VersionInfo | fl

gci C:\Windows\Microsoft.NET\assembly\GAC_MSIL -Recurse | Where-Object {$ -like "*log4net.dll*"} | Select VersionInfo | fl


Attachments get_app