2017-04-18 07:52:04 +08:00
## Unexpected InvalidCastException from InvokeMethod activity in WF4
2017-04-06 04:52:19 +08:00
### Scope
Minor
### Version Introduced
4.5
### Version Reverted
4.5
### Source Analyzer Status
Planned
### Change Description
2017-04-21 02:19:05 +08:00
Using a
< xref:System.Activities.Statements.InvokeMethod > that
targets a method with a nullable parameter can throw an
< xref:System.InvalidCastException ? displayProperty = name > .
2017-04-06 04:52:19 +08:00
- [ ] Quirked
- [ ] Build-time break
### Recommended Action
2017-04-21 02:19:05 +08:00
2018-03-01 08:06:28 +08:00
This behavior was reverted in a .NET Framework 4.5 servicing release. Update the .NET Framework 4.5 (or upgrade to .NET Framework 4.5.1 or later) to
2017-04-21 02:19:05 +08:00
fix the issue.
2017-04-06 04:52:19 +08:00
### Affected APIs
2017-04-27 07:42:40 +08:00
* `P:System.Activities.Statements.InvokeMethod.Parameters`
2017-04-06 04:52:19 +08:00
### Category
Windows Workflow Foundation (WF)
[More information ](http://connect.microsoft.com/VisualStudio/feedback/details/758736/unexpected-invalidcastexception-from-invokemethod-activity-in-wf4-after-net-4-5-install )
<!--
### Notes
Activities can be defined in xaml (as well as programmatically), so it will be good to create a non-code analyzer to identify those. See the repro in the linked bug for an example.
-->
2017-04-18 07:52:04 +08:00
<!-- breaking change id: 88 -->