http://social.msdn.microsoft.com ... 3-940d-0dcf3bb70273
1. use VS2010 to create Test proj and tests then open in VS2012
2.
The menu item is still in place, but for unknown reasons it's invisible in the code editor. But you can use visual studio commands to run unit test wizard. The command you need is
EditorContextMenus.CodeWindow.CreateUnitTests
Open Command Window and type the command there.
回复: Visual Studio 2012 Right Click "Create Unit Test" is
You can create a unit test shortcut in VS2012 by:
Open Tools > Options > Environment > Keyboard
Filter Create Unit Test command by typing “createunit” in the “Show Commands Using” text box
Select It and choose “Text Editor” in “Use New Shortcut in” combo box
Press the shortcut key you want