Visual Studio has encountered an unexpected error
I got everything installed, VS opens just fine, but when I try and create a new project or even just close a box pops up saying, "Visual Studio has encountered an unexpected error." Eventually I can get it to crash and end task. I made sure all Beta bits were uninstalled and rebooted. The first time I ran into this I did a repair, then this morning I uninstalled and reinstalled, still same error.
Has anyone else seen this issue?
~ Steve
Answers
- It seems like some addins can cause this problem. We've run into Visual SVN causing this issue. Upgrading to the latest release (1.3.1) fixed this issue for us.
Hopefully this can help someone out.
All Replies
- Yes...both myself and a coworker are experiencing the same issue. Not sure what we have to do to fix this, but I'm guessing it won't be fun.
/bc Yes, I had the very same thing happen. The install went smooth. Launched VS2008 and chose the C# settings and then nothing worked. File/Close, or any menu item or command, elicited the error. I had to kill the devenv.exe process. I never installed the BETA, so I don't believe that is the cause of this problem.
I then uninstalled VS2008 thinking that I would try installing one more time but things got worse. After the uninstall VS2005 would no longer start up, the SQL Server 2005 Reporting Services service started experiencing a System.IO.Filenotfound exception at start up, and I couldn’t launch SQL Enterprise manager.
I’ve tried reinstalling VS2005 and using System Restore to go back to just prior to the VS2008 install. Both of these failed to fix the problems. I’m getting ready to re-image the machine right now.
Ray
Me too, so you are definately not alone.
OS: Vista Business.
Maybee one of the unofficial updates have something to do with it.
Hopefully someone has an answer.
- Our entire team is basically dead in the water until we can get an answer to this. We have duplicated the issue on two seperate machines, both fresh installs of VS 2008. When we try to open a project, create a new project, or do anything for that matter, we get an error prompt that says "Visual Studio has encountered an unexpected error". After receiving the error, we can't even close VS. We have to manually kill the process. Here is a little background on our environements:
Windows XP Pro
VS 2005 seperate install
VS 2008 Team System (brand new install)
No beta version of 2008 was ever installed
One 2008 installation was from an MSDN download. The other was a 90 day trial.
Both machines are on different AD Domains
Have uninstalled, rebooted, and reinstalled
Not sure what other information to provide. The application event log doesnt provide any more details, so I don't even know where to place the blame. Does anyone know of any other logs that VS may be writing to to provide more information?
Any help would be greatly appreciated.
-Anthony Kilhoffer Just an update as to what else I've tried. I just installed 2008 Web Express and it works fine. VS2008 sill has the same issues described previously.
I did get it installed on a clean Windows 2003 Server without any issue. My problem machine did have Beta on it, but my server did not.
~ Steve
- Just to add a bit more info about our situation, all machines that exhibit the problem have not had the beta installed previously. They actually have very little software on them, as they are fairly new development machines. So, we can rule out any beta conflicts.
I'm in the same boat. Running XP and have both VS2005, and VS 2003 installed.
Can't open or create projects.
My default framework for IIS is the 1.1 framework (it was my first guess as the problem when I tried open an IIS web site) but since nothing works i kind of rules that out.
I should probably add that I did not do the complete nor the default install.
I skipped the C++ stuff as well as the SqlServer 2005 Express and Crystal Reports.
- I chose the exact same installation choices as you. Same behavior. Someone from MS sure needs to look at this thread and help out. We can't do any 3.5 development until it's resolved, and we've been counting on some of the new features before we complete our project. MS, please help!
- Same thing happened to me. I'm running windows Vista ultimate. I also did a custom install and then uninstalled, rebooted and reinstalled using the default settings. Still having the problem. Sucks too cause I had the beta 2 version installed and running fine and now I'm dead in the water the holiday weekend when I have 4 free days to actually do some work!
Do you remember what file was missing? Sysinternals has some good tools to do this if it's not included in the message and you haven't imaged the machine yet.- I'm not sure what missing file you're talking about. To best of my knowledge, none of us have received a message stating anything about missing files. Our installations have completed successfully, we just get that message if you try to do anything within VS 2008.
You referred to a System.IO.FileNotFoundException earlier.if you run it from the commandline with:
devenv /safemode it starts and seems to work, of course all the addins are disabled. You can also start it with devenv /log and it will generate a logfile for your to look at, but i didn't find anything useful in the logfile though the following seemed a little suspicious.
Code Block<entry>
<record>9</record>
<time>2007/11/22 16:37:06.014</time>
<type>Information</type>
<source>Microsoft Visual Studio</source>
<description>Loading UI library</description>
<guid>{DA9FB551-C724-11D0-AE1F-00A0C90FFFC3}</guid>
<path>C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\*\msenvui.dll</path>
</entry>
<entry>
<record>10</record>
<time>2007/11/22 16:37:06.071</time>
<type>Error</type>
<source>Microsoft Visual Studio</source>
<description>Error checking App Path</description>
<hr>80070005 - E_ACCESSDENIED</hr>
</entry>
<entry>
<record>11</record>
<time>2007/11/22 16:37:06.109</time>
<type>Information</type>
<source>Microsoft Visual Studio</source>
<description>Entering function CVsPackageInfo::HrInstantiatePackage</description>
<guid>{133240D5-FAFA-4868-8FD7-5190A259E676}</guid>
</entry>
- That's very interesting. I wonder why that would happen. We really need a MS support person to check this thread, because it's a difficult issue to troubleshoot.
Simon: That FileNotFoundException was thrown by SQL Reporting services. It doesnt appear to have anything to do with why VS 2008 is not working. I think the post from bpatters is going in the right direction. But then, I could be wrong. If I knew what was going on, this thread would have died early on.
I guess we'll all just have to hope that MS will happen upon this thread and decide to help. An MVP friend of mine has some contacts at MS that said they would ask around, but who knows. It will probably take one of us opening a support ticket with MS to resolve it. Hope it doesnt go that far....
- Steve,
Try opening Visual Studio with the /log switch. To do this, you can either modify the shortcut and append the /log switch to the shortcut target, or use 'devenv /log' from the Visual Studio SDK command line (if installed).
This will place a log file in the '%USERPROFILE%\Application Data\Microsoft\VisualStudio\8.0\activitylog.xml' location by default. For Visual Studio 2008, the log file will be placed in '%USERPROFILE%\Application Data\Microsoft\VisualStudio\9.0\activitylog.xml' by default.
You can also specify a log path is you choose: 'devenv.exe /log <full path to log file>'.
Try using this switch, and seeing if the activity log gives any more details about the error you are receiving.
Thanks,
Steve - dotneticated.com - Have same problem... but safe mode do not help

XP SP2, VSBeta 2 uninstalled completelly...
Log shows nothing unussual...
there is only one type of warings that show in log
40 Warning CheckPackageSignature failed; invalid Package Load Key {9D2881F7-F482-416C-8D64-CA83326250B9} Microsoft Visual Studio Appid Stub 2007/11/23 08:19:52.446 - It seems like some addins can cause this problem. We've run into Visual SVN causing this issue. Upgrading to the latest release (1.3.1) fixed this issue for us.
Hopefully this can help someone out. - Thanks a bunch! This solved it!
Henning Kilset wrote: It seems like some addins can cause this problem. We've run into Visual SVN causing this issue. Upgrading to the latest release (1.3.1) fixed this issue for us.
Hopefully this can help someone out.
Thanks a lot ^_^The FileNOtFoundException error, amongst others (e.g. Enterprise Manager wouldn't load), occurred "after" I uninstalled VS2008.
I was using an older version of VisualSVN, and from the looks of the other entries in this thread that appears to be at or near the root of this problem.
Ray- Alf-ua,
Another Visual Studio tip for you;
You can hold down the Left Shift key while starting Visual Studio to disable add-ins from loading.
Hope this helps,
Steve - dotneticated.com - I wrote a post on my blog which got a couple of responses. Based on recommendations (that concur with people above) I installed the latest version of VisualSVN and everything works great.
It definitely seems to be an add-in problem. So if studio starts up ok with add-ins disabled. Start checking you add-ins for compatibility with VS2008.
Thanks,
JP
That was my problem, I updated my visual svn from 1.2.2 to 1.3.1 and everything works now. Now I just need to wait for the new Silverlight 1.1 studio tools and I'll be good to go!Updating my visual svn did the trick. Thank you everyone for your responses & feedback.
~ Steve

