什么是愚蠢的方式来告诉哪个版本的.NET安装在生产Windows Server上? [英] What's the foolproof way to tell which version(s) of .NET are installed on a production Windows Server?

查看:103
本文介绍了什么是愚蠢的方式来告诉哪个版本的.NET安装在生产Windows Server上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题不是与部署有关的编程相关的。



我发现自己和我公司的团队交流很多,他们的工作是维护我们的生产Windows服务器并在其上部署我们的代码。由于法律和合规性的原因,我没有直接的可见性或对服务器的任何控制权,所以我唯一可以告诉哪些版本的.NET安装在任何一个是通过我给该组的方向。



到目前为止,我可以想到的所有方法都可以告诉安装哪个版本(检查与1.1或2.0相匹配的管理工具,检查添加/删除程序列表,检查c:\Windows\Microsoft.NET下的目录是否存在)有缺陷(我已经看到至少有一台机器2.0,但没有2.0条目在管理工具 - 和该方法告诉你没有什么关于3.0+,添加/删除程序列表可以与现实不同步,目录的存在并不一定意味着什么)。


$ b $鉴于我通常需要提前知道这些事情(发现哎呀,这个没有所需的所有版本和服务包在短时间的维护窗口中并不能很好地工作)我必须通过代理进行检查,因为我无法直接访问服务器,有什么是愚蠢的方式来告诉哪个版本的.NET安装在产品上在Windows Server上?优选地,一些使用框架安装的内在方法,因为它将更快,并且不需要某种类型的实用程序被加载,并且还有一种方法,如果框架没有被正确地安装但仍然具有文件(即, ,有一个目录,gacutil.exe被放在那里,但该版本的框架并不是真的安装)



编辑:在没有一个很好的愚蠢的内在方式来做这个框架内置的,有没有人知道一个好的,轻量级,无安装需要的程序,可以找到这一点?我可以想象有人可以很容易地写一个,但如果已经存在,那将会更好。

解决方案

你应该打开IE在您正在寻找此信息的服务器上,并访问此网站: http://www.hanselman。 com / minimaldotnet /



这就是需要的。



该网站有一个脚本看起来您的浏览器的UserAgent,并确定您安装的(或没有).NET Framework的版本(如果有的话),并自动显示(如果您选择下载.NET Framework,则计算总大小) 。


This question is not so much programming related as it is deployment related.

I find myself conversing a lot with the group in my company whose job it is to maintain our production Windows servers and deploy our code on them. For legal and compliance reasons, I do not have direct visibility or any control over the servers so the only way I can tell which version(s) of .NET are installed on any of them is through directions I give to that group.

So far, all of the methods I can think of to tell which version(s) are installed (check for Administrative Tools matching 1.1 or 2.0, check for the entries in the "Add/Remove Programs" list, check for the existence of the directories under c:\Windows\Microsoft.NET) are flawed (I've seen at least one machine with 2.0 but no 2.0 entries under Administrative Tools - and that method tells you nothing about 3.0+, the "Add/Remove Programs" list can get out of sync with reality, and the existence of the directories doesn't necessarily mean anything).

Given that I generally need to know these things are in place in advance (discovering that "oops, this one doesn't have all the versions and service packs you need" doesn't really work well with short maintenance windows) and I have to do the checking "by proxy" since I can't get on the servers directly, what's the foolproof way to tell which version(s) of .NET are installed on a production Windows Server? Preferably some intrinsic way to do so using what the framework installs since it will be quicker and not need some sort of utility to be loaded and also a method which will definitely fail if the frameworks are not properly installed but still have files in place (i.e., there's a directory and gacutil.exe is inded there but that version of the framework is not really "installed")

EDIT: In the absence of a good foolproof intrinsic way to do this built into the Framework(s), does anyone know of a good, lightweight, no-install-required program that can find this out? I can imagine someone could easily write one but if one already exists, that would be even better.

解决方案

You should open up IE on the server for which you are looking for this info, and go to this site: http://www.hanselman.com/smallestdotnet/

That's all it takes.

The site has a script that looks your browser's "UserAgent" and figures out what version (if any) of the .NET Framework you have (or don't have) installed, and displays it automatically (then calculates the total size if you chose to download the .NET Framework).

这篇关于什么是愚蠢的方式来告诉哪个版本的.NET安装在生产Windows Server上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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