In this video, discover how to update the global.json files for each solution, as well as the database connections strings.
- All of the code used in this course is available in The Exercise Files. The 1.0, 1.1, and 2.0 chapters have one solution for each of those chapters. And there's one solution for each module in the 2.1 chapter. The .NET Core command-line interface will attempt to use the latest installed SDK version. This can cause issues when trying to develop or debug a much older version as you will be doing with the 1.0 and the 1.1 versions in this course.
To use a prior version, you add a a global.json file to the working directory and you pin the version of the SDK that you want the solution to use. The 1.0, 1.1, and 2.0 solutions already have a global json file. You just need to confirm or update the SDK version based on what is installed on your machine. Remember, you can check the versions you have installed with dot net dash dash info.
To download and install the current or previous versions of the .NET Core framework, go to a browser and type in dot.net and it'll redirect you to the microsoft.com/net page, then go to downloads, scroll down and you will see here is the current SDK and Runtime for .NET Core 2.1. And if you scroll a little farther down the page, you can see .NET Core download archives.
And you'll see the installs for 2.2, which is in preview 2.1, 2.0, 1.1, and 1.0. You do not have 1.0, 1.1, and 2.0 installed on your machine, and you want to run the samples in this course you'll need to follow those links to install the appropriate SDK and Runtime. The final step is to confirm the connection strings for all the sample code. The Docker examples use SQLEXPRESS2016 as the name instance on the local machine.
In the rest of the projects we'll be using (localdb)\mssqllocaldb If your sql server instance is named differently, if you're not using sql server localdb, you will have to crack the connection string information into files. The appSettings.json file and this will be located in the SpyStore_vXX for example, 1.0, 1.1 project. In the 1.0, 1.1, and 2.0 chapters, or in the main project in the 2.1 chapter, you'll also have to update the connection string in the ApplicationDbContextFactory file.
And this is located in the SpyStoreDAL project, again, for the 1.0, 1.1, and 2.0 projects. For the 2.1 demos that use Entity Framework, you'll only need to correct the appSettings.json file and that will be located in the asp.net core project. Once you've made these changes, you'll be ready to run all of the examples in this course.
- Running and debugging ASP.NET Core applications
- Pros and cons of migrating existing applications to ASP.NET Core.
- Built-in dependency injection
- Environment awareness and app configuration
- Web host configuration and SSL
- View components invoked as tag helpers
- Configuration and logging
- Using Razor Pages
- Web API improvements
- Support for creating GDPR-compliant applications