Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/json/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 我怎样才能看到什么';当我的解决方案中的所有内容都引用8.0.3时,是否需要NewtonSoft.Json 6.0.0?_C#_Json_Dll_Json.net_Filenotfoundexception - Fatal编程技术网

C# 我怎样才能看到什么';当我的解决方案中的所有内容都引用8.0.3时,是否需要NewtonSoft.Json 6.0.0?

C# 我怎样才能看到什么';当我的解决方案中的所有内容都引用8.0.3时,是否需要NewtonSoft.Json 6.0.0?,c#,json,dll,json.net,filenotfoundexception,C#,Json,Dll,Json.net,Filenotfoundexception,我的VS2015解决方案(4.5.2)有3个项目和3个进一步的测试项目。4个项目引用NewtonSoft.Json,所有项目都设置为使用8.0.3版 所有app.config和web.config文件都包含 <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIden

我的VS2015解决方案(4.5.2)有3个项目和3个进一步的测试项目。4个项目引用NewtonSoft.Json,所有项目都设置为使用8.0.3版

所有app.config和web.config文件都包含

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
           <assemblyIdentity name="Newtonsoft.Json"
               publicKeyToken="30AD4FE6B2A6AEED" culture="neutral"/>
           <bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
       </dependentAssembly>
    </assemblyBinding>
</runtime>

(并且配置标记没有名称空间属性)

我在我的开发盒上运行测试,一切都很好

我将部署到构建服务器(TeamCity),该服务器在我的47次测试中失败

System.IO.FileNotFoundException:无法加载文件或程序集 'Newtonsoft.Json,版本=6.0.0.0,区域性=中性, PublicKeyToken=30AD4FE6B2A6EED'或其依赖项之一。这个 系统找不到指定的文件

每个编译过的项目在其/bin/Release文件夹中都有一个NewtonSoft.Json.Dll的副本,并且都是版本8.0.3

构建服务器的GAC版本为8.0.3,其中包含NewtonSoft.Json.Dll

这就是我需要知道的

如何了解6.0.0.0版的要求?


如何杀死它?

您必须启用以查看哪个dll请求此版本的Newtonsoft。

FusionLog帮助我查看发生了什么。某些内容(在日志中列为Assembly:(unknown))请求6.0.0.0,而dll的配置文件(位于dll旁边的/bin文件夹中)是“未找到”的,因此.Net直接转到machine.config,其中没有重定向,因此请求失败。作为一种解决方法,我添加了一个到machine.config的重定向,因此任何对6的请求都将被给出8,一切正常,但我仍然想知道谁在请求6,以及为什么没有看到项目配置文件。。