没有VS2010 testSettings文件,VS2012 DeploymentItem无法工作 [英] VS2012 DeploymentItem does not work without a VS2010 testSettings file

查看:87
本文介绍了没有VS2010 testSettings文件,VS2012 DeploymentItem无法工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我所知,除非手动添加VS2010 TestSettings文件并启用部署,否则无法使用VS2012 DeploymentItem属性在MSTest单元测试执行期间部署文件.

问题是,如果存在TestSettings文件(这是VS2010工件),某些内容将无法正常运行...例如,System.Net.Fakes中的功能 不允许您创建Shims. /p>

这就是VS2010的工作方式;您必须启用TestSettings文件中的部署,才能通过DeploymentItem属性使用情况实际部署任何东西.

那么,如何在不添加/配置TestSettings文件的情况下使用VS2012中的DeploymentItem属性启用部署?

信息: http://msdn.microsoft.com/en-us/library/ee256991 .aspx


Sean Sullivan

解决方案

Hello Sks04,

感谢您在MSDN论坛中发帖.

仅在VS2012中支持对shim框架进行测试.

此外, 您可以部署项目如果您不想使用DeploymentItem属性进行单个测试 添加测试设置文件并启用部署.

有关详细信息,您可以参考本文: 如何:配置测试部署

我希望它能为您提供帮助.

最诚挚的问候,


As far as I can tell, you cannot use the VS2012 DeploymentItem attribute to deploy a file during an MSTest unit test execution, unless you manually add a VS2010 TestSettings file and enable deployment.

The problem is, certain things do not function if a TestSettings file exists (which is a VS2010 artifact)... functionality within System.Net.Fakes, for example,  won't allow you to create Shims.

This is how VS2010 worked; you had to enable deployment within the TestSettings file for anything to actually deploy via the DeploymentItem attribute usage.

So, how to enable Deployment using the DeploymentItem attribute within VS2012 without adding/configuring a TestSettings file?

info: http://msdn.microsoft.com/en-us/library/ee256991.aspx


Sean Sullivan

解决方案

Hello Sks04,

Thank you for posting in the MSDN forum.

Test for shim framework is only supported in VS2012.

In addition,you can deploy items for a single test using the DeploymentItem attribute, if you don't want to add a test settings file and enable the deployment.

For detailed information, you can refer to this article: How to: Configure Test Deployment

I hope it can help you.

Best regards,


这篇关于没有VS2010 testSettings文件,VS2012 DeploymentItem无法工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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