protected override void Execute(CodeActivityContext context) { var pi = context.GetType().GetProperty("AllowChainedEnvironmentAccess", BindingFlags.NonPublic | BindingFlags.Instance); if (pi != null) { var pivalue = (bool)pi.GetValue(context, null); if (!pivalue) { pi.SetValue(context, true, null); } } }