Wednesday, September 29, 2010

How to resolve unresolved type System.Web.Security.MembershipCreateStatus which appears after converting from vs2008 to vs2010

I upgraded a project I was working on from vs2008 to vs2010 and started getting an error for an unresolved type: System.Web.Security.MembershipCreateStatus.

My project was targeting the .NET Framework 3.5 and during the conversion, I selected not to change the target to the .NET Framework 4.0.

This issue was occurring in my Test project which was generated automatically when I created an MVC 2 project in vs2008. In vs2010, test projects cannot target the 3.5 Framework (by design). The quick fix was to delete AccountController.cs in the test project.

A better solution would be create another MVC2 project in vs2010 and use the generated Test project.

No comments:

Post a Comment