我不明白我面临的以下问题。 我有三个项目,A,B和C。它们都引用Newtonsoft.Json版本12.0.1。项目a引用了B和C两个项目。 项目B引用了Microsoft.IdentityModel.Tokens.Jwt。当我运行项目A并尝试执行必要的函数创建令牌时,我会得到以下运行时错误:
消息:
"The type initializer for 'System.IdentityModel.Tokens.Jwt.JsonExtensions' threw an exception."
内部异常:
"Could not load file or assembly 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified."
我已经验证所有项目都引用相同的Newtonsoft.Json包,版本为12.0.1。 我还检查了我的项目文件以确保没有引用Newtonsoft.Json版本10.0.0.0。 我漏掉了什么?
消息:
"The type initializer for 'System.IdentityModel.Tokens.Jwt.JsonExtensions' threw an exception."
内部异常:
"Could not load file or assembly 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified."
我已经验证所有项目都引用相同的Newtonsoft.Json包,版本为12.0.1。 我还检查了我的项目文件以确保没有引用Newtonsoft.Json版本10.0.0.0。 我漏掉了什么?