【发布时间】:2011-04-17 17:45:30
【问题描述】:
我在我的 C# 项目中添加了几个文件夹,现在当我尝试从 NUnit 运行项目时,我总是遇到以下异常 -
System.IO.FileNotFoundException: 找不到文件 'x\x\x\x\bin\debug\project.dll
项目 dll 文件未生成,异常详情如下:
System.IO.FileNotFoundException...
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
at NUnit.Core.AssemblyReader.CalcHeaderOffsets()
at NUnit.Core.AssemblyReader..ctor(String assemblyPath)
at NUnit.Util.RuntimeFrameworkSelector.SelectRuntimeFramework(TestPackage package)
at NUnit.Util.DefaultTestRunnerFactory.GetTargetProcessModel(TestPackage package)
at NUnit.Util.DefaultTestRunnerFactory.MakeTestRunner(TestPackage package)
at NUnit.Util.TestLoader.LoadTest(String testName)
【问题讨论】:
-
dll 确实在 `x\x\x\x\bin\debug` 中吗?还是在另一个目录中?
-
不,它不存在,我构建项目时没有生成dll。