DLL版本号问题 [英] DLL Version Number problem

查看:98
本文介绍了DLL版本号问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我必须根据程序集中更新的dll版本更新aspx页面和一些cs文件中的dll版本号.我在所有aspx页面和某些cs页面中都提到了dll.

当我更新dll(新版本)时.我还需要在所有的aspx和cs页面中进行更改.如何避免此问题.

感谢所有人.

问候,
Shefeek

Hi All

I have to update my dll version number in aspx pages and some cs files based on the updated dll version from assembly. I have referred to the dll in all aspx pages and in some cs pages.

When I update the dll(new version comes). I need to change in all aspx and cs pages also.how i can avoid this problem.

Advance thanks to all.

Regards,
Shefeek

推荐答案

您制定的方式,这个问题看起来很矛盾,没有解决方案.您是否要更改DLL的版本,但又不想更改其他任何内容?如果由程序集实现的接口和用法相同,则无需使用该接口更改代码;否则,无需更改.如果更改了接口,则仍应更改使用代码.不合逻辑吗?

The way you formulated it, the problem looks contradictory, not having a solution. You want to change the version of DLL but you don''t want to change anything else? If your interfaces implemented by an assembly and usage are the same, the change of the code using it is not needed; if the interface is changed, the using code should be changed anyway. Isn''t it logical?

要开始适当的版本管理,您应该了解,没有诸如"DLL版本"之类的东西.有程序集和文件版本;看到您的AssemblyInfo.cs文件.我建议您仅使用程序集版本.您需要根据软件的依赖关系分层组织软件,并根据版本号制定策略.例如,构建版本的增加意味着不需要在依赖层上进行任何更改的外观"更改,次要版本可能会因行为上的变化而增加,而主版本可能意味着需要在其他层上进行更改的接口更改.这样的事情.您还可以开发支持实用程序,并将其放入项目构建步骤中:检查版本一致性等.您可以在运行时读取所有元数据,包括程序集版本.这是一篇大文章,但我希望您有个好主意.

To start with proper version management, you should understand, that there is no such thing as "DLL version". There is assembly and file version; see you AssemblyInfo.cs file. I suggest you use assembly version only. You need to organize software in layers by their dependency and develop a strategy based on version number. For example, increment of build version mean "cosmetic" changes not requiring any change in dependent layers, minor version might be incremented for change in behavior, and major version could mean the change in interfaces requiring change in other layers. Something like that. You can also develop support utilities and put them in your project build steps: check up of version consistency, etc. You can read all meta-data during run time, including assembly versions. This is a matter of a big article, but I hope you got an idea.


这篇关于DLL版本号问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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