Use and debug the external source code package in ASP. NET 5, asp.net source code
(This article is also published in my public account "dotNET daily excellent article". Welcome to the QR code on the right to follow it .)
Note: in ASP. NET 5, project dependencies are referenced through "packages", so it is possible to use and debug external code (such as DNX runtime.
An additional benefit of. NET open source is that it makes reference to the ASP. NET 5 function library more flexible. It can reference not only compiled packages from Nuget, but also local source code. As long as the Local Source Code complies with the packaging rules, that is, the source code root folder "src" contains the project subfolders, and the project directory contains the project. the source code referenced by the project is similar to the package downloaded from NuGet.
In this article, Rick Strahl cited "Microsoft. Framework. OptionsModel" as an example to illustrate how to reference and debug external source code packages. The procedure is as follows:
1. Download (clone) the source code to be debugged. In this step, you must select the current dependent version correctly. For example, if DNX currently uses beta4, you need to switch the source code to this tag.
2. Connect the downloaded source code to the project. Modify the global. json file in the solution root directory and add the external source code folder to "projects", as shown in:
"Dependencies": {"Microsoft. AspNet. Mvc": "6.0.0-beta4 ",... "Microsoft. Framework. OptionsModel": "1.0.0-beta4 "},
Visual Studio automatically adds the source code project as an existing project.
4. Open the external source code, find the desired part, and add the breakpoint to start debugging.
For more details, refer to "read the original article ".
Address: http://weblog.west-wind.com/posts/2015/Jun/09/Using-and-Debugging-External-Source-Code-Packages-in-ASPNET-5