2

I'm trying to write a few test for an aspx page that handles posted xml.
The project runs fine on the visual studio's web development server (WebDev.WebServer40) but when I try to run a basic (empty) test like the one bellow, the test run results show me this error:

The host type 'ASP.NET' cannot be loaded for the following reason: The key 'ASP.NET' cannot be found.

I've tried all I could think of, but no go.

[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.");
}

Any ideas on how to get this to work?

1

1 Answer 1

4

Open the test settings you're using (Menu->Test->Edit Test Settings->{Your Test Settings}). Go to the "Hosts" property page. For the setting "Run tests in 32 or 64-bit process", set it to "Force tests to run in a 32-bit process".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.