.net – 单元测试项目无法找到被测试的程序集(或依赖项)
发布时间:2020-12-13 20:26:04 所属栏目:百科 来源:网络整理
导读:当我尝试运行我的单元测试项目时,我得到以下错误: Could not load file or assembly ‘ASSEMBLY_NAME,Version=1.0.0.0,Culture=neutral,PublicKeyToken=null’ or one of its dependencies. The system cannot find the file specified. 被测试的组件位于同
当我尝试运行我的单元测试项目时,我得到以下错误:
被测试的组件位于同一个解决方案中,每个项目都定位到.NET 4.0框架. 我试图添加一个新的测试项目,但也有一个工作了一段时间,之前给了我同样的错误信息. 有没有人能指出我正确的方向? 编辑:在诊断构建日志中,出现以下错误: C:Program FilesMSBuildMicrosoftVisualStudiov10.0TeamTest Microsoft.TeamTest.targets(14,5): error : Could not load file or assembly 'ASSEMBLY_NAME,PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. Done executing task "BuildShadowTask" -- FAILED. (TaskId:671) Done building target "ResolveTestReferences" in project "ASSEMBLY_NAME.Tests.vbproj" -- FAILED.: (TargetId:985)
在查看一些额外的搜索结果后,我在SA
Private Accessor for method is not found发现了这个问题.
我删除了* .accessor文件后,我的测试项目停止了抱怨和成功编译. 大家感谢他们的帮助! (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |