How do I investigate the course of a test's assembly refusing to load in NUnit?

前端 未结 1 1030
时光取名叫无心
时光取名叫无心 2020-12-20 22:37

(This works for other people in my team, so it is likely to be something to do with the setup of my machine.)

I am using the NUnit GUI test runner. When I use File/O

相关标签:
1条回答
  • 2020-12-20 23:12

    There are a few reasons for this:

    1) Version of the .NET framework. Make sure the correct version is being loaded or define it in the configuration (app.config)

    2) Version hell: some of your assemblies use mismatched versions of other assemblies while you can have one version in your local folder. This is usually the most likely cause.

    3) You do not have a reference to an assembly but that is needed by your system and perhaps is loaded dynamically (nhibernate has some dlls like that) and these are not automatically copied to your local test bin folder. Add reference to those DLLs in your local folder.

    4) Bitness 32 bit / 64 bit if none managed code is loaded at any point

    To find out, check all above. I also suggest you run process monitor by sysinternals. On the file loading events you will see a file not found event. It takes a while to get used to but it is a really good tool.

    0 讨论(0)
提交回复
热议问题