开发者

issue with nunit testing functions using nhibernate as data layer

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 funct开发者_JAVA技巧ions 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?


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.

Project Folder
|
|-- Solution.sln
|
|-- Third Party
|   |
|   |-- NHibernate.dll
|   |-- Iesi.collections.dll
|
|-- Project Folder 1
|
|-- Project Folder 2


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜