none
Error: the type initializer for . . . threw an exception

    Question

  • Hi guys,

     

    After i set up visual studio 2005 there are many problems:

     

    1- In Solution Explorer Window: the Icon of Solution is not found but the icon of the project and all page found easy

     

    2- when i run the web project this error appear:

        Error: the type initializer for . . . threw an exception

    are u have any idea please


    Monday, June 27, 2011 6:01 PM

Answers

  • Hi Mouslim,

     

    Thank you for your post.

     

    Could you please let me know what your OS and Service Pack level is?

    Would you let me know the specific message information of the error: “the type initializer for . . . threw an exception”?

     

    Here are my general suggestions:

    ·         Please try to run devenv /ResetSettings (in command prompt) to eliminate the related potential settings problem.

    ·         Try disabling Add-ins (e.g. “Tools” | “Add-in Manager”) or run “devenv.exe /SafeMode”.This can eliminate the possibility that third party Add-ins or packages are causing problems. (For more detailed VS command line switches information, see: http://msdn2.microsoft.com/en-us/library/xee0c8y7.aspx )

    ·         Try creating a new project. Sometimes corrupted project settings can cause problems. These are project specific.

    ·         If the issue still exists, I recommend you repair your Visual Studio 2005. To do so: Start>>Control Panel>>Uninstall a program>>Choose Microsoft Visual Studio 2005 – ENU>>Uninstall/Change>>Repair/Reinstall.

    ·         If the problem still occurs, I recommend you update your Visual Studio 2005 to Service Pack 1. You can download Service Pack 1 from here: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=5553

    ·         If your OS is Windows Vista, Windows 7, Windows Server 2008 or Windows Server 2008 R2, I recommend you install this update: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=7524

    ·         Try to create a new user account. This can help isolate user profile corruption related causes.

     

    If you have any other concerns, please feel free to let me know.

     

    Best Regards,


    Alexander Sun [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by pvdg42MVP Friday, July 01, 2011 9:36 PM
    • Marked as answer by Alexander Sun Tuesday, July 05, 2011 2:24 AM
    Wednesday, June 29, 2011 6:25 AM
  • Thanks man,

     

    I set up new windows and every thing go nicely

     

    Thank you very much for your reply

     

    bye

     

    • Marked as answer by Alexander Sun Tuesday, July 05, 2011 2:24 AM
    Friday, July 01, 2011 8:50 PM

All replies

  • Hi Mouslim,

     

    Thank you for your post.

     

    Could you please let me know what your OS and Service Pack level is?

    Would you let me know the specific message information of the error: “the type initializer for . . . threw an exception”?

     

    Here are my general suggestions:

    ·         Please try to run devenv /ResetSettings (in command prompt) to eliminate the related potential settings problem.

    ·         Try disabling Add-ins (e.g. “Tools” | “Add-in Manager”) or run “devenv.exe /SafeMode”.This can eliminate the possibility that third party Add-ins or packages are causing problems. (For more detailed VS command line switches information, see: http://msdn2.microsoft.com/en-us/library/xee0c8y7.aspx )

    ·         Try creating a new project. Sometimes corrupted project settings can cause problems. These are project specific.

    ·         If the issue still exists, I recommend you repair your Visual Studio 2005. To do so: Start>>Control Panel>>Uninstall a program>>Choose Microsoft Visual Studio 2005 – ENU>>Uninstall/Change>>Repair/Reinstall.

    ·         If the problem still occurs, I recommend you update your Visual Studio 2005 to Service Pack 1. You can download Service Pack 1 from here: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=5553

    ·         If your OS is Windows Vista, Windows 7, Windows Server 2008 or Windows Server 2008 R2, I recommend you install this update: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=7524

    ·         Try to create a new user account. This can help isolate user profile corruption related causes.

     

    If you have any other concerns, please feel free to let me know.

     

    Best Regards,


    Alexander Sun [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by pvdg42MVP Friday, July 01, 2011 9:36 PM
    • Marked as answer by Alexander Sun Tuesday, July 05, 2011 2:24 AM
    Wednesday, June 29, 2011 6:25 AM
  • Thanks man,

     

    I set up new windows and every thing go nicely

     

    Thank you very much for your reply

     

    bye

     

    • Marked as answer by Alexander Sun Tuesday, July 05, 2011 2:24 AM
    Friday, July 01, 2011 8:50 PM