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 the 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 the 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. This error might have been resolved in the latest build.

Linda said:

Thank you.

Posted On: November 23, 2020 5:40:22 AM

© 2024 - ErnesTech - Privacy
E-Commerce Return Policy