检测框架版本3.5

发布于 2024-08-23 12:18:00 字数 150 浏览 3 评论 0原文

我正在开发一个 XBAP(部分信任)应用程序,有多个(~100)个用户。

在下一版本中,先决条件已从框架 3.0 提高到框架 3.5,我们需要一种简单的方法来检测每个客户端计算机的框架版本,并建议它们是否需要升级。

关于如何做到这一点有什么想法或建议吗?

I'm developing an XBAP (Partial trust) application, with multiple (~100) users.

In the next version the prerequisites have been bumped from framework 3.0 to framework 3.5, and we need an easy way to detect the framework version of each client machine, and advise them on whether they need to upgrade or not.

Any ideas or suggestions on how to do this?

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

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

发布评论

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

评论(2

对你的占有欲 2024-08-30 12:18:00

这将取决于您要分发的时间和地点。如果他们要下载该应用程序,您可以使用此路线设置一个 ASP.NET 页面来警告他们,甚至在他们安装之前阻止下载。

否则,您需要查看用户计算机上的注册表以确定它们是否具有正确的版本。还有另一个问题涵盖了这个“

This is going to depend on when and where you are going to be distributing. If they are going to be downloading the application you can use this route to setup an ASP.NET page to warn them and even prevent download until they install it.

Otherwise, you would need to look at the registry on the users machine to determine if they have the proper versions. There is another SO question that covers this "How to detect what .NET Framework Version is Installed?"

断肠人 2024-08-30 12:18:00

您是否考虑过Environment.Version

  int buildVersion = Environment.Version.Build;
  int majorVersion = Environment.Version.Major;
  int minorVerdion = Environment.Version.Minor;

Have you considered Environment.Version

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