Running an ASP. NET core project on the traditional.

Source: Internet
Author: User

New projects we want to develop with ASP. But we have a lot of legacy in our history, such as "using Javascriptservice to implement DES encryption algorithms in. NET core", we have to estimate that we will have most of the API when we wait until. NET Core 1.2 , through the Nodejs way a little curve to the taste of the salvation, many people will disagree, if you want to run our ASP. NET core project in a pure, "," at a certain time progress is difficult to do, not only some of the APIs we rely on not yet, and our large number of. Net The Framwork library is not yet migrated to. NET Standard compatible. This article is to show you how to run our ASP. NET core project in the environment above 4.5, so that we can keep up with the development of. NET Core.

Scott Hanselman wrote an article about how to reference a existing. NET Framework Project in an ASP 1.0 Web APP to show us how. NET Fra Mework runs our ASP. NET core project in over 4.5 environments. In this article, there is a picture explaining how this works:

The. NET 4.5 version and the bottom-level compiler and runtime of. NET core are the same, and ASP. NET Core 1.0 can also be run on the framework 4.6, and we are using visual Studio Update 3 when creating a Web project, there is a template:

We saw 3 ASP. NET Web Project types:

    • ASP. NET WEB application. This is the 4.6 version of ASP. NET MVC and Web API. It runs on the. NET framework.
    • The ASP. NET Core Web application runs on a platform that is across platforms. If you select it to create a project, you will be able to run your application anywhere, but you cannot reference the "full". NET Framework Assembly
    • The ASP. NET Core Web application runs on the. That's the new ASP. NET Core 1.0, which unifies the MVC and Web APIs, does not support WebForms, but runs on the windows. There are students have doubts, the latest mono 4.6 also implemented the. NET 4.5 API, the application of this project template can run on mono, the answer should be no, because Mono's underlying compiler and runtime are not unified with. NET core, but Mono is on the road, Has begun to unify the bottom of the compiler and runtime, specific people can be used to Https://trello.com/b/vRPTMfdz/net-framework-integration-into-mono, understand the specific work progress, the next stable version of Mono 4.8 should be supported, specifically refer to dockerized. NET Core 1.0.1 and. NET Framework on Mono 4.7.

We chose the ASP. NET Core Web application to run the template creation project on the.

We then create a library of 2. NET Framework 4.5, which is then referenced within the ASP:

Let's look at the Project.json of the ASP. Project.json features will be merged with Csproj and MSBuild in the near future when the visual Studio RC is released, and you'll notice ClassLIbrary1 is not listed under the highest-level dependency node, but as a framework-specific dependency like this:

Also note that in this case it is a dependency of type= "project", in which case I did not establish a NuGet package to make a reference. However, because. NET Core Toolin is a bit flawed in the preview, these flaws have to be repaired with the tools perfected.

Running an ASP. NET core project on the traditional.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.