VS2012 Express for web - HostType("ASP.NET") = MSTestAdapter could not run the test as the classic mode helper is not available
I have a web project I'm working on, its an MVC site with a few legacy web form pages, I'm trying to run a unit test to test a method which reads an xml file and would like to use something like Server.MapPath to get the location of the file so I have annotated the test as follows
When I run the test I get the following error:
Result Message: MSTestAdapter could not run the test as the classic mode helper is not available. It can occur if the test settings has been selected or you are using attributes like HostType, UrlToTest, Credential or DataSource in your test. Either unselect the test settings or remove these attributes from the test and try again.
I have unchecked any test setting files which hasn't made a difference. I've also tried the aspdevelopmentserver annotation aswell. Any ideas?
Thank you for posting in the MSDN forum.
Just to make this issue clearly, do you mean that you are using VS 2012 Rc? If you create a simple asp.net app, and then create a unit test for it, does it work?
About unit test for asp.net, if possible, you could check this MSDN document “Unit Tests for ASP.NET Web Services”. Hope it could help.
Have a nice weekend,
Jack Zhai [MSFT]
MSDN Community Support | Feedback to us
Host adapters (including ASP.Net host adapter) are not available in VS 2012 Express for Windows Desktop. You will need to install the Premium, Professional or Ultimate flavours.
- Proposed as answer by Diganta RoyMicrosoft employee Wednesday, September 19, 2012 2:46 AM