小编Vet*_*and的帖子

Newtonsoft.Json无法加载本地Azure Functions应用程序

我正在开发Azure Functions"app",我正在本地进行大部分测试,然后将DLL发布到Azure.我从三月份开始,直到几周前一直运作良好.

我主要是在稳定的渠道上使用macOS High Sierra(目前是最新的; 10.13.4)和Visual Studio进行开发和测试.

我最近在提示我时更新了Visual Studio,它似乎已经更新为支持.NETStandard 2.0而非.NET Framework 4.7.*,但我的项目仍在.NET Framework 4.7上.然而,当我试图通过对admin-endpoint的POST请求运行我的计时器触发器时,我遇到一个错误,告诉我应用程序无法加载Newtonsoft.Json.

我一直在努力解决这个问题,最后用.NETStandard 2.0创建了一个新项目,只是复制了文件,但同样的错误仍然存​​在.

Newtonsoft.Json是从Visual Studio for Mac中的内置NuGet包管理器安装的.

我也在Windows上测试了同一个项目(Windows Server 2012 R2标准版),但我得到了完全相同的错误.

我得到的错误:

[06/05/2018 08:17:18] System.Private.CoreLib: Exception while executing function: Posts. MyAzureFunctionsApp: Could not load file or assembly 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621). System.Private.CoreLib: Could not load file or assembly 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'.
[06/05/2018 08:17:18] 
[06/05/2018 08:17:18] Executed 'Posts' (Failed, Id=7c288cdf-7807-4450-92cd-c64370e241a5)
[06/05/2018 08:17:18] System.Private.CoreLib: Exception while …
Run Code Online (Sandbox Code Playgroud)

c# json.net azure-functions

2
推荐指数
1
解决办法
1815
查看次数

标签 统计

azure-functions ×1

c# ×1

json.net ×1