Run the. NET core application on Linux with your own compiled coreclr and Donet CLI

Source: Internet
Author: User
Tags dotnet hosting webhost

Check out CORECLR's source code on GitHub first, run the./build.sh command to compile, and compile the results in the coreclr/bin/product/linux.x64.debug/folder.

Then check out the source code of the Dotnet CLI, run the./build.sh command to compile, and compile the results in the cli/scripts/dotnet-cli-build/bin/folder.

Then copy the compiled result file of CORECLR into the compiled results folder of the dotnet CLI:

cp/git/coreclr/bin/product/linux.x64.debug/*.

Then run the assembly of the. NET core application with your own compiled Corehost command:

#/git/cli/scripts/dotnet-cli-build/bin/corehost AboutUs.dll

AboutUs.dll is an assembly that was previously compiled with the dotnet build command. In addition to AboutUs.dll, in the same folder, also need a aboutus.deps file, if not, will be reported Could not resolve CORECLR path error.. deps file in the application Bin/debug/netsta The ndardapp1.3/ubuntu.14.04-x64/folder.

Now let's look at the results of the operation:

DBUG:MICROSOFT.ASPNETCORE.HOSTING.INTERNAL.WEBHOST[3]      Hosting startingdbug: MICROSOFT.ASPNETCORE.HOSTING.INTERNAL.WEBHOST[4]      Hosting startedhosting environment:productionapplication Base path:/git/aboutus/bin/debug/netstandardapp1.3now listening on:http://*:8001application started. Press CTRL + C to shut down.

Run successfully!

Run the. NET core application on Linux with your own compiled coreclr and Donet CLI

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.