Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Getting errors when generate (or regenerate) entities on RAD Tool #8109


User avatar
0
jaencalo created

Hi, AspNetZero guys, greetings from Bogota, Colombia

I am using RAD Tool to create my first entity... I am getting errors on add-migration step and update-database step, when I clicked generate button... I am including the error messages... can you help me ?

-> AppPermissions.cs is being modified. -> AppAuthorizationProvider.cs is being modified. -> SamplerPADemoDbContext.cs is being modified. -> CustomDtoMapper.cs is being modified. Running add-migration... No se pudo ejecutar porque no se encontró el comando o archivo especificados. Algunas de las posibles causas son:

  • Escribió mal un comando dotnet integrado.
  • Intentó ejecutar un programa .NET Core, pero dotnet-ef no existe.
  • Tiene planeado ejecutar una herramienta global, pero no se encontró un ejecutable con prefijo dotnet con este nombre en la RUTA DE ACCESO. Running update-database... No se pudo ejecutar porque no se encontró el comando o archivo especificados. Algunas de las posibles causas son:
  • Escribió mal un comando dotnet integrado.
  • Intentó ejecutar un programa .NET Core, pero dotnet-ef no existe.
  • Tiene planeado ejecutar una herramienta global, pero no se encontró un ejecutable con prefijo dotnet con este nombre en la RUTA DE ACCESO. -> zonasGeograficas.component.ts is being generated. -> zonasGeograficas.component.html is being generated. -> create-or-edit-zonaGeografica-modal.component.html is being generated. -> create-or-edit-zonaGeografica-modal.component.ts is being generated. -> view-zonaGeografica-modal.component.html is being generated. -> view-zonaGeografica-modal.component.ts is being generated. -> admin.module.ts is being modified. -> admin-routing.module.ts is being modified. -> app-navigation.service.ts is being modified. -> service-proxy.module.ts is being modified. -> SamplerPADemo.xml is being modified.

Code generation is complete. Press ENTER to exit...


9 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    try install dotnet-ef tool.

    dotnet tool install --global dotnet-ef
    

    https://docs.microsoft.com/en-us/ef/core/miscellaneous/cli/dotnet

  • User Avatar
    0
    mfainc created

    I keep getting this error also. But when I run the following dotnet tool install --global dotnet-ef I get this error.

    C:\Windows\System32>dotnet tool install --global dotnet-ef error NU1202: Package dotnet-ef 3.0.1 is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0) / any. Package dotnet-ef 3.0.1 supports: netcoreapp2.1 (.NETCoreApp,Version=v2.1) The tool package could not be restored. Tool 'dotnet-ef' failed to install. This failure may have been caused by:

    • You are attempting to install a preview release and did not use the --version option to specify the version.
    • A package by this name was found, but it was not a .NET Core tool.
    • The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
    • You mistyped the name of the tool.

    For more reasons, including package naming enforcement, visit https://aka.ms/failure-installing-tool

    The version I have installed is C:\Windows\System32>dotnet --version 3.0.100

  • User Avatar
    1
    jaencalo created

    Hi, ASPNetZero guys, Solved.

    First, I installed .Net Core SDK 3.1 Second, I run the command with this little change:

    dotnet tool install --global dotnet-ef --version 3.1.0-preview3.19554.8

    Third: Click on (re-)generate

    mfainc, I wait this help you,

    Thanks alot,

    Javier Carreño

  • User Avatar
    0
    mfainc created

    Thanks Javier Carreño the above solution did fix the error I was having

  • User Avatar
    0
    mfainc created

    Now getting new error. The tool says that it worked but when I run the Angular site I get errors. It looks like it genreated everything except the stuff that it needs in the ServiceProxy

  • User Avatar
    1
    maliming created
    Support Team

    hi @mfainc

    You need run nswag/refresh.bat file (or run the command inside it for a non-Windows OS) while server side (.Host project) is running.

    https://docs.aspnetzero.com/en/aspnet-core-angular/latest/Infrastructure-Angular-NSwag

    https://github.com/aspnetzero/aspnet-zero-core/issues/2289

  • User Avatar
    0
    mfainc created

    Awsome thank you. That was what I was missing.

  • User Avatar
    0
    maliming created
    Support Team

    @jaencalo Have you solved the problem?

  • User Avatar
    0
    jaencalo created

    Yes, maliming, issue solved, thanks a lot