You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Logic Apps内联C#脚本无代码变更突然报错,确认存在破坏性更新

Azure Logic Apps 内联C#脚本添加using System.Text.Json触发参数绑定错误

最近4天内的10次运行全部失败,「Execute CSharp Script Code」动作返回如下错误:

InvokeFunctionFailed
函数「CSharp_receive-email-test_execute_csharp_script_code.csx」执行时出现「Exception binding parameter 'context'」错误,请验证函数代码有效性。

未修改原有代码,经复现确认是Logic Apps内联C#的破坏性更新导致,复现步骤:

  • 在设计器中添加「Execute CSharp Script Code」步骤;
  • 使用官方示例代码时,工作流运行正常;
  • 在脚本中添加using System.Text.Json;语句后,立即触发上述错误。

解决方案

经确认,本次更新要求:使用System.Text.Json命名空间前,必须先添加程序集引用声明。将以下代码放在脚本最顶部即可解决问题:

#r "System.Text.Json"
using System.Text.Json;
// 后续脚本代码

内容的提问来源于stack exchange,提问作者Chris Harrington

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.13 06:07:04