Creating a Project Using Visual Studio5:13 with James Churchill
Now that we have our GitHub repo, let’s create our project.
Deploying Your Website
If you want to learn how to deploy your ASP.NET MVC website to the cloud, check out these resources.
To deploy your website to a hosting provider, check out your hosting provider's support pages for instructions specific to that provider.
Now that we have our GitHub repo, let's create our project. 0:00 If you elected to not create a repo, you can start the process of creating a new 0:04 project by clicking on file, new, project in the top menu. 0:08 If you created a repo, you can click to create a new project or 0:14 solution link in the status message here to open the new project dialog. 0:17 Using the search box in the upper right hand corner, 0:23 we can search our installed project templates. 0:25 Let's type asp.net. 0:28 Now we're seeing a list of the installed asp.net project templates. 0:31 The column here on the right shows which language the template is for. 0:35 Since we're interested in using C#, 0:40 we need to focus in on the templates for Visual C#. 0:42 That's interesting, there are two ASP.net web application C# project templates. 0:46 Turns out they're the same template. 0:52 One is installed under the web category and the other is in the cloud category. 0:54 Go ahead and click on either one in order to select it. 1:00 Notice the panel, here on the right-hand side of the dialog, for 1:03 Application Insights. 1:07 Application Insights is a powerful application profiling tool. 1:08 But in the spirit of keeping things simple, 1:13 make sure that this checkbox is not checked. 1:15 Let's turn our attention to the dropdown list near the top of the dialog. 1:18 It contains a list of the .NET framework versions that we currently have installed. 1:22 Having more than one version installed is typical 1:27 as the .NET framework is updated over time with new features and bug fixes. 1:31 I'm going to select the latest version in this list. 1:36 Don't worry if your version is newer than mine 1:38 as .NET is constantly updating for the better. 1:41 Next, let's go to the bottom of the dialog and 1:44 change our project name to comic book gallery. 1:47 Under location, we are currently saving our project in the root of our repo but 1:53 I like to keep all of my source code in a folder named SRC. 1:57 Which is a common abbreviation for source. 2:01 Keeping all of our source code in its own folder makes it easier to store 2:04 other project artifacts, like documentation in its own sibling folder. 2:08 If you're not using GitHub, go ahead and use the default location. 2:13 If you're using GitHub, 2:17 let's click the Browse button to select a new project location. 2:19 Create a folder by clicking the New Folder button. 2:22 Then click the Select Folder button to select it. 2:25 Let's go ahead and leave the default value for the solution name field and 2:28 make sure that the create directory for solution checkbox is unchecked. 2:33 Click the OK button to continue to the next step. 2:37 Welcome to the second step in the process, the new ASP.NET project dialogue. 2:40 Within this dialog we can view and 2:46 select the specific ASP.NET project template that we want to use. 2:48 At the time of this recording ASP.NET 5 now known 2:53 as ASP.NET core is still under development. 2:57 Given that, let's select the template from the ASP.NET 4.6.1 Template section. 3:00 Future releases of ASP.NET might diverge significantly from the version that I'm 3:07 using here. 3:12 So if you're following along, 3:13 make sure that you're using one of the 4.x templates. 3:15 The third template in the list is the in NVC template. 3:19 Selecting that template would create a project that contains a simple 3:22 NVC website. 3:26 While we could work with that, let's take a slightly different approach. 3:28 Let's start with an empty project by selecting the empty template. 3:32 And use the check boxes here at the bottom of the template list 3:35 to add NVC to our project. 3:39 Make sure that the hosting cloud checkbox under the Microsoft Azure section 3:41 is not selected. 3:46 If you're interested in deploying your website to the cloud, or 3:48 a hosting provider, check the teacher's notes for a list of resources. 3:51 Now that we have all of our options set, go ahead and click the OK button. 3:55 Visual Studio will start to create our project, 4:00 displaying the status in the dialogue at the center of the screen. 4:03 Once the dialogue is closed, we now have our project. 4:06 In the solution explorer panel, we can see the folders and 4:11 files that the project template provided for us. 4:14 We're not going to review everything you see here right now. 4:17 Instead, we'll touch upon the important parts, as we work through this course. 4:20 If you're using GitHub, we have one last thing to do, commit our changes. 4:25 Switch back to the team Explorer panel. 4:30 Then under the project's section, click the changes button. 4:32 Under the changes section here, 4:36 we can see a list of the files that we've added to our repo. 4:38 Here in this yellow field, we can enter a commit message. 4:41 I'm just going to call this our initial commit, then I'll click the down arrow on 4:45 the Commit button and select the Commit All and Push option. 4:50 This will commit and push our changes to the remote server. 4:54 Great job, we have a lot left to do, 5:00 but it always feels good to get the project created. 5:02 Before we start building out our website, 5:06 let's see in the next video how to run it so that we can preview it in a browser. 5:08
You need to sign up for Treehouse in order to download course files.Sign up