Unable to cast Object of type(...) to ICommandHandler
See original GitHub issueFollowing your recent Part 1 video on using FunctionMonkey and once I have a simple structure created to verify the plumbing works, I get the following error:
[3/17/19 2:00:58 AM] AzureFromTheTrenches.Commanding: Error occurred during command execution. Anonymously Hosted DynamicMethods Assembly: Unable to cast object of type 'ThreeWill.Functions.Application.Handlers.HelloWorldCommandHandler' to type 'AzureFromTheTrenches.Commanding.Abstractions.ICommandHandler`2[ThreeWill.Functions.Commands.HelloWorldCommand,System.String]'.```
Using the v1.0.0 versions of FunctionMonkey an FunctionMonkey.Compiler.
Using v9.0.1 of the Commanding Abstractions.
Azure Functions Core Tools 2.4.401
Function Runtime Version: 2.0.12309.0
Have you seen this before? Both macOS w/ VS Code and VS 2017 enterprise get the same result. Debugging does not seem to get past some of the Function framework prices, or maybe I am missing a way to debug into the actual issue.
I'll keep digging, but thought I would ask if this might be something simple.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Command binding Unable to cast object of type 'System. ...
You don't bind a command to the Click property. The Click property is for adding a traditional event handler to the Click event....
Read more >Generic ICommand error - Microsoft Q&A
This object you can cast to IEnumerable of objects. If you want cast to IEnumarable of your Item type you must cast every...
Read more >"CommandParameter: Unable to cast object of type ' ...
note that when I use "InvalidRowExceptionEventArgs" I have exception "unable to cast to GridRowValidationEventArgs" when invalid is fired;
Read more >unable to cast com object error
I am using vb.net and InDesign 2018. The error I get is Unable to cast COM object of type 'System.__ComObject' to interface type...
Read more >[BUG] Unable to cast object when initialising interface #1125
Net Framework to .Net 5, it gives me this error. Unable to cast object of type 'UIHelpersRestClientRefitBugIWoofClient' to type 'UI.Helpers.
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 Free
Top 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

No problem at all.
I moved Function Monkey to v1.0.0 since I recorded the first 2 videos and there were a couple of breaking changes - in case you run into any issues there is a very short doc here that describes them and how to resolve them:
https://functionmonkey.azurefromthetrenches.com/guides/upgradingTo1.0.html
I also cover them in part 3 which I should be publishing later today.
Thanks James, I knew it was likely something simple! Sorry for the bother but very much appreciate the response and patience! Works perfectly!