Join Chris Woodruff for an in-depth discussion in this video Create the ASP.NET Core project, part of ASP.NET Core: Internationalization.
- [Narrator] Let's get in Visual Studio Code to create our new ASP.NetCorps web project. Since Visual Studio Code is a very long name, I'm going to be calling it VS Code from now on. We're going to create a new ASP.NetCorps project. If you know how to do this, you can just skip ahead to the next video. Create a new folder on your desktop for your project. Let's call it global because we will be globalizing the project to work with cultures in future videos.
Now let's open up Visual Studio Code, and open up the folder that we just created. .NetCorps works with many different templates that can create projects of different types from a terminal. Luckily, VS Code has a built-in terminal. Find the view menu dropdown and select integrated terminal or just use the keys control and tick symbol. Now let's create simple ASP.NetCorps web project.
This will not be a full MVC project. We will be using that in future chapters. In a terminal type dot net new web. ASP.NetCorps is staging our project in the folder. As you can see, there's a global.csproj. That takes the name of our project from the folder that it exists in.
There's also a Program.cs and startup.cs. To build our application, all we have to do is type .net build. Let's make sure this compiles and builds correctly. Finally, to run it, we type dotnet run. Okay, so unlike Visual Studio 2017, when we run our project, a browser doesn't automatically appear.
So what we have to do is... there's a quick and easy little shortcut. If you hover over the URL in the terminal, you'll see that there's a message that says control plus click to follow link. So press down control, hit the link, and you will get a browser that opens up for our project. It's a very boring project, I know. It just says, "hello world," but it works. Now let's go back to Visual Studio Code and shutdown the application.
To do that, all we have to do in the terminal is do a control C. Now that you know how to make a ASP.NetCorps web project, let's move on.
- Globalization and localization
- Internationalization considerations
- Creating the ASP.NET Core project
- Using the HTTP Accept-Language header
- Using the ASP.NET Core store project
- Displaying content with the controller
- Modifying the views
- Selecting a culture with cookies
- Systems of measurement formats