使用不同版本的DLL文件在一个应用程序

编程入门 行业动态 更新时间:2024-10-25 04:25:02
本文介绍了使用不同版本的DLL文件在一个应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有两个库(月亮APNS,tweetsharp)。每个库中有newtonsoft.json.dll但不同版本的引用的C#应用​​程序...我的应用程序成功打造而是一个库工作正常,另一个抛出异常(无法找到dll文件)。

I have an c# application with two libraries ( moon-apns, tweetsharp ) .. Each library has a reference for newtonsoft.json.dll but different versions ... My app build successfully but one library works fine and the other one throws an exception ( can't find the dll file ).

我想,当我建立只有一个版本转到bin文件夹,但我不知道是什么做的。

I think that when i build only one version goes to the bin folder, but i don't know what to do.

在此先感谢。

推荐答案

您可以强制这两个库使用集绑定在你的app.config或web.config文件重定向。显然,这只是工作,只要库版本是兼容的。

You can force both libraries to reference the same version by using Assembly Binding Redirects in your app.config or web.config. Obviously this only works as long as the library versions are compatible.

更多推荐

使用不同版本的DLL文件在一个应用程序

本文发布于:2023-11-06 22:48:39,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1564884.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   版本   文件   DLL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!