在 Resharper 中运行 NUnit 单元测试时,我收到以下错误:
SetUp method failed. SetUp : System.IO.FileNotFoundException : Could not
load file or assembly 'Microsoft.Practices.Unity, Version=2.0.414.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.
The system cannot find the file specified.
如果我然后“重新运行失败的单元测试”,它们就会完成(尽管这可能需要多次重新运行)。似乎是因为我从 v7 升级到 Resharper v8。
运行我们正在单元测试的多个应用程序中的任何一个都不会显示此错误。我们在整个代码中都使用了 ServiceLocator 模式。