Starts in:
0 DAY
22 HRS
27 MIN
52 SEC
Starts in:
0 D
22 H
27 M
52 S
Open Closed

Genrating Static Client Proxy Issue #5376


User avatar
0
jim created

Hello, I have an issue with generating a client proxy. Every time I need to regenerate a static client proxy using the command: abp generate-proxy -t csharp -m myService -u https://localhost:44769 --without-contracts an issue occurs. I don't understand why it happens, and I don't have any idea how to resolve it.

  • ABP Framework version: v7.2.2
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace: Method 'AllotShare' cannot implement method from interface 'CmvPoint.ShareholderService.ShareTransactions.IShareTransactionAppService'. Return type should be 'System.Threading.Tasks.Task<CmvPoint.ShareholderService.ShareTransactions.ShareTransactionDto>'.

Inner Exception

Don't have any inner exception.

  • Steps to reproduce the issue:"

The steps I've taken:

  1. Create the IShareTransactionAppService
  2. Added Task<ShareTransactionDto> AllotShare(AllotShareInputDto input); on my IShareTransactionAppService
  3. Generate Client proxy using command mentioned above

For the reference: I've attached the image which is the IShareTransactionAppService

IShareTransactionAppService

ShareTransactionCliehntProxy.Generated.cs

Highlighted Issue


2 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you try to rename the method name to AllotShareAsync?

  • User Avatar
    0
    jim created

    I did tried to rename to AllotShareAsync and now works fine. So the Async Keyword plays an important role here.

    Many Thanks. Jimwell

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06