C# update DLL without recompiling the project

2019-04-21 07:16发布

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 :)

标签: c# dll
2条回答
太酷不给撩
2楼-- · 2019-04-21 07:23

When you add a reference to a DLL, the visual studio takes binds it to the specific version (in case of 'Copy local' is true). Go to visual studio project, select the reference and view properties. You will see a property as 'Specific version'. The value will be true, set it to false. You have got what you wished.

查看更多
啃猪蹄的小仙女
3楼-- · 2019-04-21 07:45

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.

查看更多
登录 后发表回答