Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have some code that creates a SharePoint site.

When the code runs as part of the solution it works. However, when I run it as a unit test I get the following error:

The test adapter 'WebHostAdapter' threw an exception while running test 'CreateSiteTest'. The web site could not be configured correctly; getting ASP.NET process information failed. Requesting 'http://localhost/VSEnterpriseHelper.axd' returned an error: The remote server returned an error: (500) Internal Server Error. The remote server returned an error: (500) Internal Server Error.

I have the following tags on my test:

[TestMethod()] 
[HostType("ASP.Net")] 
[UrlToTest("http://localhost/SitePages/Home.aspx")]  

Any idea why I am getting this error?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

SharePoint unit testing requires a minimum of Visual Studio 2010 with Service Pack 1 installed. It resolves issues with Visual Studio 2010 (a 32-bit application) operating with SharePoint 2010 (a 64-bit application).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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