Creating a Project4:42 with James Churchill
Let's use Visual Studio Community to create our ASP.NET MVC website project.
If you want to learn more about how to use GitHub with Visual Studio, be sure to check out this workshop.
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.
For first time users, Visual Studio can be a little overwhelming. 0:00 There's a lot happening in the user interface, especially when compared to 0:04 work spaces, here at Treehouse or other text editors, like Sublime Text or Adam. 0:08 For now, we're going to just focus on the parts that we need and 0:13 ignore everything else. 0:17 Let's open Visual Studio and create our project. 0:19 To start the process, click on the File, New, Project menu item, in the top menu. 0:23 This opens up the New Project dialog. 0:31 Using the tree view on the left-hand side, 0:34 we can filter the available project templates by our language in platform. 0:36 We're interested in doing web development using C#, so let's select our language, 0:41 Visual C#, which was already selected, then our platform, Web. 0:46 Now we're seeing just the project templates that are specific 0:51 to the web platform. 0:54 The first and only item in the list, the ASP.Net Web Application project template, 0:56 is the one that we're looking for. 1:01 Go ahead and click it to select it. 1:03 Notice the panel on the right-hand side of the dialog for Application Insights. 1:06 Application Insights is a powerful application profiling tool, but in 1:11 the spirit of keeping things simple, make sure that this checkbox is not checked. 1:15 Let's take a closer look at this combo box, near the top of the dialog. 1:21 If we open this combo box, 1:25 we'll see a list of the .NET Framework versions that we currently have installed. 1:27 The .NET Framework is updated over time with new features and bug fixes, so 1:32 it's not unusual to have more than one version installed. 1:36 I'm gonna select the latest version in the list, which for me is 4.6.1. 1:39 Don't worry if your version is newer than mine, 1:46 as .NET is constantly updating for the better. 1:49 Next, let's go to the bottom of the dialog and 1:52 change our project name to something other than WebApplication1. 1:54 How about, MyFirstWebsite. 1:58 Let's go ahead and leave the default values for the Location and 2:05 Solution name fields, and make sure that the Create directory for 2:08 solution checkbox is checked, and the Add to source control checkbox is not checked. 2:13 While we're not using a version control system for this workshop, rest assured, 2:19 Visual Studio plays nicely with popular tools like Git or GitHub. 2:23 For information about this, see the teacher's notes. 2:28 Click the OK button to continue to the next step. 2:31 Now we're presented with the second step in the process, 2:35 the new ASP.NET Project dialog. 2:38 Within this dialog, we can view and 2:42 select the specific ASP.NET Project template that we want. 2:44 For now, let's focus in on the ASP.NET 4.6.1 template section, 2:48 and in particular, the third item in the list, the MVC Project template. 2:53 Future releases of ASP.NET might diverge significantly from the version that 3:00 I'm using here, so make sure that you're using one of the 4.x templates. 3:04 On the right-hand side of the dialog, we can specify the authentication options for 3:08 our project. 3:13 By default, Visual Studio will include support for individual user accounts. 3:15 That allows users to register and log in to our website. 3:20 Again, let's keep things simple and remove that option. 3:24 To do that, click the Change Authentication button, 3:27 and then select the No Authentication option, then click OK. 3:31 This will make it so 3:36 that anybody could visit our website if we were to publish it on a public server. 3:37 Lastly, make sure that the Host in the cloud checkbox, 3:42 listed underneath the Microsoft Azure section, is not selected. 3:45 While that deployment option would be helpful, 3:50 if we were planning on deploying our application to the cloud, 3:52 that's not something we're going to cover in this workshop. 3:55 If you're interested in deploying your website to the cloud or 3:58 a hosting provider, again, check the teacher's notes for a list of resources. 4:00 Now that we have all of our options set, go ahead and click the OK button. 4:05 Visual Studio will start to create our project, 4:10 displaying the status in the dialog, at the center of the screen. 4:13 Once the dialog has closed, we now have our project. 4:18 Seems like a lot of steps, doesn't it? 4:23 The first time that you create a new project, it can seem a little daunting, 4:26 but with a little practice, it will start to feel familiar in no time. 4:30 Let's take a short break. 4:34 When we return, we'll use Visual Studio to run our website so 4:36 that we can preview it in a browser. 4:39 See you in a bit. 4:41
You need to sign up for Treehouse in order to download course files.Sign up