开发者

Why is my Visual Studio 2010 New Project dialog broken?

I came back from MIX 11, installed the new MVC Tools update, and now my Visual Studio 2010 New Project dialog looks like this. This is a serious problem that I have been unable to resolve after a full remove & reinstall of VS 2010 Ultimate. System restores have been unable to resolve this issue either.

I've also tried running devenv /installvstemplates, nothing seems to work.

Also, when opening an existing project, the Add Library Package Reference command causes error "TYPE_E_CANTLOADLIBRARY".

This is a SERIO开发者_开发技巧US PROBLEM, please help!

Why is my Visual Studio 2010 New Project dialog broken?


I've been spending almost a day trying to fix exactly this issue on VS2010, running all existing devenv switches (from Resetsettings/ResetSkipPkgs/Safemode), repairing and reinstalling VS and SP1 and I finally caught it!

In short, my problem (and I guess yours too) relies in a registry ACL on HKEY_CLASSES_ROOT\TypeLib{91A74EB0-EFA0-482B-B43C-35CFC74B275F}, that is indeed "Microsoft Development Environment Properties 8.0". If you add everyone on FullAccess to this registry key from an interactive regedit (use psexec.exe -i -s regedit.exe to start it elevated), everything restarts working back.

VS throws when it shows the new project dialog a TYPE_E_LIBNOTREGISTERED exception from EnvDTE80.DTE2.get_Properties() just after accessing to "Environment.ProjectsAndSolution", because it cannot then access to the environment.

I don't know how those ACLs got screwed up, but I hope this can help someone to avoid spending hours on it and beeing stuck reading posts saying "your (BUILD) machine has a serious problem"... HTH


In your %temp% folder, there should be a file called MVCVS2010Templates.log, or something similar.

It contains the result of running devenv /setup and will show whether VS decided to remove packages or encountered problems when registering project/item templates. We create this file during our install.

If a re-install of VS still has this problem, then there's probably a bigger problem with the machine.

You could try running devenv /resetskippkgs and see if that makes things better. It almost looks like VS disabled everything

Jacques


In some esoteric cases, the key {91A74EB0-EFA0-482B-B43C-35CFC74B275F} cannot be deleted by permissions issues even when running regedit with administrator permissions.

In these cases do the following:

  1. Use the utility tool RunAsSystem

    https://www.raymond.cc/blog/full-control-permission-to-delete-or-edit-restricted-windows-registry/

  2. Delete the key {91A74EB0-EFA0-482B-B43C-35CFC74B275F}

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜