我已经寻找了很长时间,但我无法找到答案。 有什么方法来确定安装在PC架构和服务包.NET,无法获得登记在C#中? 我可以使用注册表项,但我不得不这样做没有获得注册。 我读了一些关于C语言的目录:\ WINDOWS \微软.NET,但是,我只找到framework版本,一无所知SP。但我需要的框架和服务包。 有人可以帮我吗?
问候,格雷格
解决方案 字符串CLRVERSION = System.Environment.Version.ToString();
字符串dotNetVersion =大会
.GetExecutingAssembly()
.GetReferencedAssemblies()
。凡。(X => x.Name ==mscorlib程序)第一()Version.ToString();
I've searching a long time, but i couldn't find answer. Is there any way to determine framework and service pack .NET installed on PC, without access to registry in C#? I can use registry keys, but i have to do this without access to registry. I read something about directories in C:\Windows\Microsoft .NET, but there, I only found framework version, nothing about SP. But I need framework and Service Pack. Can somebody help me?
Regards, Greg
解决方案string clrVersion = System.Environment.Version.ToString();
string dotNetVersion = Assembly
.GetExecutingAssembly()
.GetReferencedAssemblies()
.Where(x => x.Name == "mscorlib").First().Version.ToString();
上一篇:在Nexus 5 GLSurfaceView帧率问题问题、Nexus、GLSurfaceView
下一篇:与Android Maven的 - R.java文件生成(Eclipse中)文件、Maven、Android、Eclipse