System.IO.FileNotFoundException: Could not load file or assembly 'System.EnterpriseServices

Answered System.IO.FileNotFoundException: Could not load file or assembly 'System.EnterpriseServices

  • 7 กรกฎาคม 2553 17:24
     
     

    Hi,

    I am getting the following error with a WPF/C# application on one of the machines that we run the application on. The application works fine on other machines. I compared the "System.EnterpriseServices.dll" file on the machine that throws the error with the dll file on the machine that works fine. I did not any differences. We are using .NET 4 (client profile) framework on XP/x86. Can someone please provide some clue as to why the error is thrown on one of the machines?

    System.IO.FileNotFoundException: Could not load file or assembly 'System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
    File name: 'System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
       at System.Data.Common.ADP.IsSysTxEqualSysEsTransaction()
       at System.Data.Common.ADP.NeedManualEnlistment()
       at System.Data.OleDb.OleDbConnection.Open()
       at TDS.MainWindow.initializeDB(String fileWithPath)

    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].

    Rg.

ตอบทั้งหมด

  • 9 กรกฎาคม 2553 8:06
    ผู้ดูแล
     
     คำตอบ

    Hi Ravgan,

    Thank you for your post in MSDN forum!

     

    Some clarification with you:

    1, what are other machines’ OS? Are they the same OS like the issue’s machine?

     

    Based on your description and your error message, I found some errors as below.

    System.IO.FileNotFoundException: Could not load file or assembly 'System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
    File name: 'System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

    It seems that it might be caused by installing .NET Framework 4.

    I would recommend some suggestions, and you could refer to the following suggestions.

    Step 1, please ensure to unable your anti-virus and some security software, perhaps, to close your firewall, some customers discover some issues are caused by firewall.

    This’s a similar thread like your, you could refer to the following link.

    http://social.msdn.microsoft.com/Forums/en-US/netfxsetup/thread/7f956744-95ff-421e-8da2-d2f0a42b881c

    Step 2, you should download .NET Framework 4 from the following link (Microsoft).

    http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=0a391abd-25c1-4fc0-919f-b21f31ab88b7

    Step 3, if it have some issues during installing framework, you could download ‘Collect.exe’, which could help you to collect information during installing .NET Framework 4

    Step 4, try to clean your "%temp%" folder (Start Menu >> Run >> Type "%temp%")

    Step 5, reinstall .NET Framework 4

    It will create a file named %temp%\vslogs.cab on your system.

    More information about how to use ‘Collect’, you could refer to the following link.

    http://blogs.msdn.com/b/astebner/archive/2007/11/21/6458047.aspx

    If it has none issues during installing framework, you could re-run your program in previous issue’s machine, and try it again.

     

    Hope this helps you! If you have any doubts and concerns, please feel free to let me know. We are going to continue to follow-up.

    Best Regards

    Larcolais Gong

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • ทำเครื่องหมายเป็นคำตอบโดย Larcolais GongModerator 14 กรกฎาคม 2553 2:23
    •  
  • 14 กรกฎาคม 2553 2:23
    ผู้ดูแล
     
     

    Hi Ravgan,

    I’m writing the follow-up this post, does it work as above?

    I’m marking this issue as "Answered". If you have any new findings or concerns, please feel free to unmark the issue.

    Best Regards

    Axel Gong

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • 10 กันยายน 2553 11:09
     
     
    I had the exact problem and now the debugging works perfect - Thank you very much!! :-)
  • 15 สิงหาคม 2555 13:02
     
     

    I had encountered the same problem. 

    When I checked the below folder I found that it was empty.

    C:\WINDOWS\Microsoft.NET\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a

    Copying the below 2 dlls into that folder seem to have fixed the issue on mine. 

    System.EnterpriseServices.dll

    System.EnterpriseServices.Wrapper.dll

    I'm not sure what's the story with this folder - if the dlls are created at runtime or during .NET installation....