Paolo ponzano - 399 - Sep 23, 2014

Hello Demis, on a production server where I’ve FW .net 4.0 installed I got this exception when I’m using 4.0.31

--------------------------------------------------------------------------------

Could not load file or assembly ‘System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes’ or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.IO.FileLoadException: Could not load file or assembly ‘System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes’ or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Assembly Load Trace: The following information can be helpful to determine why the assembly ‘System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes’ could not be loaded.


WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

 

Stack Trace: 


[FileLoadException: Could not load file or assembly ‘System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes’ or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)]
   ServiceStack.VirtualPath.FileSystemVirtualPathProvider.Initialize() +0
   ServiceStack.ServiceStackHost.Init() +393


 Is this related to PCL? I’ve added System.Net as suggested but with no luck

Thanks

Darren Reid:

If your server is running .NET 4.0, you might need a patch. Some related links.

http://stackoverflow.com/questions/25859049/servicestack-nuget-update-4-0-22-to-4-0-31-caused-errors-on-deployment/25863800

http://stackoverflow.com/questions/23903657/could-not-load-file-or-assembly-system-version-2-0-5-0-in-net-4-mvc-4-applicat

http://support.microsoft.com/kb/2468871

paolo ponzano:

Hello Darren, do you know if a reboot is required?

Thanks

Darren Reid:

last link provided (http://support.microsoft.com/kb/2468871) has a section on restart requirements:

“Restart requirement

This update does not require a system restart after you apply the update unless the files that are being updated are locked or are being used. However, this update restarts all Internet Information Services (IIS)-related services when you install this update.”

1 Like