2013-08-28 51 views
0

我正在使用visual studio 2010并安装了mvc 4.使用vs开发服务器进行调试时,示例web应用程序完美工作,但是如果我尝试使用IIS进行调试,出现以下错误:在IIS上调试MVC 4 web应用程序时出错

Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.HostAdapters.ASPNETAdapter, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

我没有任何关于web.config中的质量工具的参考,试图添加它们,但仍然没有工作。我也尝试使用aspnet_regiis工具以防万一。

我也尝试过针对不同的x64或x86平台,但它没有什么区别。

我的dev的机器是windows 7 64位

回答

1

你可以找到答案here

This error is caused by mixed development environment. That means you have build the service with .NET 4 at he x64 machine and somebody else is trying to host the service at his x86 development machine

如果它不工作,检查目标框架是4.0

+0

我试图主机在同一台物理机器上。所以iis是64位。我也尝试过在另一台64位机器上创建相同的示例应用程序,并且它完美地工作。示例应用程序没有Microsoft.VisualStudio.QualityTools.HostAdapters.ASPNETAdapter版本= 10.0.0.0,如上面的文章中所述,但是在一台机器上,它在另一台机器上工作,而在另一台机器上则不工作。 它可能是一个视觉工作室本身的问题,我应该重新安装吗? –

相关问题