构建 MVC6 应用程序的输出。现在效果如何?

Build output of MVC6 app. How does it works now?

我正在检查默认的 MVC 6 应用程序并在本地文件系统上发布构建。这是我检查 将源文件编译为 nuget 包

时的样子

我可以看到 3 个主要文件夹:approotlogswwwroot

approot 内部:

我可以看到我的 WebApplication1 现在是一个 nuget 包。

  1. approot>Packages>WebApplicaton1>1.0.0>app 中的 ef 文件是什么?

  2. ef 文件和 2 个 Web 文件也在 approot 中。它们是什么?

在 wwwroot: 它有我所有的静态资源,比如 css 和 js.

当我们在 IIS 或 Azure 中部署应用程序时,这一切如何落实?

已发布输出中的 efweb 文件对应于您在 [=16] 中定义的 efweb commands =] 文件。您可以在 project.json 文件中定义更多命令,所有命令都会显示在这里。

beta-8 版本开始,ASP.NET 5 在 IIS 中使用了一个名为 HttpPlatformHandler 的模块,它将 http 请求转发到外部进程...在我们的例子中它将是 dnx.exe过程。例如,您可以查看 wwwroot 下的以下 web.config 文件,其中显示了模块注册以及执行外部进程的路径...如您在此处所见 web.cmd正在使用中。

<configuration>
  <system.webServer>
    <handlers>
      <add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
    </handlers>
    <httpPlatform processPath="%home%\site\approot\web.cmd" arguments="" stdoutLogEnabled="false" stdoutLogFile="\?\%home%\LogFiles\stdout.log"></httpPlatform>
  </system.webServer>
</configuration>

这种设计也适用于非Windows场景...例如,您也可以将您的应用程序与nginx反向代理一起使用

更深入的细节可以在下面找到link:

Change to IIS hosting model