如何让VS ASP.NET单元测试正常工作?

如何让VS ASP.NET单元测试正常工作?,asp.net,unit-testing,visual-studio-2010,Asp.net,Unit Testing,Visual Studio 2010,我正在尝试为处理发布的xml的aspx页面编写一些测试。 该项目在VisualStudio的web开发服务器(WebDev.WebServer40)上运行良好,但当我尝试运行下面的基本(空)测试时,测试运行结果显示了以下错误: The host type 'ASP.NET' cannot be loaded for the following reason: The key 'ASP.NET' cannot be found. 我已经试了所有我能想到的,但是没有成功 [TestMethod]

我正在尝试为处理发布的xml的aspx页面编写一些测试。
该项目在VisualStudio的web开发服务器(WebDev.WebServer40)上运行良好,但当我尝试运行下面的基本(空)测试时,测试运行结果显示了以下错误:

The host type 'ASP.NET' cannot be loaded for the following reason: The key 'ASP.NET' cannot be found.
我已经试了所有我能想到的,但是没有成功

[TestMethod]
[HostType("ASP.NET")]
[AspNetDevelopmentServerHost("D:\\Documents\\Projects\\Web\\Osc.Framework\\", "/")]
[UrlToTest("http://localhost:24811/Default.aspx")]
public void Page_LoadTest()
{
    Assert.Inconclusive("A method that does not return a value cannot be verified.");
}

关于如何让它工作,有什么想法吗?

打开您正在使用的测试设置(菜单->测试->编辑测试设置->{Your test settings})。转到“主机”属性页。对于设置“在32位或64位进程中运行测试”,将其设置为“强制测试在32位进程中运行”。

我的解决方案与David的答案和