[Exception] - Method not found MediatR.IMediator.Publish(!!0, System.Threading.CancellationToken)
See original GitHub issueAfter update to last release I’m getting following exception…
- It happened only with debugger attached under VS-Code debugger…
- If i run app as
release
or usingdotnet run
, all works
Exception:
The place where it happened is standard notification push… fired on UserRefreshed under OnValidatePrincipal…
await _mediator.Publish(new UserRefreshedNotifi() { UserID = parsed_user_id },cancellationToken);
System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task MediatR.IMediator.Publish(!!0, System.Threading.CancellationToken)'.
at Aplication.Services.UserAutenticateService.Refresh(String current_access_token, String current_refresh_token, CancellationToken cancellationToken)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Aplication.Services.UserAutenticateService.Refresh(String current_access_token, String current_refresh_token, CancellationToken cancellationToken)
at WebApi.ServiceExtension.OnValidatePrincipal(CookieValidatePrincipalContext context) in
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:6
Top Results From Across the Web
Method not found MediatR.IMediator.Publish(!!0, System. ...
After update to last release I'm getting following exception.. It happened only with debugger attached under VS-Code debugger.
Read more >xUnit throws System.MissingMethodException when ...
IMediator.Send(MediatR.IRequest 1<!!0>, System.Threading.CancellationToken)'. This is my command and handler. Since ...
Read more >Why use MediatR? 3 reasons why and 1 reason not
The reason you may not want to use MediatR is simply that everything is done in-process. Meaning that wherever process is calling mediator.Send ......
Read more >Publishing strategies in MediatR | Fati Iseni - Blog
Explore advanced publishing strategies with the MediatR library in .NET applications. This article dives into the Mediator pattern, ...
Read more >Diagnosing and Fixing MediatR Container Issues
When running this in our application using mediator.Publish(new MyEvent()) , the code above never gets hit. So how can we diagnose and fix ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It started happening to me as well and after some digging the cause appears to be referencing different versions of the library in the same solution. I had one project referencing version 9 and another project referencing version 8. Updating it to the same version everywhere took care of the issue.
got it, just need to ensure all the projects using it, installed the package as well 👍👍