将标准 vNext WebApplication VS Next 2015 RC 部署到 Bluemix 失败

Deploying a Standard vNext WebApplication VS Next 2015 RC to Bluemix fails

我正在尝试将 aspnet5 项目(来自 Visual Studio 的模板 vNext WebApplication)部署到 Bluemix CF 服务 (Asp.net)。然而这是不可能的并且失败了:

OUT FAILED: Writing Release YML failed, 746: unexpected token at '?{ OUT "webroot": "wwwroot", OUT "dependencies": { OUT "Microsoft.AspNet.Diagnostics": "1.0.0-beta4", OUT "Microsoft.AspNet.Mvc": "6.0.0-beta4", OUT "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta4", OUT "Microsoft.AspNet.Server.IIS": "1.0.0-beta4", OUT "Microsoft.AspNet.Server.WebListener": "1.0.0-beta4", OUT "Microsoft.AspNet.StaticFiles": "1.0.0-beta4", OUT "Microsoft.AspNet.Tooling.Razor": "1.0.0-beta4", OUT "Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4", OUT "Microsoft.Framework.CodeGenerators.Mvc": "1.0.0-beta4", OUT "Microsoft.Framework.Logging": "1.0.0-beta4", OUT "Microsoft.Framework.Logging.Console": "1.0.0-beta4", OUT "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-beta4", OUT "Kestrel": "1.0.0-beta4" OUT }, OUT "commands": { OUT "web-kestrel": "Microsoft.AspNet.Hosting --server Kestrel" OUT } OUT } OUT ' OUT . OUT ************************************************************************ OUT * WARNING: This is an experimental buildpack. It is not supported. * OUT * Do not expect it to work reliably. Please, do not * OUT * contact support about issues with this buildpack. * OUT ************************************************************************ OUT . OUT Staging failed: Buildpack compilation step failed

所以我发现样板模板 (dotnetCloudantWebstarter) 在其 "project.json" 定义中没有 "frameworks",这让我想到了是否在 cf 服务中安装了 dnx "asp.net" 或者如果我被迫在没有这个定义的情况下工作? (如果我被迫如何在 VS 2015 RC 中使用它仍然可以工作)

如有任何帮助,我将不胜感激!

我不知道,因为它是 bluemix 的 PaaS。但我想我知道为什么这个部署总是失败:

可能是 bluemix 用于 PaaS (asp.net) docker 图片参见 here 在版本 beta3 中(这对我来说是第一次失败,因为 VS 2015 RC 的默认模板需要 beta4。所以我现在所做的是从 PaaS 更改为 Bluemix 中的 VM 并自己安装 docker 图像。这是我的配置:

FROM microsoft/aspnet

RUN apt-get -qq update && apt-get -qqy --no-install-recommends install \
    git \
    unzip

RUN curl -sL https://deb.nodesource.com/setup | bash - \
    && apt-get install -qqy nodejs \
    && npm install -g grunt-cli \
    && npm install -g bower \
    && npm install -g gulp 

COPY . /app

WORKDIR /app

RUN ["dnu", "restore"]

EXPOSE 5004

ENTRYPOINT ["dnx", "project.json", "kestrel"]

Bluemix 中的 ASP.NET 5 构建包目前仅支持 Beta3。它将在不久的将来支持 Beta 4。敬请关注https://github.com/cloudfoundry-community/asp.net5-buildpack.

作为对上述答案的评论 - 昨天合并了一个添加了对 beta4 支​​持的拉取请求。

https://github.com/cloudfoundry-community/asp.net5-buildpack/releases/tag/v0.2