- Introducing Our Sample Application
- Getting Started with Server-Side Configuration
- Fundamentals of .NET Application Structure
- Managing and Referencing NuGet Packages
- Summary
- Q&A
- Workshop
- Exercise
Getting Started with Server-Side Configuration
With prior versions of ASP.NET, the content that was delivered to a web application visitor was mixed in with the project source code. There was no clear place to point to and see the separation between the code that would execute on the server and the code that would be delivered to the web browser for execution there. Developers would go to great lengths to create scripts folders or class modules that would contain as much server-side logic as possible. Since the release of ASP.NET Core, the line between server-executed and client-side code has been very clear.
The epicenter of a server-side project is your project file, ending with a .csproj extension. This file contains all the information necessary to direct the .NET compiler (code-named Roslyn) to build the binary executable files from C# that will run on a web server and deliver content to your web visitors. The ASP.NET team has enhanced the MSBuild tool to allow a dramatic simplification in the project file format while still supporting the entire .NET ecosystem of projects.
If you get started with a template, as demonstrated in Hour 3, “Exploring the New Project Templates,” a sample project file is generated for you. For your sample project, you can start writing an empty project from scratch so that you have the same contents no matter which way you are starting an ASP.NET Core application, and we can discuss each element of the project as it is constructed. This book walks through setting up the sample project with Visual Studio Code, but most of the steps are automated in Visual Studio 2017 and with the dotnet command-line tool.