在Visual Studio 2015社区中找不到单元测试

编程入门 行业动态 更新时间:2024-10-24 19:26:01
本文介绍了在Visual Studio 2015社区中找不到单元测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

Visual Studio 2015产品之间的比较表明,单元测试是社区版本的一部分.www.visualstudio/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.www.visualstudio/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 communityUpdate 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.

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

最好的问候,

肖湖

更多推荐

在Visual Studio 2015社区中找不到单元测试

本文发布于:2023-11-16 10:01:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1603279.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:中找   单元测试   社区   Visual   Studio

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!