zoukankan      html  css  js  c++  java
  • 在Linux上用自己编译出来的coreclr与donet cli运行asp.net core程序

    先在 github 上签出 coreclr 的源代码,运行 ./build.sh 命令进行编译,编译结果在 coreclr/bin/Product/Linux.x64.Debug/ 文件夹中。

    接着签出 dotnet cli 的源代码,运行 ./build.sh 命令进行编译,编译结果在 cli/scripts/dotnet-cli-build/bin/ 文件夹中。

    然后将 coreclr 的编译结果文件复制到 dotnet cli 的编译结果文件夹中:

    cp /git/coreclr/bin/Product/Linux.x64.Debug/* .

    接着用自己编译出来的 corehost 命令运行 .net core 应用程序的程序集:

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

    AboutUs.dll 是之前用 dotnet build 命令编译出来的程序集。除了 AboutUs.dll ,在同一个文件夹中,还需要一个 AboutUs.deps 文件,如果没有,会报 Could not resolve coreclr path 的错误。 .deps 文件在应用程序的 bin/Debug/netstandardapp1.3/ubuntu.14.04-x64/ 文件夹中。

    接下来看一下运行结果:

    dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[3]
          Hosting starting
    dbug: Microsoft.AspNetCore.Hosting.Internal.WebHost[4]
          Hosting started
    Hosting environment: Production
    Application base path: /git/AboutUs/bin/Debug/netstandardapp1.3
    Now listening on: http://*:8001
    Application started. Press Ctrl+C to shut down.

    运行成功! 

  • 相关阅读:
    SVN 安装 使用指南
    使用angular-cli快速搭建项目命令
    angular 路由的引用
    c#默认类的修饰符。
    c#
    js改变dom对象样式
    jquery常用函数
    PHP 文件上传
    php 表单代码
    Python 条件语句
  • 原文地址:https://www.cnblogs.com/dudu/p/5296667.html
Copyright © 2011-2022 走看看