在本地运行Azure函数(V2)时引发Newtonsoft.Json.JsonReaderException [英] Newtonsoft.Json.JsonReaderException thrown when running Azure function(V2) locally

查看:218
本文介绍了在本地运行Azure函数(V2)时引发Newtonsoft.Json.JsonReaderException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VS2017中创建了Azure函数v2的队列触发器模板. 当我在本地运行项目时,功能运行时成功启动.但是,当我在队列中创建消息时,VS下载了JsonSerialization.cs文件并指出了错误.

I created a queue trigger template of Azure function v2 in VS2017. When I ran the project locally, the function runtime started successfully. But when I created a message in the queue, VS downloaded a JsonSerialization.cs file and pointed out the error.

默认例外设置的详细信息:

Details of default Exception settings:

这是VS生成的模板,因此似乎没有像我在其他帖子中找到的代码问题.

It's a template generated by VS, so there seems no code issue like what I have found in other posts.

我尝试过的事情:

  • 将项目发布到Azure,可以正常工作.
  • 使用npm安装的功能核心工具(Cli)运行项目,也可以.

我想这个问题与VS使用的Cli函数有关.但是其运行时版本为2.0.11651.0,与npm安装的版本相同.

I guess the problem is related to the function Cli used by VS. But its runtime version is 2.0.11651.0, same as the one installed by npm.

之前有人遇到过这个想法吗?预先感谢.

Have anyone met this before or got any idea? Thanks in advance.

推荐答案

此异常是内部的,应由运行时捕获.在异常设置中随意忽略它,然后一切都应该正常工作.

This exception is internal and should be caught by the runtime. Feel free to ignore it in exception settings, and then everything should just work.

这篇关于在本地运行Azure函数(V2)时引发Newtonsoft.Json.JsonReaderException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆