ASP.NET 4.0, Part 1: New Visual Studio ‘Code Optimized’ Profiles
Welcome to Day 1 of my tour through ASP.NET 4.0 [http://blog.hmobius.com/post/2010/02/09/ASPNET-40-Cometh.aspx]. Before we get down to looking at some actual code tomorrow, a quick note about the new settings profiles in Visual Studio 2010 for web developers and how to find a middle ground.
Having installed it, the first time you run VS2010, you’ll be asked which settings profile you want to use.
You’ll notice that there are now two options for web developers. The Web Development profile, highlighted above is the same generic profile previously encountered in VS2008 and VS2005. It makes visible the standard menu set and typical helper windows like Windows Explorer, Server Explorer, Toolbox, Properties and so on.
The second settings profile, named Web Development (code only) is new to VS2010 and aimed at those developers who prefer to write all the code rather than using the Visual Studio wizards and dialogs to generate them for you. Selecting this option will return an IDE with all but Solution Explorer and Server Explorer closed or hidden. You’ll also note in the screenshot below that both design and split view are disabled when editing aspx and html code files.
As ever, should you pick one particular profile and then wish to try the other later on, you can change up or save your own customizations by selecting Tools > Options > Import and Export Settings from the VS2010 menu bar. If you’ve not used this wizard before, here are the steps.
- You need to load a new settings profile into VS, so select “Import selected environment settings” and click next. 2. The next dialog asks if you want to save your current settings before importing new ones and where to save them if so. If you’re a fan of dark Visual Studio themes [http://www.hanselman.com/blog/VisualStudioProgrammerThemesGallery.aspx]1 or simply like to use spaces rather than tabs when formatting your HTML mark-up, now is the time to click “Yes, save my current settings”. Or, if you’d prefer essentially to reset the VS environment to a standard profile, select “No, just import new settings, overwriting my current settings”. NB It is possible to import only part of a settings profile in step 4 – but consider saving your current settings just in case, if you’re considering this route. 3. Finally, you get to choose which collection of settings to import. All the default settings you saw on first run are listed here, along with any previously saved settings you’ve made. Make a selection and press next. 4. At this point VS2010 offers you the option of importing only parts of the settings collection chosen in step 3. Check or uncheck as required and press Finish. 5. Your settings will now be imported and you’ll need to click Close to exit the wizard.
For reference, you can easily toggle the Design and Split views for web pages off and on again, by clicking Tools > Options and in the General tab, checking ‘Enable HTML designer’. You’ll need to restart VS for your changes to take effect.
Visual Web Developer - “Expert Mode” All the above information applies equally to all versions of VS2010. However, in addition, Visual Web Developer adds to this in two ways.
- First, VWD defines a third settings profile called Expert Mode. This is basically a halfway house between the standard and code optimized profiles mentioned earlier. * Second, as well as the wizard documented above, VWD lets you reset to any of the three default profiles directly from the Tools menu, as shown below.
And that’s it for today. In the next post, we’ll look at the new project solution types in VS2010 and see what they do.
1On a side note, dark themes within programming windows in VS2010 work fine, but dark themes are still not consistently inherited from windows themes. This post demonstrates this with Office [http://blog.hmobius.com/post/2008/01/12/Dark-Windows-Themes-Consistency-Not-Possible.aspx] – the same applies with VS. Just in case you were wondering.Posted on February 11, 2010 #ASP.NET #Geek Stuff