The above is for an older WebForms project. The menu changes depending on what type of project you are in. If you've used Visual Studio for a long time, it's easy to get stuck in a rut and not even pay attention to the menus, but there are actually a number of additional, context sensitive shortcut options on the Add shortcut menu: The rest of the flow works as well as you'd expect now.įWIW, the New Item dialog is a lot faster than what it used to be before Visual Studio 2015 and better yet in VS 2017 RC, now it's a matter of streamlining the workflow inside of it to make it more user friendly and more keyboard friendly especially. Ideally I would like to see the New Item search box directly above the list and focused by default. This is reasonable only if I need something more complex like a multi-file project item like a WPF form.īut for a new Class? Do we really need this much overhead to add a single file to a project? The Workflow could be easier! That's a lot of keystrokes just even with shortcuts to add a new file and that's really what counts as an optimized workflow. Tab to list and scroll to item (if necessary).Visual Studio recently added the placeholder text into the search box to make that easier to discover, but even so it's easy to miss. Luckily you can easily use the Ctrl-E search shortcut to jump to the search box. But as it is is you have to tab over to the search box or even the item selection list first. It would be much nicer if you could just start typing a type name or extension (html, xaml, ts whatever). It's nice that that's there, but it's a terrible default. You get to pick from the general project types etc. Use Ctrl-E to jump to Search in the New Item DialogĪnother annoyance is that the New Item Dialog comes up with the tree of high level options selected on the left. Looks like Visual Studio 2017 defaults Ctrl-N to New Item. You just have to make sure that you don't have a key mapping conflict and that nothing else tries to highjack the combo later. You can fix that easily enough though in the Visual Studio options: Now I would much prefer Ctrl-N is always mapped to New Item. that are related to the underlying file template used. New Item opens a new file and automatically adds it to a project and creates dependent files, adds references etc. Unlike New Item, the New File dialog opens a new file loose file and doesn't add it to the project. dialog, which although similarily named does something completely different. The obvious key - Ctrl-N - is mapped to the New File. option does not have any key association. I'm not sure because of keyboard remappings that happen mysteriously by various installed extensions, but for me the New Item. But then nobody really looks up there, do they?Īs mentioned the default short cut for New Item is not Ctrl-N. on the Project menu with Project -> New Item which is a bit easier to discover. can still be there for all the other options, but that New Item deserves a more prominent location. option should be at the very top of the first context menu - not nested - so you don't have to hunt for it. option is buried in the middle of the context menu where it's hard to see (because the text is short), and then the New Item. The New Item feature is probably the most used context menu action you use at the project level, yet the New Item option is buried in a secondary menu: Useful in some cases, but generally not applicable when you're working on a project. dialog which you want to use most of the time, is not mapped to Ctrl-N as you would expect either - no, that obvious shortcut goes to the New File dialog which creates a new file that is not added to the project. New Item or New File?ĭo you use New File or New Item? And why are these options buried? The File menu only shows New File which is the obvious place to look, but very likely the wrong choice, when you really want the New Item dialog.īy default the New File. So, here are a few annoyances and a few tips to make adding new items to a project more bearable. Dialog and how it works has to rank at the top of the list.Īdding new files to a project is a common task and honestly I think much of the criticism leveled at Visual Studio from non Visual Studio developers who first use Visual Studio can be traced back to the convoluted way of adding files to a project. When I think of things that annoy me the most in Visual Studio's IDE, the Project New Item.