gpt4 book ai didi

.net - "Create Unit Tests"选择在哪里?

转载 作者:行者123 更新时间:2023-12-03 04:20:53 25 4
gpt4 key购买 nike

我已经安装了新的 Visual Studio 2012 Ultimate。

我已经使用我的解决方案创建了一个测试项目,它包含一些默认的单元测试。但是,右键单击新方法不再显示“创建单元测试”上下文菜单。

请参阅 Visual Studio 2010 Ultimate: enter image description here

和 Visual Studio 2012 Ultimate: enter image description here

知道为什么会这样吗?

更新:

适用于 Visual Studio 2012 和 2013 的解决方案:

微软已经承认了 here并提供 official work around patch要解决这个问题。下载、安装并享受!

最佳答案

此功能已从 VS 中删除。

http://blogs.msdn.com/b/visualstudioalm/archive/2012/03/08/what-s-new-in-visual-studio-11-beta-unit-testing.aspx

Generate Unit Test Wizard – In VS2010 you could right click on a method in your code and we would generate a unit test into your test project. This wizard was very tightly coupled to MS-Test and depended on features like Private Accessors to do its work, so it was cut. We are exploring alternatives here, but don’t have any good solutions yet.

编辑有一个解决方法:http://blogs.msdn.com/b/malaysia/archive/2013/02/20/right-click-create-unit-tests.aspx

关于.net - "Create Unit Tests"选择在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9547055/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com