none
Cannot Add Reference to .NET solution, get "unexpected error" message RRS feed

  • Question

  • I have a class library solution with multiple projects (all type class library).  I need to add a reference to System.Web.dll to one of the projects in the solution in order to send an email from a program.  When I click "Add Reference" for the project, I get error message "Visual Studio has encountered an unexpected error" message.  I don't even get to the Add References dialog box.

    Any suggestions on what to do?  The error message is useless.

     

    Thursday, October 28, 2010 7:29 PM

Answers

  • OK, I've got the answer and the fix.  The common denominator to the projects receiving this error was that the language of choice in those projects which is

    • Fujitsu NetCOBOL for .Net V3.1

    On the Alchemy Solutions support website, this problem is described as follows and the patch to fix has been provided in the attached link:

    "After installing the  .NET Framework 3.5 and 3.0SP1 the error "Visual Studio has encountered an unexpected error" appears when adding a reference.
    This occurs because the updates to  .NET Framework 3.5 and 3.0SP1 have changed some of the registry entries that the NetCOBOL packages require."

    http://support.alchemysolutions.com/scripts/texcel/CustomerWise/TxSwDownload/e2f302d7e2f302dce2f302dde2f34414/F00018.htm

     

     

    Thank you all, and hope this helps someone else.

    • Marked as answer by lemek Monday, November 1, 2010 10:52 PM
    Monday, November 1, 2010 10:51 PM

All replies

  • Hi lemek,

     

    Thank you for posting.

     

    Based on your description, it seems that your concern is more like IDE. Check the following suggestions.

    Please check whether or not your concern is resolved after each step.

     

    -          You could type ‘Devenv.exe /SafeMode’, which starts Visual Studio in safe mode, loading only the default environment and services.

    -          If it does not work, you could type ‘Devenv.exe /resetsettings’. It restores Visual Studio default settings. Optionally resets the settings to the specified .vssettings file.

    More information about Devenv.exe Command Line, you could refer the following link:http://msdn.microsoft.com/en-US/library/ms241273(v=VS.80).aspx

           -       Switch other accounts or create a new account and try it again.

     

    CHEERS,

    Larcolais


    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.
    Monday, November 1, 2010 3:37 AM
  • I was not able to run "Denenv.exe" from the command line as is.  I checked the Registry AppPaths, and the correct path was there - I don't know why but the only I could run "Denenv.exe" was by keying the entire path on the command line.

    I ran the SafeMode, tried to Add Reference, and still got the "unexpected error".

    I ran the ResetSettings, tried to Add Reference, and still got the "unexpected error".

    FYI, I have Windows XP, Visual Studio 2005 Version 8.0, Microsoft .NET Framework Version 2.0.

    Also, in past projects I have successfully added a reference.  It's almost like something has gotten corrupted on my machine.  But oddly, I do not get this "unexpected error" for all projects.  I have tried creating a new (very simple) project and I also get the error on that.

    I would really appreciate more help with this!

     

     

    • Marked as answer by lemek Monday, November 1, 2010 10:51 PM
    • Unmarked as answer by lemek Monday, November 1, 2010 10:52 PM
    Monday, November 1, 2010 4:38 PM
  • OK, I've got the answer and the fix.  The common denominator to the projects receiving this error was that the language of choice in those projects which is

    • Fujitsu NetCOBOL for .Net V3.1

    On the Alchemy Solutions support website, this problem is described as follows and the patch to fix has been provided in the attached link:

    "After installing the  .NET Framework 3.5 and 3.0SP1 the error "Visual Studio has encountered an unexpected error" appears when adding a reference.
    This occurs because the updates to  .NET Framework 3.5 and 3.0SP1 have changed some of the registry entries that the NetCOBOL packages require."

    http://support.alchemysolutions.com/scripts/texcel/CustomerWise/TxSwDownload/e2f302d7e2f302dce2f302dde2f34414/F00018.htm

     

     

    Thank you all, and hope this helps someone else.

    • Marked as answer by lemek Monday, November 1, 2010 10:52 PM
    Monday, November 1, 2010 10:51 PM