Quick Tour of the IDE

download Quick Tour of the IDE

of 29

Transcript of Quick Tour of the IDE

  • 8/13/2019 Quick Tour of the IDE

    1/29

  • 8/13/2019 Quick Tour of the IDE

    2/29

    ASP.NET

    4ou manage your environment settings from the $ools menu#s Imort and Exort Settings otion. &igure+.5 shows the first screen in this wi6ard. $his screen allows you to choose to execute either a settingsexort or an imort.

    &I/01E +.5 $he Imort and Exort Settings 7i6ard.$I*4ou can choose from several setting collections when imorting. $here are a few default collections!including those based on language and role 8such as web develoer and tester9. In addition! you canbrowse to a custom settings file. &igure +.: shows the imort settings collection otions.

    1avi Varma $humati *age + of +3

  • 8/13/2019 Quick Tour of the IDE

    3/29

    ASP.NET

    &I/01E +.: 'hoosing a collection of settings for imort.

    Another key screen to the Imort and Exort Settings 7i6ard is the settings selection screen. ,n thisscreen! you decide which otions are imortant for imort. $his allows you to ick and choose settingsyou lan to imort. &or examle! you may love the way a friend has configured her code editor in termsof font and contrasting colors! but you do not want all her other settings! such as her keyboardconfigurations. &igure +.; rovides a glimse at the granular level to which you can manage yourenvironment settings.$I*

    1avi Varma $humati *age 5 of +3

  • 8/13/2019 Quick Tour of the IDE

    4/29

    ASP.NET

    &I/01E +.; 'hoosing settings to imort.

    The Start Page+7hen you first get into the Visual Studio +

  • 8/13/2019 Quick Tour of the IDE

    5/29

    ASP.NET

    Startup Option

    If you "ust don#t like the Start *age or refer to launch directly into the ro"ect you#ll be sending thenext few months of your life working on! you can customi6e what haens when the IDE boots. &romthe ,tions dialog box 8$ools! ,tions9! choose the Environment node and then the Startu leaf. &igure+. shows some of the otions available at startu.

    &I/01E +.> $he Visual Studio +

  • 8/13/2019 Quick Tour of the IDE

    6/29

    ASP.NET

    &I/01E +. Startu otions.

    &rom here! you can configure where to get your start age news items. 4ou can also tell theenvironment to load the last solution! show the new or oen ro"ect dialog boxes! oen your browser#shome age! or do nothing 8show an emty environment9. 4ou can also configure how often your contentis automatically refreshed from the server.

    Your !irt Pro"ect

    $he next! natural ste is to create your first ro"ect. Doing so will -uickly exose you to some of the

    basic ro"ect and file management features within the IDE. &rom the &ile menu! you#re given the otionto create a new ro"ect or website. *ro"ects are simly temlates that grou files for 7indows! ,ffice!mobile! and similar executable alications 8see 'hater :! ?Solutions and *ro"ects9. 4ou can alsocreate web ro"ects that you mix with other comiled ro"ects. A website creates a set of web files that

    get romoted and managed as files 8and not comlied code9.

    &igure +.= shows a samle website inside the IDE. 7e chose '( as the target language of this website.)otice that the IDE layout is relatively generic. 4ou should exect a similar exerience for your first fewalications 8until you#ve customi6ed things9. In the following sections! we will break down the manyitems on this screen it might be useful to refer to this grahic to rovide overall context as we discuss agiven item.

    1avi Varma $humati *age > of +3

  • 8/13/2019 Quick Tour of the IDE

    7/29

    ASP.NET

    &I/01E +.= a basic '( website inside the IDE.

    The #enu $ar

    If you#ve been working with revious versions! you should find the Visual Studio +

  • 8/13/2019 Quick Tour of the IDE

    8/29

    ASP.NET

    +. E&itF $he Edit menu is used for managing items on your 'liboard and fixing mistakes with0ndo and 1edo. In addition! the Edit menu rovides access to imortant tools like &ind and1elace and IntelliSense. $he flyout menu in the grahic shows some of the advanced otions

    available from the Edit menu! such as &ormat Document! which is useful to aly yourformatting settings to the code with which you are working.

    5. %ie*F $he View menu rovides access to the multitude of windows available in Visual Studio. If

    you lose your way 8or window9 in the tool! the View menu is the best lace to look to find yourbearings. &rom here! you can access the Server Exlorer! Solution Exlorer! $ask Gist! and otherkey windows of the IDE. $he flyout menu shows the ,ther 7indows otionCthe many! manywindows of Visual Studio +

  • 8/13/2019 Quick Tour of the IDE

    9/29

    ASP.NET

    ;. +e,iteF $he 7ebsite menu is available only when you#re working with web alications. Itrovides access to add new items! add references to your web alication! coy your website toa deloyment location! and work with ro"ect deendencies. 4ou can also set the start age forthe alication and access AS*.)E$ configuration otions for the given website.

    >. *ro"ect $he *ro"ect menu is similar to the 7ebsite menu but is available to nonHwebbasedro"ects. &rom here! you can add new items and references to your ro"ects! set the starturo"ect! and change the build order for ro"ects in your solution. In addition! you can access the*roerties for a given ro"ect. $his will allow you to set things such as the version of the .)E$&ramework you are targeting! the default namesace! and many more items.

    1avi Varma $humati *age 3 of +3

  • 8/13/2019 Quick Tour of the IDE

    10/29

  • 8/13/2019 Quick Tour of the IDE

    11/29

    ASP.NET

    2

  • 8/13/2019 Quick Tour of the IDE

    12/29

    ASP.NET

    25. Tet-$he $est menu enables you to manage tests in Visual Studio. &or examle! you can useotions on this menu to create a new test! manage existing tests! and measure testeffectiveness. 4ou can also launch test runs from here.

    2:. +in&o*-$he 7indow menu allows you to manage the oen windows in the IDE. 4ou can hidewindows! close all oen windows! and turn an existing window such as the Solution Exlorerfrom a docked window into a tabbed document.

    2;. elp- $he el menu rovides direct access to all the hel otions available from Visual Studio.&or examle! you can turn on dynamic hel from the el menu doing so will have the IDEtracking your context and roviding hel as you need it. $he el menu also takes you to the%SD) forums! and lets you reort a bug! review samles! and more. &inally! you can check forudates from here and! of course! access the hel library.

    1avi Varma $humati *age 2+ of +3

  • 8/13/2019 Quick Tour of the IDE

    13/29

    ASP.NET

    The #an/ Tool,ar

    Visual Studio +

  • 8/13/2019 Quick Tour of the IDE

    14/29

  • 8/13/2019 Quick Tour of the IDE

    15/29

    ASP.NET

    &I/01E +.22 $he 'ustomi6e dialog#s 'ommands tab.

    $he )ew button enables you to create new toolbars to grou existing commands. $his gives you a greatdeal of customi6ation otions. ,nce it#s clicked! you name your new toolbar and use the 'ommands tabto add items. 4ou can also drag commands off other toolbars and lace them on your new one.

    4ou can also configure your keyboard shortcut combinations from the 'ustomi6e dialog. 0se theKeyboard button to bring u the ,tions dialog to the environment#s keyboard otions screen. &igure+.2+ shows an examle. &irst! you find a command in the list next! you ress a shortcut key to ma 8orrema9 a combination. )otice that if the otion is already assigned a shortcut key! Visual Studio warnsyou before you make the reassignment.

    7e recommend that you do some of your own exloration into the many toolbars 8and toolbarcustomi6ation otions9 within Visual Studio. ,ften their usefulness resents itself only at the rightmoment. &or instance! if you are editing a 7indows form! having the Gayout toolbar available to tweakthe osition of controls relative to one another can be a very valuable timesaver. Knowing that these

    toolbars are available will increase the likelihood that you#ll benefit from their value.

    1avi Varma $humati *age 2; of +3

  • 8/13/2019 Quick Tour of the IDE

    16/29

    ASP.NET

    +&I/01E +.2+ ,tions dialog keyboard assignments.

    The Tool,o1

    $he Visual Studio +

  • 8/13/2019 Quick Tour of the IDE

    17/29

    ASP.NET

    &I/01E +.25 $he Visual Studio $oolbox configured for a web form.

    1avi Varma $humati *age 2 of +3

  • 8/13/2019 Quick Tour of the IDE

    18/29

  • 8/13/2019 Quick Tour of the IDE

    19/29

    ASP.NET

    Additionally! many of the designers have their own toolbars. )ote that this grahic that the Gayouttoolbar is shown when you#re working with forms. $his allows you to easily osition controls relative toone another.

    &I/01E +.2; $he 7indows &orms Designer.

    The Te1t E&itor

    Visual Studio +

  • 8/13/2019 Quick Tour of the IDE

    20/29

    ASP.NET

    from having to look u 8or memori6e9 every ob"ect library and keyword. It grous code into blocks itrovides color codes for keywords and comments it highlights errors it shows new code relative toreviously comiled code. All in all! the Visual Studio code editor does -uite a bit to kee youroductive.

    C2 Co&e E&itor

    &igure +.2> shows the '( code editor. Some items to note include the followingF

    $he code is groued into logical sections along the left side. 4ou can use the minus signs to

    close u a whole class! method! roerty! or similar grou. $his caability allows you to hidecode you are not working on at the moment. 4ou can also create your own custom! namedregions to do the same thing.

    )ew code is signaled inside the section grous with a colored line. 4ellow is used for new code

    that has yet to be saved. $he highlighted line turns green after a save and disaears after youclose and reoen the file. $his feature allows you 8and the editor9 to track where you have madechanges to code during your current session.

    $he name of the oen code file is listed as the code window#s tab across the to. $he asterisk

    indicates that the code has changed since the last time it was saved.

    IntelliSense is invoked as you tye. 4ou can use the arrow keys to -uickly find the item in the

    list. overing over the item shows details for the given item 8ti text to the right9. 4ou can ressthe $ab key to comlete the item from IntelliSense.

    $he code is highlighted in various colors. By default! keywords are blue! comments are green!

    text is black! tyes you create are light blue! string values are red! and so on.

    &I/01E +.2> $he '( code editor.

    1avi Varma $humati *age +< of +3

  • 8/13/2019 Quick Tour of the IDE

    21/29

    ASP.NET

    $he two drodowns at the to of the code editor allow you to navigate between the classes in

    the file 8leftside drodown9 and methods! fields! and roerties within a given class 8rightsidedrodown9.

    The %iual $aic Co&e E&itor

    $he Visual Basic code editor works much the same way as the '( editor. &igure +.2 shows the same

    code as in &igure +.2> written inside the Visual Basic code editor. Some of the differences between theeditors are as listed hereF

    ori6ontal lines are used to searate methods and roerties within the editor.

    $he IntelliSense drodown list is filtered into a common subset and all the ossible values.

    $he code navigation drodowns at the to of the code editor allow you to navigate the entire!

    active ob"ect hierarchy 8including events9. $he leftside drodown shows namesaces! ob"ects!and events. $he rightside drodown shows all methods for the given tye! including those youhave not yet overridden. $he items you have imlemented are highlighted as bold within thelist.

    &I/01E +.2 $he Visual Basic code editor.

    E&itor Cutomi0ation

    )early every asect of the text and code editors can be customi6ed to your every whim. &rom ourexerience! it seems no two develoers see their code the same way. 4ou can use the ,tions dialog8$ools! ,tions9 to change the editor#s background color or the color and font of various text within the

    1avi Varma $humati *age +2 of +3

  • 8/13/2019 Quick Tour of the IDE

    22/29

    ASP.NET

    editor. 4ou can also turn on line numbering! and manage indenting 8tabs9 and white sace. $he full listof customi6ations for the text editor is large. 4ou can set language and editorsecific otions.

    &igure +.2= shows the ,tions dialog box set for &onts and 'olors. &rom here! you can tweak the manydislay items in the editor in terms of their color! font! and font si6e. If you dig a little deeer in the,tions dialog box! you will come across the $ext Editor node in the otion tree. &rom here! you canmaniulate even more settings for the text editor. &or examle! you can remove the hori6ontal

    rocedure searators in the Visual Basic editor or turn off the automatic reformatting of code by theeditor. Even better! you can control how the editor automatically formats your code inside the '( editor.If you like to see all your curly braces on searate lines or refer them to start on the line that starts theblock! you can do so from here. &igure +.23 shows some of the otions available for formatting '(inside the editor.

    +

    &I/01E +.2= $he ,tions dialog box set to &onts and 'olors.

    1avi Varma $humati *age ++ of +3

  • 8/13/2019 Quick Tour of the IDE

    23/29

    ASP.NET

    &I/01E +.23 'ontrolling code formatting from the ,tions dialog box.

    The Solution E1plorer

    $he Solution Exlorer allows you to grou and manage the many files that make u your alication. Asolution simly contains multile ro"ects 8alications9. A ro"ect grous files related to its tye. &orinstance! you can create a website! 7indows &orm alication! class library! console alication! andmore. $he files inside the ro"ect containers reresent your code in terms of forms! class files! L%G! andother related items.

    $he Solution Exlorer is the lace where you tyically start when adding a new item 8class! image! form9to your alication. It is also used to access these items. Doubleclicking an item in the SolutionExlorer oens the given designer or editor associated with the tye of file you re-uest. &or examle!oening a file with the extension .cs oens the '( code editor. &inally! you also use the Solution

    Exlorer during source control scenarios to check items in and out of the source database.

    &igure +.+< shows the Solution Exlorer undocked from the IDE. )ote that a single solution is oen 8thatis the limit9! and the solution contains a few alications 8called projects9. ,ne is a 7indows formalication 8Admin0I9 another is a website 8'ontoso9 the ro"ect at the bottom is a class library8Services9.

    1avi Varma $humati *age +5 of +3

  • 8/13/2019 Quick Tour of the IDE

    24/29

    ASP.NET

    &I/01E +.+< $he Visual Studio +

  • 8/13/2019 Quick Tour of the IDE

    25/29

    ASP.NET

    &I/01E +.+2 $he *roerties window in Visual Studio +

  • 8/13/2019 Quick Tour of the IDE

    26/29

    ASP.NET

    designing a form. In this case! you should unin 8hide9 the various extraneous windows in your IDE.)ote that when a window is uninned! a vertical tab reresents the window 8see the Solution Exlorertab in &igure +.++9. %oving the mouse near this tab will result in the window unfolding for your use.After you use it! however! it will go back to its hiding sot. Alternatively! you might be working to drocontrols on that form. In doing so! you might want to in 8stick oen9 the $oolbox window 8see &igure+.++9. $his kees oen "ust the window you are working with and closes everything else.

    &I/01E +.++ *inned and uninned windows in the IDE.

    Docking

    Docking is the rocess of connecting windows to various sticky sots within the IDE. $yically! thismeans docking to the left! to! right! or bottom of the IDE. &or examle! the $oolbox is! by default!docked to the left side of the IDE. 4ou may refer to ut it at the bottom of the screen! docked belowthe active designer 8see &igure +.+59. 4ou can also dock windows to one another. &or examle! you maywant to dock the *roerties window below the Solution Exlorer. ,r you may want the *roerties

    window to be a tab within the same window to which the Solution Exlorer is docked 8see &igure +.+59.

    $o hel with docking! Visual Studio +

  • 8/13/2019 Quick Tour of the IDE

    27/29

    ASP.NET

    &I/01E +.+5 Some docking otions in the IDE.

    1avi Varma $humati *age + of +3

  • 8/13/2019 Quick Tour of the IDE

    28/29

  • 8/13/2019 Quick Tour of the IDE

    29/29

    ASP.NET

    &I/01E +.+; $he IDE window otions.

    Summar/

    $he whirlwind tour is over. 7e#ve covered the standard items you#ll encounter when "ourneying out onyour own. 7e hoe you#ve found your bearings and can begin ushing onward.