BUG: You may receive a "COMException (0x80010105): The server threw an exception" error message in Visual Studio .NET 2003 (888325)
The information in this article applies to:
- Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2003), Academic Edition
SYMPTOMSIn Microsoft Visual Studio .NET 2003, if you automate your application to run out-of-process, you may receive a COM exception error message that is similar to the following from the Devenv.exe out-of-process component: Unhandled Exception: System.ApplicationException: Failed ---> System.Runtime.Int
eropServices.COMException (0x80010105): The server threw an exception.
at EnvDTE._Solution.Open(String FileName)
at DTEAutomation.Class1.Main(String[] args) in c:\vs7play\enterprisetemplate\
dteautomation\class1.cs:line 45
--- End of inner exception stack trace ---
at DTEAutomation.Class1.Main(String[] args) in c:\vs7play\enterprisetemplate\
dteautomation\class1.cs:line 80
CAUSEThis problem occurs because a cached pointer to the selected data is not valid. Then, the Enterprise Template Project is opened.WORKAROUNDTo work around this problem, use one of the following methods. Method 1 Open the MainWindow property as visible before you open the Enterprise Template Project. To do this, add the following code example before the solution.Open statement in your code. solution.DTE.MainWindow.Activate(); Method 2 Hide the Solution Explorer window before you open the Enterprise Template Project.
To do this, change the solution.Open statement to look similar to the following code example. Window w = cls.DTE.Windows.Item(Constants.vsWindowKindSolutionExplorer);
w.Visible=false;
solution.Open(solutionFileName);
w.Visible=true;
STATUS Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.
Modification Type: | Minor | Last Reviewed: | 5/20/2005 |
---|
Keywords: | kbCompiler kbProgramming kbtshoot kbbug KB888325 kbAudDeveloper |
---|
|