none
Visual Studio 2008 crashing while loading solution

    Question

  • Hi, Visual studio recently started crashing when opening a C#solution for an internal software that my company has been using. The problem seem to occur when opening the solution with a designer open.

    Debugging it returns the following error.

    System.IO.FileNotFoundException was unhandled
      Message="Could not load file or assembly 'Database, Version=1.1.0.0, Culture=neutral or one of its dependencies. The system cannot find the file specified."

    We isolated the problem to a call to a method in another project in a C# form's Dispose method.

    protected override void Dispose(bool disposing)
    {
        if (disposing)
        {
            timer.Dispose(); // <- problem statement
    	
            if (components != null)
    	{
                components.Dispose();
    	}
        }
        
        base.Dispose(disposing);
    }

    We tried a few workarounds including

    • Enclosing the statement in an if statement
    • Enclosing the statement in a try-catch
    • checking to see if this is in design mode (DesignMode == true)

    None of them solves our problem.

    Below is information on the Visual Studio version that we are running, any help is greatly appreciated.

    Microsoft Visual Studio 2008
    Version 9.0.30729.1 SP
    Microsoft .NET Framework
    Version 3.5 SP1
    
    Installed Edition: Standard
    Microsoft Visual Basic 2008
    Microsoft Visual C# 2008
    Microsoft Visual C++ 2008
    Microsoft Visual Web Developer 2008
    
    Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB2538241)   KB2538241
    This hotfix is for Microsoft Visual Studio 2008 Standard Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/2538241.
    
    Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB944899)   KB944899
    This hotfix is for Microsoft Visual Studio 2008 Standard Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/944899.
    
    Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB945282)   KB945282
    This hotfix is for Microsoft Visual Studio 2008 Standard Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/945282.
    
    Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB946040)   KB946040
    This hotfix is for Microsoft Visual Studio 2008 Standard Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/946040.
    
    Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB946308)   KB946308
    This hotfix is for Microsoft Visual Studio 2008 Standard Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/946308.
    
    Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB946344)   KB946344
    This hotfix is for Microsoft Visual Studio 2008 Standard Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/946344.
    
    Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB946581)   KB946581
    This hotfix is for Microsoft Visual Studio 2008 Standard Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/946581.
    
    Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB947173)   KB947173
    This hotfix is for Microsoft Visual Studio 2008 Standard Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/947173.
    
    Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB947540)   KB947540
    This hotfix is for Microsoft Visual Studio 2008 Standard Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/947540.
    
    Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB947789)   KB947789
    This hotfix is for Microsoft Visual Studio 2008 Standard Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/947789.
    
    Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB948127)   KB948127
    This hotfix is for Microsoft Visual Studio 2008 Standard Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/948127.
    
    Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB953256)   KB953256
    This hotfix is for Microsoft Visual Studio 2008 Standard Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/953256.
    
    Hotfix for Microsoft Visual Studio 2008 Standard Edition - ENU (KB971092)   KB971092
    This hotfix is for Microsoft Visual Studio 2008 Standard Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/971092.
    
    Microsoft Visual Studio 2008 Standard Edition - ENU Service Pack 1 (KB945140)   KB945140
    This service pack is for Microsoft Visual Studio 2008 Standard Edition - ENU.
    If you later install a more recent service pack, this service pack will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/945140.
    
    Microsoft Visual Studio 2008 Standard Edition - ENU Service Pack 1 (KB947888)   KB947888
    This service pack is for Microsoft Visual Studio 2008 Standard Edition - ENU.
    If you later install a more recent service pack, this service pack will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/947888.
    
    Microsoft Visual Studio 2008 Standard Edition - ENU Service Pack 1 (KB948484)   KB948484
    This service pack is for Microsoft Visual Studio 2008 Standard Edition - ENU.
    If you later install a more recent service pack, this service pack will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/948484.
    
    Security Update for Microsoft Visual Studio 2008 Standard Edition - ENU (KB2251487)   KB2251487
    This security update is for Microsoft Visual Studio 2008 Standard Edition - ENU.
    If you later install a more recent service pack, this security update will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/2251487.
    
    Security Update for Microsoft Visual Studio 2008 Standard Edition - ENU (KB2669970)   KB2669970
    This security update is for Microsoft Visual Studio 2008 Standard Edition - ENU.
    If you later install a more recent service pack, this security update will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/2669970.
    
    Security Update for Microsoft Visual Studio 2008 Standard Edition - ENU (KB972222)   KB972222
    This security update is for Microsoft Visual Studio 2008 Standard Edition - ENU.
    If you later install a more recent service pack, this security update will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/972222.
    
    Update for Microsoft Visual Studio 2008 Standard Edition - ENU (KB956453)   KB956453
    This update is for Microsoft Visual Studio 2008 Standard Edition - ENU.
    If you later install a more recent service pack, this update will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/956453.
    
    Update for Microsoft Visual Studio 2008 Standard Edition - ENU (KB967143)   KB967143
    This update is for Microsoft Visual Studio 2008 Standard Edition - ENU.
    If you later install a more recent service pack, this update will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/967143.

    Wednesday, August 28, 2013 3:02 AM

Answers

  • Hi Caillen,

    I'll try to see if i can test this on another computer.

    Yes, the timer variable was from another project in the same solution.

    Visual Studio crashed with the below windows event log:

    (EventType clr20r3, P1 devenv.exe, P2 9.0.30729.1, P3 488f2b50, P4 system, P5 2.0.0.0, P6 506beeb6, P7 5a2, P8 0, P9 system.io.filenotfoundexception, P10 NIL.)

    We have tried moving that statement to another location, eg. FormClosed event, moving that statement seemed to have solved the problem for us.

    Friday, August 30, 2013 4:28 AM

All replies

  • Hello,

    Whether all solutions will have this issue? Please restart your PC, run VS as Admin and create a simple C#/C++/Visual Basic project in a new solution to check if the issue still will occur.

    Based on your error, it seems that the assembly Database you have added are not registered with application or else the reference is not added. Please make sure if you are making use of any third party DLL the reference is added in the system.

    In addition, if you create this assembly named Database and reference it in another project, please make sure the Database.dll exists in Bin folder.

    If no help, you can refer to Edwer’s suggestion in the following thread with the similar issue:

    http://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/032efa8c-5e92-42de-9a02-ea7c123f5d72/

    Best regards,


    Amanda Zhu <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    Thursday, August 29, 2013 2:47 AM
  • Hi Amanda,

    Thanks for trying to help.

    Yes, Database.dll is referenced in the solution.

    It only happens when starting up the solution with a designer is open.

    The project compiles and run without problems.

    The reference call in Dispose could be substituted with another call to another project and Visual Studio will crash with a FileNotFoundException to that dll.

    Thursday, August 29, 2013 4:33 AM
  • Hello,

    I have moved this thread to Visual C# forum for better response.

    Best regards,


    Amanda Zhu <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, August 29, 2013 5:56 AM
  • What is the variable "timer" then? Is it defined in the other project you mentioned?

    Have you tried to open your project in another machine?

    Do you mean when you open your project, it displays an error page with the designer, and that is what you called "crashing"?

    Is the assembly "'Database" you mentioned a 3rd-party dll, which is installed in another program on the machine? If it is, please try to re-install the program in the same folder as the original one is.


    Caillen
    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, August 29, 2013 10:39 AM
  • Hi Caillen,

    I'll try to see if i can test this on another computer.

    Yes, the timer variable was from another project in the same solution.

    Visual Studio crashed with the below windows event log:

    (EventType clr20r3, P1 devenv.exe, P2 9.0.30729.1, P3 488f2b50, P4 system, P5 2.0.0.0, P6 506beeb6, P7 5a2, P8 0, P9 system.io.filenotfoundexception, P10 NIL.)

    We have tried moving that statement to another location, eg. FormClosed event, moving that statement seemed to have solved the problem for us.

    Friday, August 30, 2013 4:28 AM