无法加载文件或程序集"Newtonsoft.Json,版本= 6.0.0.0,区域性=中性,PublicKeyToken = 30ad4fe6b2a6aeed"或其依赖项之一 [英] Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies
问题描述
我尝试更新nuget软件包,尝试替换,我什至删除了文件并重新安装,但是当我尝试将其上传到Godaddy中的我的域托管"中时,这种情况仍然发生.
以前,我有一个错误,指出allowDefinition='MachineToApplication'
超出了应用程序级别.我用谷歌搜索并在我的网络配置中对其进行了更改.现在问题出在这个错误上.香港专业教育学院甚至将依赖程序集更改为
I have tried updating the nuget package, tried replacing i've even deleted the file and re installed but still this is occurring when i try to upload it in My domain hosting in godaddy.
Previously i had a error that allowDefinition='MachineToApplication'
beyond application level. I googled it and changet it in my web config. now the problem is with this error. ive even changed the dependent assembly to
<dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="7.0.0.0" />
</dependentAssembly>
当前使用的Newtonsoft.json版本是7.0.1. 谁能指导我,我是新手.
The current version of Newtonsoft.json im using is 7.0.1.. can any one guide me i'm new to this.
注意:我正在使用的主机是plesk主机,而我的.net是4.5
Note: The Hosting which i'm using is plesk hosting and my .net is 4.5
推荐答案
是否更新了已安装版本的正确版本?否则使用nuget安装特定版本7
Update the correct version of the installed version? Else install specific version 7 with nuget
Web.config:
Web.config:
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="7.0.1" />.
安装nuget指定的版本:
Install nuget specified version:
Install-Package Newtonsoft.Json -Version 6.0.8
备用Web.Config添加程序包:
Alternative Web.Config add package:
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
这篇关于无法加载文件或程序集"Newtonsoft.Json,版本= 6.0.0.0,区域性=中性,PublicKeyToken = 30ad4fe6b2a6aeed"或其依赖项之一的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!