问题
I'm trying to deploy a aspnet5 Project (Template vNext WebApplication from Visual Studio) to Bluemix CF Service (Asp.net). Yet it's not possible and fails with:
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
So what I figured out is that the boilerplate templates (dotnetCloudantWebstarter) doesn't have "frameworks" in their "project.json" definition which leads me to the question if dnx is installed in the cf service "asp.net" or if I am forced to work without this definition ? (if I am forced how can i still work in VS 2015 RC with it)
I would appreciate any help !
回答1:
The ASP.NET 5 buildpack in Bluemix only supports Beta3 right now. It will support Beta 4 in the near future. Please keep an eye on https://github.com/cloudfoundry-community/asp.net5-buildpack.
回答2:
I do not know since its a PaaS from bluemix. But I think I know why this deployment always fails:
it might be that bluemix uses for the PaaS (asp.net) the docker image see here in version beta3 (thats the first fail for me since the default template of VS 2015 RC needs beta4. So what I did now is to change from PaaS to a VM in Bluemix and installed the docker image by myself. Here is my configuration:
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"]
回答3:
As a comment to the answers above - a pull request that added support for beta4 was merged yesterday.
https://github.com/cloudfoundry-community/asp.net5-buildpack/releases/tag/v0.2
来源:https://stackoverflow.com/questions/30692801/deploying-a-standard-vnext-webapplication-vs-next-2015-rc-to-bluemix-fails