简体   繁体   English

swaggerwcf仅在多项目解决方案中与newtonsoft 8.0.3.0一起使用

[英]swaggerwcf only works with newtonsoft 8.0.3.0 in a multiproject solution

I am working in a multiproject solution. 我正在一个多项目解决方案中。 There's a main project and the rest is referenced (as existing projects). 有一个主要项目,其余的(作为现有项目)被引用。

In two projects I had newtonsoft 9.0.1.0, then we decided to integrate swaggerwcf in one of the projects (that has newtonsoft). 在两个项目中,我安装了newtonsoft 9.0.1.0,然后我们决定将swaggerwcf集成到其中一个项目(具有newtonsoft)中。 I intalled the nugget package for swaggerwcf, but when I tried to go to "/api-docs", I received an error(something like request couldnt be proccess), then I decided to downgrade the version of newtonsoft to 8.0.3.0(it's the minimum version admited by swaggerwcf) and it works but I want to use newtonsoft 9.0.1.0 in both projects. 我为swaggerwcf安装了nugget软件包,但是当我尝试转到“ / api-docs”时,收到了错误消息(类似请求无法处理),然后我决定将newtonsoft的版本降级为8.0.3.0( swaggerwcf允许的最低版本),它可以工作,但我想在两个项目中都使用newtonsoft 9.0.1.0。

Suaggerwcf only works with the minimun version of newtonsoft 8.0.3.0. Suaggerwcf仅适用于newtonsoft 8.0.3.0的最小版本。 in this solution. 在这个解决方案中。 I've tried in other solutions(with one project) and works with other versions of newtonsoft. 我已经尝试过其他解决方案(一个项目),并且可以与其他版本的newtonsoft一起使用。

According to nuget , 8.0.3 and newer should work. 根据nuget ,8.0.3和更高版本应该有效。 If you have not, try adding a binding redirect as described in this blog post . 如果还没有,请尝试按照本博客文章中的说明添加绑定重定向。 Go to the Package Manager Console for your project and use the Add-BindingRedirect command. 转到项目的Package Manager控制台,然后使用Add-BindingRedirect命令。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM