对于消除测试错误“底层提供程序在打开时失败"的建议是什么?在"TestResults"之后文件夹被删除了吗? [英] What is the recommendation to get rid of test error "The underlying provider failed on Open" after the "TestResults" folder is deleted?

查看:71
本文介绍了对于消除测试错误“底层提供程序在打开时失败"的建议是什么?在"TestResults"之后文件夹被删除了吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VS2013,已经删除了"TestResults"代码库中的文件夹,VS2013在其中保存&运行单元测试的转储.

所以我正在得到

基础提供程序在Open上失败.

无法将文件"C:Dev \ Source \ .... \ TestResults \ sample.TE.Tests.mdf"附加为数据库"TESTS.2DDD578B-AB42-59BD-25FB-9032F8AF6184".

消除测试错误底层提供程序在打开时失败"的建议是什么?在"TestResults"之后文件夹被删除了吗?

有时,当我们重新启动计算机/重新启动vs2013时,它可以工作.


谢谢

解决方案

什么时候收到错误消息?在删除TestResults文件夹后再次运行单元测试时?当您构建单元测试项目时?

您是否在VS/VS项目的任何地方使用了该mdf文件?

通常,当我们在VS2013中运行单元测试时,它不会生成.mdf文件.请在您的解决方案中描述您的测试方案,以便我们进一步研究此问题.

我已经删除了包含.mdf文件的TestResults文件夹.当我再次运行测试时,我没有收到错误.

我发现了一个存在类似问题的线程,请检查它是否可以帮助您: http://stackoverflow.com/questions/13001441/delete-mdf-file-from-app-data-causes-exception-cannot-附加文件为数据库

最好的问候,


I am using VS2013, I have deleted the "TestResults" folder from the codebase, where the VS2013 keeps & run dumps of unit tests. 

So i am getting 

The underlying provider failed on Open.

Cannot attach the file 'C:Dev\Source\....\TestResults\sample.TE.Tests.mdf' as database 'TESTS.2DDD578B-AB42-59BD-25FB-9032F8AF6184'.

What is the recommendation to get rid of test error "The underlying provider failed on Open" after the "TestResults" folder is deleted?

It works sometimes when we reboot machine/restart vs2013. 


Thanks

解决方案

Hi,

When did you get the error? When you run the unit tests again after you delete the TestResults folder? When you build the unit test project?

Whether you used this mdf file anywhere in VS/VS project?

Generally when we run a unit test in VS2013, it will not generate .mdf file. Please describe your test scenario in your solution so that we can further look at this issue.

I have deleted a TestResults folder including .mdf file. When I run the test again, I did not get the error.

I find a thread with similar issue, please check whether it can help you: http://stackoverflow.com/questions/13001441/delete-mdf-file-from-app-data-causes-exception-cannot-attach-the-file-as-databa

Best regards,


这篇关于对于消除测试错误“底层提供程序在打开时失败"的建议是什么?在"TestResults"之后文件夹被删除了吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆