使用 nhibernate 作为数据层的 nunit 测试函数的问题
我对 NUnit 测试有疑问。我的 asp.net mvc 应用程序中有一个 nhibernate 数据层。我正在为模型中编写的函数编写单元测试用例。当我重建我的测试项目时,我丢失了nHibernate(Iesi.Collections.dll,Antlr3.Runtime.dll)和NUnit(nunit.core.dll,nunit.core.interfaces.dll,nunit.uikit.dll,nunit)的一些dll bin 文件夹中的 .util.dll 和 nunit-gui-runner.dll)。
这是怎么发生的?
I have an issue with NUnit testing. I have a nhibernate data layer in my asp.net mvc application. I am writing unit tests case for the functions that are written in the model. When I rebuild my Test project i loose the some dlls for nHibernate(Iesi.Collections.dll, Antlr3.Runtime.dll) and NUnit(nunit.core.dll,nunit.core.interfaces.dll,nunit.uikit.dll,nunit.util.dll and nunit-gui-runner.dll) from the bin folder.
How does this happen?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
重建基本上是“清理”操作,然后是“构建”。 “Clean”可能正在删除这些 dll。通常,您希望“bin”目录中的所有内容都在 Visual Studio 的控制之下;你手动复制了这些dll吗?
存储第三方 dll 的更好位置是将它们放在单独的文件夹中,然后在需要它们的项目中添加对它们的引用。然后,每次构建项目时,Visual Stuido 都会将这些 dll 复制到引用这些 dll 的任何项目的 bin 文件夹中。
A rebuild is basically a "Clean" operation followed by a "Build". It is possible that "Clean" is deleting these dlls. Generally you want everything in the "bin" directory to be under the control of visual studio; have you copied these dlls manually?
A better place to store thrid party dlls is to have them in a separate folder, and then add a reference to them in the projects that need them. Visual stuido will then copy these dlls to the bin folders of any projects that reference these dlls every time you build the project.
我的建议是:每个项目所需的第三方 dll 应分别放置在名为“Depends”(或任何其他名称)的文件夹中。
您可以在那里参考表格
因此解决方案中的每个项目都变得独立
My suggestion is :Third party dlls need for each project should be placed in a folder named "Depends" (or any other name) separately for each project.
and you can refer form there
Thus each project in a solution become independent