Wednesday, March 31, 2010

{"Could not load file or assembly 'System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its depende

Problem:

{"Could not load file or assembly 'System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.":"System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"}

Discovery:

Noticed that it wasn't installed in the GAC (AKA - C:\WINDOWS\assembly)

Only had System.EnterpriseServices 1.0.5.00 installed. GASP!


FIX: (Wahoo!)

First Attempt: I just tried to copy it over into the assembly with explorer, it failed.

From the Console run this: (Path may vary depending on your system.)

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\gacutil" /i C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.EnterpriseServices.dll


Microsoft (R) .NET Global Assembly Cache Utility. Version 3.5.21022.8
Copyright (c) Microsoft Corporation. All rights reserved.

Assembly successfully added to the cache

No Thanks Required

Just send Money! HAHAHA, Just kidding let me know if it helped you by commenting.

8 comments:

Anonymous said...

Thnx man, i have been pulling out my hair due to this one!!

Anonymous said...

THANKS SO MUCH!!! ONLY THIS SOLUTION WORKED FOR ME!!!

Anonymous said...

This really helps, thank you!

Anonymous said...

its pretty cool solution thanks a lot

Anonymous said...

Thanks a lot. It helps me.

Proffy Prof said...

Hi Thunder, I had a slightly different issue and tried your solution. Maybe i'm missing something, but i either got access denied or could not load the assembly: The error was:

Server Error in '/' Application. Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load file or assembly 'System.EnterpriseServices.Wrapper.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Source Error:

Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="Premier.Global" Language="C#" %>

Source File: /global.asax Line: 1

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

Unknown said...

Hey PHXThunder,

You solved the problem just like this... Thanks a lot... Keep up the great work...!!!

Thank you...!!!

Anonymous said...

In my case it prompted as : "Failure adding assembly the cache: The volume does not contain a recognized file system. Please make sure that all required file system drivers are loaded and that volume is not corrupted". Please, suggest solution, thanks.