We currently apply TargetedPatchingOptOut attributes in a few places to mark functions that should be inlined. However, it seems this does not actually have any effect since user assemblies (i.e. those not part of the BCL) do not opt into targeted patching (inplace framework upgrades) in the first place and are thus automatically inlined where appropriate.
[ ] Confirm that they indeed have no effect, and drop usages if true.
[ ] Consider to use MethodImplOptions.AggressiveInlining instead in these places - although beware that this is only available in .Net 4.5, while the code base must compile also in portable profiles, .Net 3.5 etc.
We currently apply
TargetedPatchingOptOut
attributes in a few places to mark functions that should be inlined. However, it seems this does not actually have any effect since user assemblies (i.e. those not part of the BCL) do not opt into targeted patching (inplace framework upgrades) in the first place and are thus automatically inlined where appropriate.MethodImplOptions.AggressiveInlining
instead in these places - although beware that this is only available in .Net 4.5, while the code base must compile also in portable profiles, .Net 3.5 etc.