Solved: docker-compose build core 3.0 error rzc discover exited with code 150

Problem: The .NET Core frameworks can be found at:


/root/.nuget/packages/,5): error : rzc discover exited with code 150. 

Problem: ERROR: Service 'service_name' failed to build: The command '/bin/sh -c dotnet publish -c Release -o out' returned a non-zero code: 1


[Notes]: If you have worked with docker-composer.yml file to build an Asp.Net Core 3.0 application into a Docker Container, you might have seen the error  that says "rzc discover exited with code 150" 

- This error is because of razor engine included in project.csproj file 


- If you build your docker image using a different Dot Net version and your core application references another version in .csproj this becomes an issue.

Solution: Downgrade the Asp.Net Core version in Dockerfile file in your project. E.g. if you were using an core image version 3.0 you must downgrade to core version 2.2 and build your docker image again.

Edit this Article core 3.1 mvc core errors web forms machine account Docker Docker published
Was this page helpful?
Yes Yes! this solution to the problem was helpful. No No! this solution to the problem was not helpful.. Leave ErnesTech Feedback.Feedback
If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.

Linda said:

Thank you.

Your Session is Ending
Login to Continue

© 2021 - ErnesTech - Privacy