简体   繁体   English

使用新DLL编译应用程序,但使用旧DLL运行

[英]Compiling application using new DLL but running using old DLL

I have an application that uses(does not implement) an interface in a separate DLL. 我有一个使用(不实现)单独的DLL中的接口的应用程序。 I recently mades changes to this interface. 我最近对该界面进行了更改。 My application, however, does not use any of the new features in this interface. 但是,我的应用程序未在此界面中使用任何新功能。

My question is: Is it ok to run the application using the old DLL if I have compiled the application using the new DLL( with the new changes). 我的问题是:如果我使用新的DLL(具有新的更改)编译了应用程序,则可以使用旧的DLL运行应用程序吗?

It should be fine under the right circumstances. 在适当的情况下应该没问题。

I had to try this out to be sure...but, in fact it does seem to work out alright. 我必须尝试一下以确保...但是,实际上,它确实可以正常工作。 I created an interface in a dll, referenced it in an application and used reflection to check the methods on the interface in the dll. 我在dll中创建了一个接口,在应用程序中对其进行了引用,并使用反射来检查dll中该接口上的方法。 Then, modified the interface, recompiled both the dll and the application, and the application is able to retrieve the methods on the interface of either the old, or the new dll. 然后,修改接口,重新编译dll和应用程序,并且应用程序能够检索旧dll或新dll的接口上的方法。

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

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