AWS lambda在.NET 6上给出 - AppSettings的错误解析JSON文件
我刚刚在.NET 6上创建了一个简单的AWS lambda函数。我添加了一个appsettings.json文件,并且正在尝试从文件中读取内容(它们具有AWS资源,然后将其应用于AWSOPTIONS)。
我无法读取此JSON文件,它在控制台上显示了此错误
Loaded local Lambda runtime from project output D:\xxx\yyy\zzz\bin\Debug\net6.0
Error parsing JSON file: D:\xxx\yyy\zzz\bin\Debug\net6.0\appsettings.json
Error parsing JSON file: D:\xxx\yyy\zzz\appsettings.json
,并且如何从配置文件中读取数据没有太大帮助。
典型的假设是基于它属于的ENV加载设置文件,而我所看到的一切已更改了一些,来自.netcore2_1到.net6。请分享您的意见,谢谢!
I just created a simple aws lambda function on .net 6. I have added an appsettings.json file and I'm trying to read contents from the file(which have aws resources and later be applied to AWSOptions).
Im unable to read this json file and it shows this error on the console
Loaded local Lambda runtime from project output D:\xxx\yyy\zzz\bin\Debug\net6.0
Error parsing JSON file: D:\xxx\yyy\zzz\bin\Debug\net6.0\appsettings.json
Error parsing JSON file: D:\xxx\yyy\zzz\appsettings.json
and there isn't much help around on how to read data from config file.
Typical assumption was to load the settings file based on the env that it belonged to and all I get to see it it has changed a little, coming from .netcore2_1 to .net6. Please share your opinion and thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论