Search Issue Tracker

By Design

Votes

0

Found in

2018.3.0b7

Issue ID

1095043

Regression

No

[.NET 4.x] Reflection in .NET 4 stops working. MissingMethodException: Attempted to access a missing member

Mono

-

Steps to reproduce:
1. Open attached project
2. Open Maintainer (Tools > Code Stage > Maintainer)
3. Open Issues Finder Tab
4. Press any square button with group checkboxes icons at the left settings part and observe the error:

MissingMethodException: CodeStage.Maintainer.Settings.IssuesFinderSettings.SwitchCommon Due to: Attempted to access a missing member.System.RuntimeType.InvokeMember (System.String name, System.Reflection.BindingFlags bindingFlags, System.Reflection.Binder binder, System.Object target, System.Object[] providedArgs, System.Reflection.ParameterModifier[] modifiers, System.Globalization.CultureInfo culture, System.String[] namedParams) (at <1aa022ba59ae4cfa86ec80b69d3d4fc2>:0)System.Type.InvokeMember (System.String name, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object target, System.Object[] args) (at <1aa022ba59ae4cfa86ec80b69d3d4fc2>:0)CodeStage.Maintainer.UI.IssuesTab.DrawSettingsSearchSectionHeader (CodeStage.Maintainer.UI.SettingsSearchSection section, System.Boolean& foldout) (at Assets/Plugins/CodeStage/Maintainer/Editor/UI/Tabs/IssuesTab.cs:506)CodeStage.Maintainer.UI.IssuesTab.DrawSettingsBody () (at Assets/Plugins/CodeStage/Maintainer/Editor/UI/Tabs/IssuesTab.cs:159)
...

Expected result: "MissingMethodException: CodeStage.Maintainer.Settings.IssuesFinderSettings.SwitchCommon Due to: Attempted to access a missing member." should not be thrown using .NET 4.x

Reproduced in: 2019.1.0a13, 2018.3.0b12, 2017.4.18f1

  1. Resolution Note:

    When using Type.InvokeMember BindingsFlags must indicate that instance or static members should be considered by OR'ing with BindingFlags.Instance or BindingFlags.Static

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.