openshift .netcore 1.1 build error

206 Views Asked by At

I am trying to build a sample webapi project using VS-2017 community in openshift with .netcore 1.1 template but its an building error.

Cloning "https://github.com/kuntal-b/netcoreWebAPI" ... Commit: 84b604df745890311a7d23451c4bbef6552d1fb1 (2) Author: [email protected] Date: Thu May 25 23:11:27 2017 +0530 Pulling image "registry.access.redhat.com/dotnet/dotnetcore-11-rhel7@sha256:7c775cc11b280105f51bf2622ed79036c7f961e1cb9db23c4b17c66606154f7b" ... Pulling image "registry.access.redhat.com/dotnet/dotnetcore-11-rhel7@sha256:7c775cc11b280105f51bf2622ed79036c7f961e1cb9db23c4b17c66606154f7b" ... ---> Copying application source ... ---> Installing dependencies ... warn : The folder '/opt/app-root/src' does not contain a project to restore. ---> Building application ... Couldn't find 'project.json' in '.' error: build error: non-zero (13) exit code from registry.access.redhat.com/dotnet/dotnetcore-11-rhel7@sha256:7c775cc11b280105f51bf2622ed79036c7f961e1cb9db23c4b17c66606154f7b

Building application ... Couldn't find 'project.json' in '.' error: .net core 1.1 template don't have a project.json file.

1

There are 1 best solutions below

1
Carlos Mendible On

Using s2i with dotnetcore will only work in openshift with the old project.json based projects. This will be fixed once .net standard 2.0 is released.

Check: https://github.com/redhat-developer/s2i-dotnetcore/issues/46