none
Run-time error on C# application - System.IO.FileNotFoundException: Could not load file or assembly 'System.Data' RRS feed

  • Question

  • I´ve created an application in C# and it worked perfectly for more than 6 months but now it is showing the following error:

     

     

    System.IO.FileNotFoundException: Could not load file or assembly 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.

    File name: 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

       at MyDLL.MyConn.ExecuteNonQuery(String String_SQL, Int32 Save_Log)

       at MyDLL.MyConn.ExecuteNonQuery(String String_SQL) in N:\TI\Projects\CSharp\MyDLL\MyDLL\MyConn.cs:line 17

       at MyAPP.Log.Log_Event(Int32 ProgramID, Int32 ProcessID, Int32 EventCode, String Description)

     

    === Pre-bind state information ===

    LOG: User = SRV02\user1

    LOG: DisplayName = System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

     (Fully-specified)

    LOG: Appbase = file:///C:/TEMP/bbg2/

    LOG: Initial PrivatePath = NULL

    Calling assembly : MyDLL, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null.

    ===

    LOG: This bind starts in default load context.

    LOG: Using application configuration file: C:\TEMP\bbg2\MyAPP.vshost.exe.config

    LOG: Using machine configuration file from c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.

    LOG: Post-policy reference: System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

    LOG: The same bind was seen before, and was failed with hr = 0x80070002.

     

     

    Can anyone help me to find out what´s going on here?

     

    Monday, June 14, 2010 6:04 PM

Answers

  • Hi RafaelAyres,

    Thank you for your post.

    Based on the message, FileNotFoundException is the exception that is thrown when an attempt to access a file that does not exist on disk fails. It looks like that

    The error often occurs when one or more dependent files somehow becomes missing or corrupt. You could use the Dependency Walker tool (depends.exe) to determine if any dependent files are missing.

    BTW, this forum is for the support of .NET Framework installation. For your concern on C# project, you could post your thread on Visual C# General forum. This will make answer searching in the forum easier and be beneficial to other community members as well.

    Thank you for your understanding.

    Hope this helps! If you have any concern, please feel free to let me know.

    Best regards,
    Yichun Chen

    (This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.)

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Edited by YiChun Chen Tuesday, June 22, 2010 2:34 AM typo
    • Marked as answer by YiChun Chen Tuesday, June 22, 2010 2:34 AM
    • Marked as answer by YiChun Chen Tuesday, June 22, 2010 2:34 AM
    Wednesday, June 16, 2010 9:17 AM