Could not Load File / Assembly error and Solution

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.

The code is trying to connect to a SQL Server 2000/2005/2008 database. The error does not always to connect database while Executing R Net Communication  due to problem with Loading assembly or file in Visual Studio 2005 (VS 2005).

Possible Solution to Fix the Issues

The above error is completely related to VS 2005, so try the below solution to fix the above issues.
Solution No.1:
Uninstall Completely VS 2005 from your Machine then reinstall the same with Restart your machine to take effect. if this solution is not supported move to Second one
Solution No.2:
I found that running the following from the visual studio 2005 tools command prompt and then logging out and back in again fixes the problem. I assume that the .Net security settings have gotten corrupt.
caspol.exe -all -reset
Solution No. 3 : (Worked for me)
  1. First Attempt: I just tried to copy it over into the assembly with explorer, it failed.
  2. 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
Resulted Window
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