检测框架版本3.5
我正在开发一个 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这将取决于您要分发的时间和地点。如果他们要下载该应用程序,您可以使用此路线设置一个 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?"
您是否考虑过
Environment.Version
Have you considered
Environment.Version