Bug 221 - Add New File should default to 'C# code file' for C# projects
Summary: Add New File should default to 'C# code file' for C# projects
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: Trunk
Hardware: PC Mac OS
: High major
Target Milestone: ---
Assignee: Mikayla Hutchinson [MSFT]
Depends on:
Reported: 2011-08-08 06:29 UTC by Alan McGovern
Modified: 2012-04-24 10:34 UTC (History)
4 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Alan McGovern 2011-08-08 06:29:18 UTC
Currently if I want to add a new class to my solution my method is:

1) Right click on the correct folder and choose 'Add New File'
2) Press tab 5 times so that I can select 'C# code file' as the file type.
3) Type the name
4) Press enter.

If the default selection were 'C# code file' I wouldn't have to press tab 5 times.
Comment 1 Joseph Hill 2011-11-16 14:15:17 UTC
This is probably a regression.  It probably used to select the most recently used file type.
Comment 2 Miguel de Icaza [MSFT] 2012-04-13 11:57:00 UTC
This is incredibly annoying, we need to raise the priority of this.

Who owns the shell?
Comment 3 Mike Krüger 2012-04-15 02:41:35 UTC
I did an 'auto select' for the file template - but I doubt that this is the best solution. 

During the UI update we should have an intelligent add menu, that changes depending on the project type which gives shortcuts to the 3-4 reasonable choices.

  File... (launches the dialog)
  GUI Dialog
  GUI Widget
For monotouch projects it could be:

  File... (launches the dialog)
  XIB (or storyboard)

... etc. and if you select 'class' no dialog is launched but the name is edited in the project browser - and this name is linked to the class name in the file.
Comment 4 Mike Krüger 2012-04-24 10:34:17 UTC
closing that one.