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

Angular Service Fails To Compile Due to Missing Member #7972


User avatar
0
dmerf created

We are a new ASP.NET Zero customer. We are just creating our solution using the ASP.NET CORE & Angular project type. I used the ASP.NET Zero-Load Entity From Database tool to create a new entity from an existing DB table. That seemed to work. I compiled and ran the Web.Host project. But when I try to Run Start the Angular service it fails to compile due to following issue:

ERROR in app/main/domainModel/sponsors/create-or-edit-sponsor-modal.component.ts:4:10 - error TS2305: Module '"..Web.Host/src/shared/service-proxies/service-proxies"' has no exported member 'XXXServiceProxy'.

What is causing the error and how do we fix it? Thank you!


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

    Service Proxy Generation

    First, run (prefer Ctrl+F5 to be faster) the server side application (.Web.Host project). Then run nswag/refresh.bat file on the client side to re-generate service proxy classes (they are used to call server side service methods).

  • User Avatar
    0
    dmerf created

    We had already discovered that recommendation but have been able to get refresh.bat to execute. Either it does not like path or it tries to use the wrong version of .NET Core. We have tried numerous combinations of pathing and command parameters to specify which version to use. Ideas?

  • User Avatar
    0
    maliming created
    Support Team

    Either it does not like path or it tries to use the wrong version of .NET Core.

    Can you elaborate on this situation? Is there an error?