I coded a custom Membership provider and I want to run some Unit tests against it. However, whenever I create a "Test" project, I can't access MembershipCreateStatus. You may know that this is a type on an out parameter for CreateUser.
I am using VS2010 Ultimate and just can't seem to grasp why, even when I add a reference to System.Web (and for good faith a reference to all the libs in the membership provider project), I can't access it.
Is there something preventing it from being used in Test projects?
I am targeting 3.5 Framework.
Thanks!
Ok figured it out...
System.Web.ApplicationServices.dll has a System.Web.Security namespace within it which contains the enum.
MSDN still lists it being in System.Web.dll for 3.5 framework (http://msdn.microsoft.com/en-us/library/system.web.security.membershipcreatestatus(v=VS.90).aspx)
However, I just noticed VS2010 doesn't let you create any 3.5 framework unit tests, they force 4.0 so that's why the difference. My membership is a 3.5 where the Enum is in System.Web and the unit test is force to 4.0 where it's in System.Web.ApplicationServices.
Is there a reason we can no longer create 3.5 unit tests in VS2010?
Thanks for anyone who looked at this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With