出错运行测试:"必须添加到程序集的引用..." [英] Error while running a test: "You must add a reference to assembly..."

查看:102
本文介绍了出错运行测试:"必须添加到程序集的引用..."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想推出一个测试,但我得到这个错误

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

该型'System.Web.Security.MembershipUser在被定义
  未引用的程序集。您必须添加到程序集的引用
  System.Web.ApplicationServices,版本= 4.0.0.0,文化=中立,
  公钥= 31bf3856ad364e35'。

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'.

我找了谷歌,我发现我不得不参考 System.Web.ApplicationServices 添加到我的项目,我做的,但仍然不工作。

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.

我写在web.config中,但理智最多,我得到了同样的错误。

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.

推荐答案

当你得到这个问题?当构建你的项目,或在实际运行测试?

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 - 搜索您的机器这个文件:System.Web.Security.MembershipUser.dll

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

2 - 一旦你找到它,打开您的项目,选择添加引用菜单命令

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

3 - 选择你在步骤找到该文件1

3 - Choose the file you found in step 1

这篇关于出错运行测试:&QUOT;必须添加到程序集的引用...&QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆