C#更新DLL而不重新编译项目 [英] C# update DLL without recompiling the project

查看:279
本文介绍了C#更新DLL而不重新编译项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经写了一个小程序,引用了一个dll文件,该文件将被包含在安装文件中。



我还需要一种方法来更新dll(以防我改变某些功能),而不需要重新下载整个程序,只需更换dll文件...



这是可能吗? >

我刚刚读到某处,我必须使用新的dll版本更新xml文件,但我真的需要完整的步骤来更新dll成功..



任何帮助是非常感谢..
非常感谢






更新



我真的不知道该说什么...
两种方式真的很棒...
谢谢很多的帮助...
i将测试他们的同意并写下答案在这里...



再次感谢:)

解决方案

如果您已经分发了应用程序,则可以通过配置重定向程序集绑定。


您可以使用
应用程序或机器配置$ b中的条目将一个装配绑定
引用重定向到另一个版本的
程序集$ b文件。您可以将引用重定向到
.NET Framework程序集,第三方
程序集或您自己的
应用程序的程序集。


http:// msdn。 microsoft.com/en-us/library/2fc472t2%28VS.71%29.aspx



另一篇关于配置汇编绑定重定向


i have written a small program with a reference to a dll file that will be included in the setup file.

what i still need is a way to update the dll (in case i change some functions), without the need to redownload the whole program again, just replace the dll file ...

is this possible ?

i just read somewhere that i have to update the xml file with the new dll version, but i really need the full steps to update the dll sucessfully ..

any help is really appreciated.. thanks a lot


Update

i really dont know what to say... both ways are really great... thanks a lot for the help... i will test them tongiht and write the answer here ...

thanks again :)

解决方案

If you already distributed your application, you can redirect the assembly binding by configuration.

You can redirect an assembly binding reference to another version of an assembly by using entries in the application or machine configuration files. You can redirect references to .NET Framework assemblies, third-party assemblies, or assemblies of your own application.

http://msdn.microsoft.com/en-us/library/2fc472t2%28VS.71%29.aspx

Another article about Configuring Assembly Binding Redirection.

这篇关于C#更新DLL而不重新编译项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆