简体   繁体   English

Visual Studio 2010 未检测到 .NET 4

[英]Visual Studio 2010 doesn't detect .NET 4

I had a machine all setup with VS2010 & a.Net 4 project.我有一台机器全部设置了 VS2010 和 a.Net 4 项目。 I needed to install and use MSMQ but something with.Net 4 was making it impossible to install.我需要安装和使用 MSMQ,但是.Net 4 的某些东西使它无法安装。 So.Net 4 had to be removed. So.Net 4 必须被删除。 Now i'm trying to work on the original project but VS doesn't detect.Net 4 even though it was reinstalled.现在我正在尝试处理原始项目,但即使重新安装了 VS 也没有检测到.Net 4。 Also, IIS doesn't detect it either.此外,IIS 也没有检测到它。 I get the 'This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.'我得到“这个程序集是由比当前加载的运行时更新的运行时构建的,无法加载。” error.错误。

The.Net verification utility says both client and extended are installed properly. .Net 验证实用程序说客户端和扩展都安装正确。 I tried uninstalling/reinstalling.Net 4 and I looked at the recommended registry keys for detection and everything is there as expeceted.我尝试卸载/重新安装.Net 4,并查看了推荐的注册表项以进行检测,一切都如预期的那样。

I have seen one person say that they could only resolve it by starting the mahcine over.我看到一个人说他们只能通过重新启动机器来解决它。 I can't do that.我不能那样做。 Any ideas on how to fix this?有想法该怎么解决这个吗?

Uninstalling.Net 4 without uninstalling Visual Studio 2010 is likely the source of your problem.在不卸载 Visual Studio 2010 的情况下卸载 .Net 4 可能是问题的根源。 Visual Studio 2010 has a fundamental requirement on.Net 4 being installed and simply won't run without it. Visual Studio 2010 对安装 .Net 4 有基本要求,没有它根本无法运行。 I'm very surprised you were able to do this at all.我很惊讶你能做到这一点。

The next step I would take is to attempt to repair the Visual Studio 2010 install.我将采取的下一步是尝试修复 Visual Studio 2010 安装。 This is your best bet for getting things up and running again.这是您重新启动和运行的最佳选择。

  • Go to the "Add / Remove Programs" menu Go 到“添加/删除程序”菜单
  • Select Visual Studio 2010 Select Visual Studio 2010
  • Choose Repair选择维修

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM