Is System.Web.Security.MembershipCreateStatus inaccessible from a test project?

I have encoded a custom membership provider and I want to run some unit tests against it. However, whenever I create a Test project, I cannot access MemberhipCreateStatus. You may know that this is the type for the out parameter for CreateUser.

I am using VS2010 Ultimate and I just can’t understand why, even when I add a link to System.Web (and faithfully reference all the libraries in the membership provider project), I cannot access it.

Is there anything hindering its use in test projects?

I am targeting the 3.5 Framework.

Thanks!

+4
source share
1 answer

Well understood this ...

System.Web.ApplicationServices.dll has a System.Web.Security namespace inside it that contains an enumeration.

MSDN still indicates that it is located in System.Web.dll for environment 3.5 (http://msdn.microsoft.com/en-us/library/system.web.security.membershipcreatestatus(v=VS.90). aspx)

However, I just noticed that VS2010 does not allow creating any 3.5-module unit tests, they strengthen 4.0, so why is there a difference. My membership is 3.5, where Enum is in System.Web and unit test is power 4.0, where it is in System.Web.ApplicationServices.

Is there a reason why we can no longer create 3.5 unit tests in VS2010?

Thanks to everyone who looked at this.

+8
source

All Articles