【问题标题】:Deploy ASP.NET Core without runtime and packages?在没有运行时和包的情况下部署 ASP.NET Core?
【发布时间】:2016-03-11 08:39:41
【问题描述】:

我正在 Visual Studio 中构建和部署内容,但这需要大量空间 (170 MB),因为它包含运行时 (dnx core clr) 和所有包文件。
我可以将web app 部署到windows server 并自动为我的web app 在服务器上安装运行时和所有包吗?

【问题讨论】:

  • .NET Native 即将到来,它将把它们全部压缩成一个可执行文件。所以等等等等。

标签: asp.net iis asp.net-core windows-server-2012 msdeploy


【解决方案1】:

您可以编写脚本以在安装时下载运行时。

@powershell -NoProfile -ExecutionPolicy unrestricted -Command "&{$Branch='dev';iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}"

然后可以根据您的project.json 文件使用dnu restore 命令下载依赖项。

【讨论】:

    猜你喜欢
    • 2016-08-22
    • 2020-08-04
    • 2017-03-14
    • 2014-09-26
    • 1970-01-01
    • 2022-06-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多