2

I am trying to launch a test but I obtain this error

The type 'System.Web.Security.MembershipUser' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

I looked for google and found that I have to Add Reference System.Web.ApplicationServices to my project, i do it but still dont work.

I wrote it in web.config to but nothig, I obtain the same error

  <assemblies>
 <add assembly="System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      </assemblies>

Any idea!!! Thanks.

NoWar
  • 36,338
  • 80
  • 323
  • 498
user852610
  • 2,205
  • 7
  • 36
  • 46
  • http://stackoverflow.com/questions/11161203/where-is-system-web-security-membershipprovider http://stackoverflow.com/questions/4708280/class-library-cant-find-membershipuser Basically you can find this System.Web.ApplicationServices.dll under `C:\Windows\Microsoft.NET\Framework\v4.0.30319` – NoWar Oct 30 '13 at 23:39

1 Answers1

4

When do you get this problem? When building your project, or when actually running the test?

If you get it when you build your project, follow these steps to see if it resolves your problem:

1 - Search your machine for this file: "System.Web.Security.MembershipUser.dll"

2 - Once you find it, open your project and choose the "Add Reference" menu command

3 - Choose the file you found in step 1

JosephStyons
  • 57,317
  • 63
  • 160
  • 234
  • Thanks JosephStyons, but what happen if I don't have this file... System.Web.Security.MembershipUser.dll – user852610 Jul 21 '11 at 18:20
  • 1
    [This question](http://stackoverflow.com/questions/3712467/net-4-0-system-web-security-membershipprovider-ambiguous-reference) might help as well. – brheal Jul 21 '11 at 18:24