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

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

    - https://aka.ms/dotnet-download

/root/.nuget/packages/microsoft.aspnetcore.razor.design/2.2.0/build/netstandard2.0/Microsoft.AspNetCore.Razor.Design.CodeGeneration.targets(79,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 

<PropertyGroup>
    <TargetFramework>netcoreapp2.2</TargetFramework>
<PropertyGroup>

- If you build your docker image using a different Dot Net version and your asp.net 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 asp.net core image version 3.0 you must downgrade to asp.net core version 2.2 and build your docker image again.

rzc discover exited with code 150 asp.net mvc asp.net core errors asp.net web forms asp.net machine account Technology published

Buy Me Coffee


Was this page helpful?

Yes Yes! this solution to the problem was helpful. No No! this solution to the problem was not helpful..
Buy Me Coffee


Please Login to Continue

How to Draw Realistic Photos (E-Book)

How to Draw Realistic Photos (E-Book)

$1

Why Software Development Need Ethics to Succeed (E-Book)

Why Software Development Need Ethics to Succeed (E-Book)

$1

How to Make a Social Media Website in Easy Steps

How to Make a Social Media Website in Easy Steps

$1




© 2020 - ErnesTech - Privacy