title: How to fix error: "rzc generate exited with code 150"
body: <p>My .NET SDK version 5.0.400 and trying to follow an ASP.NET Core tutorial to learn C# and ASP.NET in macOs. Whenever I try to build a controller scaffold, I've been getting the following error message:</p>
  <blockquote>
  <p>&quot;rzc generate exited with code 150&quot;.</p>
  </blockquote>
  <p>Clicking on it leads me to the following path:
  <code>/.nuget/packages/microsoft.aspnetcore.razor.design/2.2.0/build/netstandard2.0/Microsfot.AspNetCor.Razor.Design.CodeGeneration.targets</code></p>
  <pre><code>&lt;RazorGenerate
        Debug=&quot;$(_RazorDebugGenerateCodeTask)&quot;
        DebugTool=&quot;$(_RazorDebugGenerateCodeTool)&quot;
        ToolAssembly=&quot;$(_RazorToolAssembly)&quot;
        UseServer=&quot;$(UseRazorBuildServer)&quot;
        ForceServer=&quot;$(_RazorForceBuildServer)&quot;
        PipeName=&quot;$(_RazorBuildServerPipeName)&quot;
        Version=&quot;$(RazorLangVersion)&quot;
        Configuration=&quot;@(ResolvedRazorConfiguration)&quot;
        Extensions=&quot;@(ResolvedRazorExtension)&quot;
        Sources=&quot;@(RazorGenerateWithTargetPath)&quot;
        ProjectRoot=&quot;$(MSBuildProjectDirectory)&quot;
        TagHelperManifest=&quot;$(_RazorTagHelperOutputCache)&quot; /&gt;
  </code></pre>
  <p>and this is my <code>.csproj</code> file:</p>
  <pre><code>&lt;Project Sdk=&quot;Microsoft.NET.Sdk.Web&quot;&gt;
  
    &lt;PropertyGroup&gt;
      &lt;TargetFramework&gt;netcoreapp3.1&lt;/TargetFramework&gt;
      &lt;UserSecretsId&gt;aspnet-jokesApp-EAACFB73-39CD-4EDF-9074-81C9C671FE8A&lt;/UserSecretsId&gt;
    &lt;/PropertyGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;None Remove=&quot;Microsoft.AspNetCore.Mvc&quot; /&gt;
      &lt;None Remove=&quot;Microsoft.VisualStudio.Web.CodeGeneration.Design&quot; /&gt;
      &lt;None Remove=&quot;Microsoft.EntityFrameworkCore.SqlServer&quot; /&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
      &lt;None Update=&quot;app.db&quot; CopyToOutputDirectory=&quot;PreserveNewest&quot; ExcludeFromSingleFile=&quot;true&quot; /&gt;
    &lt;/ItemGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;PackageReference Include=&quot;Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore&quot; Version=&quot;3.1.18&quot; /&gt;
      &lt;PackageReference Include=&quot;Microsoft.AspNetCore.Identity.EntityFrameworkCore&quot; Version=&quot;3.1.18&quot; /&gt;
      &lt;PackageReference Include=&quot;Microsoft.AspNetCore.Identity.UI&quot; Version=&quot;3.1.18&quot; /&gt;
      &lt;PackageReference Include=&quot;Microsoft.EntityFrameworkCore.Sqlite&quot; Version=&quot;3.1.18&quot; /&gt;
      &lt;PackageReference Include=&quot;Microsoft.EntityFrameworkCore.Tools&quot; Version=&quot;3.1.18&quot; /&gt;
      &lt;PackageReference Include=&quot;Microsoft.AspNetCore.Mvc&quot; Version=&quot;2.2.0&quot; /&gt;
      &lt;PackageReference Include=&quot;Microsoft.VisualStudio.Web.CodeGeneration.Design&quot; Version=&quot;3.1.5&quot; /&gt;
      &lt;PackageReference Include=&quot;Microsoft.EntityFrameworkCore.SqlServer&quot; Version=&quot;3.1.15&quot; /&gt;
    &lt;/ItemGroup&gt;
  
  &lt;/Project&gt;
  </code></pre>
  <p>I'm not sure how to debug this or how to move forward from here.</p>