.NET 更新/修补程序能否彻底解决我的程序问题?

发布于 2024-09-19 16:47:47 字数 227 浏览 4 评论 0原文

假设我部署了一个 .NET 应用程序,Microsoft 发布了一个更新或修补程序来更改 .NET 层的行为。如果我的代码依赖于给定 .NET 方法或组件的某些特定输出或副作用,这是否会影响我的代码的可预测性,导致其以意想不到的方式运行?

我是否可以强制我的代码使用 .NET 层的特定版本/版本,以便如果我的客户更新他的 .NET 层,我的代码将继续使用旧的?

我是偏执狂还是对过去发生的事情有合理的担忧?

Say I deploy a .NET application, and Microsoft issues an update or a hotfix that changes the behavior of the .NET layer. Could this affect the predictability of my code, causing it to behave in an unintended manner, if my code is relying on some specific output or side effect of a given .NET method or component?

And can I force my code to use a certain version/build of the .NET layer so that if my customer updates his .NET layer, my code continues to use the old one?

Am I being paranoid or is this a legitimate concern regarding something that has happened in the past?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

是伱的 2024-09-26 16:47:47

是的,众所周知,关键的修补程序会影响程序,而不仅仅是 .NET。话虽这么说,可能性确实很低,修补程序可能会阻止非标准或黑客方法,但不会触及主流内容。构建一个单元测试套件,并在获得每个 KB 时测试您的代码 - 如果发现某些内容失败,请发布补丁(您可能永远不会这样做,但您会高枕无忧:))。

Yes, key hotfixes have been known to effect programmes, not just .NET. That being said the likelyhood is really low, hotfixes might stop a non-standard or hacker approach, but won't touch the mainstream stuff. Build a unit-test suite, and test your code as you get each KB - release patches if you find something's failed (which you probably never will, but you'll have peace of mind :)).

橙味迷妹 2024-09-26 16:47:47

微软拥有非常严格的向后兼容性标准,以便尽可能减少升级的影响,因此修补程序或补丁不太可能破坏任何现有代码。尽管有这种可能性,但发生的可能性非常低,通常不值得强调。

正如鲁迪所说,为了增加安全性,您可以使用单元测试来确保不会发生此类事情。

Microsoft holds a very strict backwards-compatibility standard so that they can reduce the impact of upgrades as much as possible, for that reason it is very unlikely that a hotfix or patch would break any existing code. Although it is a possibility, the likelihood of it happening is very low and not usually worth stressing over.

As Rudi said, for added security you can use unit testing to ensure this sort of thing isn't happening.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文