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

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 20, 2025, 18:00