1 00:00:00,560 --> 00:00:02,300 That's enough about layout. 2 00:00:02,300 --> 00:00:04,930 Let's get to what Visual Studio is really about. 3 00:00:04,930 --> 00:00:07,220 Trading apps and programs. 4 00:00:07,220 --> 00:00:12,360 Visual Studio is a project centric IDE, which means all the code and 5 00:00:12,360 --> 00:00:16,060 other files that make up your app are organized into a project. 6 00:00:17,100 --> 00:00:18,570 When starting on a new app, 7 00:00:18,570 --> 00:00:22,770 the first thing you need to do is create a project in Visual Studio. 8 00:00:22,770 --> 00:00:24,390 Let's do that now. 9 00:00:24,390 --> 00:00:30,020 To create a new project, click on file then mouse over new and click project. 10 00:00:30,020 --> 00:00:32,570 This opens the new project dialog. 11 00:00:32,570 --> 00:00:35,750 What you see listed here are project templates. 12 00:00:35,750 --> 00:00:40,205 In visual studio all new projects are created from a template. 13 00:00:40,205 --> 00:00:43,575 The template provides a starting point for your project. 14 00:00:43,575 --> 00:00:46,335 You'll see what this means once we create a project. 15 00:00:46,335 --> 00:00:49,525 Templates are organized based on programming language. 16 00:00:49,525 --> 00:00:52,645 So if I click on visual C# we'll see 17 00:00:52,645 --> 00:00:55,800 all the different types of projects that we can make using C#. 18 00:00:57,030 --> 00:01:00,570 You can reduce the list even more by clicking on a subcategory. 19 00:01:00,570 --> 00:01:04,340 Remember in the Installer where we could customize the installation by 20 00:01:04,340 --> 00:01:06,720 adding additional features and tools. 21 00:01:06,720 --> 00:01:10,030 Well, it's all right if you chose not to install those things. 22 00:01:10,030 --> 00:01:11,820 You can do it here if you want. 23 00:01:11,820 --> 00:01:14,330 I don't have the universal Windows tools available, but 24 00:01:14,330 --> 00:01:15,728 I can install them here if I want. 25 00:01:15,728 --> 00:01:17,840 If I double-click on this, 26 00:01:17,840 --> 00:01:22,720 Visual Studio will install everything I need to create universal Windows apps. 27 00:01:22,720 --> 00:01:26,140 Once it's installed, I'll see even more templates to choose from here. 28 00:01:27,820 --> 00:01:30,030 There are lots of other project types. 29 00:01:30,030 --> 00:01:32,360 For instance, you might want to create a web app. 30 00:01:32,360 --> 00:01:34,940 You'll find a template for that under Web. 31 00:01:36,060 --> 00:01:37,280 If you click on the template, 32 00:01:37,280 --> 00:01:41,660 you'll get a brief description of what the template is used for on the right side. 33 00:01:41,660 --> 00:01:45,900 As you can see the ASP.net web application project template 34 00:01:45,900 --> 00:01:50,770 can be used to create webform, MVC, or web applications. 35 00:01:50,770 --> 00:01:53,460 As you can see, there are lots of project types. 36 00:01:53,460 --> 00:01:55,680 I could teach a whole course on each one of them. 37 00:01:55,680 --> 00:01:59,198 For now, let's create a project from one of the simplest templates. 38 00:01:59,198 --> 00:02:02,020 In the C# Basics Treehouse course, 39 00:02:02,020 --> 00:02:04,580 I create a simple Windows console application. 40 00:02:04,580 --> 00:02:09,420 You'll find the template for this under Classic Desktop in the Windows category. 41 00:02:09,420 --> 00:02:12,120 To create a Windows console application project, 42 00:02:12,120 --> 00:02:15,640 I'll select the Console Application template by clicking on it once. 43 00:02:16,640 --> 00:02:18,390 I'll give this project a name. 44 00:02:18,390 --> 00:02:22,500 The name entered here becomes the default namespace for the code. 45 00:02:22,500 --> 00:02:26,300 So it's best to pick a name that's formatted like a namespace name. 46 00:02:26,300 --> 00:02:31,600 That is, CamelCase with each word capitalized and no spaces between words. 47 00:02:31,600 --> 00:02:35,670 The name also becomes the name of the assembly that's produced. 48 00:02:35,670 --> 00:02:37,900 You notice that by convention, 49 00:02:37,900 --> 00:02:42,030 most C# assemblies are named after their namespace name. 50 00:02:42,030 --> 00:02:46,340 I'm going to name this one Treehouse.SimpleConsuleApp. 51 00:02:46,340 --> 00:02:49,800 We can pick a directory for the project files and code to go here. 52 00:02:49,800 --> 00:02:52,230 You might be wondering what a solution is. 53 00:02:52,230 --> 00:02:55,070 A solution is a collection of projects. 54 00:02:55,070 --> 00:03:00,320 Most apps, other than the most basic ones, are made up of more than one project. 55 00:03:00,320 --> 00:03:05,290 At the very least, you'll probably have a separate project that contains your tests. 56 00:03:05,290 --> 00:03:07,260 If you are going to have multiple projects, 57 00:03:07,260 --> 00:03:09,810 you probably want them all in the same directory. 58 00:03:09,810 --> 00:03:14,540 In that case, you should check the create directory for solution check box. 59 00:03:14,540 --> 00:03:17,730 The solution name field here lets you decide what you want that 60 00:03:17,730 --> 00:03:19,650 top level directory named. 61 00:03:19,650 --> 00:03:22,530 This add to source control check box tells 62 00:03:22,530 --> 00:03:26,450 Visual Studio that we want it to use a version control system. 63 00:03:26,450 --> 00:03:30,280 We can pick which system we want to use after clicking OK. 64 00:03:30,280 --> 00:03:34,080 The basic install of Visual Studio lets you decide between 65 00:03:34,080 --> 00:03:36,330 team foundation server or GIT. 66 00:03:36,330 --> 00:03:38,690 For this workshop, I'll leave this unchecked. 67 00:03:38,690 --> 00:03:42,520 Finally, we can pick which version of the .NET Framework to use. 68 00:03:42,520 --> 00:03:45,750 In most cases, we want to use the latest. 69 00:03:45,750 --> 00:03:48,503 Now I can click OK to create the project.