在Visual Studio 2015社区中找不到单元测试 [英] Can't find unit testing in Visual studio 2015 community versio

查看:235
本文介绍了在Visual Studio 2015社区中找不到单元测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio 2015产品之间的比较表明,单元测试是社区版本的一部分.https://www.visualstudio.com/zh-cn/products/compare-visual-studio-2015-products-vs .aspx

The comparison between visual studio 2015 offerings states that unit testing is part of the community version. https://www.visualstudio.com/en-us/products/compare-visual-studio-2015-products-vs.aspx

我在添加新项目"下找不到测试模板,也没有测试"在菜单栏上.我尝试下载nUnit和xUnit模板,但是都给出了错误消息此安装不支持的子类型".

I can't find the test templates under "add new project", and there is also no "Test" on the menu bar. I tried to download nUnit and xUnit templates, but both gave the error message "subtype unsupported by this installation".

毕竟不可能在社区版本中运行单元测试吗?

Is it not possible to run unit tests in the community version after all?

干杯

Stein

推荐答案

嗨斯坦,

感谢您的信息.

我刚刚使用VS2015社区更新1在我身边进行了测试.

I just did a test in my side using VS2015 community Update 1.

我有单元测试项目模板,请参考以下屏幕截图:

And  I have the Unit Test Project template, please refer to the screenshot below:

所以我想 测试模板丢失或未安装或发生某些问题

So I suppose the test template was missing or not installed or some problem occurred

您可以尝试在VS2015中还原模板,然后重试.

You could try to restore the template in VS2015 then try it again.

1.删除ItemTemplatesCache,ProjectTemplatesCache文件夹(C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ Common7 \ IDE)

1. Delete the ItemTemplatesCache, ProjectTemplatesCache folder (C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE)

2.在命令提示符下,导航到devenv.exe的位置.该文件位于< Visual Studio安装路径> \ Common7 \ IDE.

2. In the command prompt, navigate to the location of devenv.exe. This file is located in <Visual Studio Installation Path>\Common7\IDE.

3.输入"devenv/installvstemplates"然后按Enter.

3. Type "devenv /installvstemplates" and press Enter.

如果仍然没有帮助.我想您的Visual Studio可能有问题.尝试修复它,然后再试一次.或者,您可以安装VS2015 Update1.

If still no help. I suppose there might be something wrong with your Visual Studio. Try to repair it then try it again. Or you could install VS2015 Update1.

如果以上建议仍然无济于事.我认为您可能需要卸载所有VS2015社区.然后下载VS2015社区安装软件包,然后重新安装.

If above suggestions still no help. I think you may need to uninstall all your VS2015 Community. Then download the VS2015 Community installing package then reinstall it.

请参考以下链接下载VS2015社区更新1.

Please refer to the following link to download the VS2015 Community update1.

https://www.visualstudio.com/en-us/downloads /download-visual-studio-vs.aspx

最好的问候,

肖湖


这篇关于在Visual Studio 2015社区中找不到单元测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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