获取操作系统版本中的WinRT应用麦德龙C# [英] Get OS-Version in WinRT Metro App C#

查看:135
本文介绍了获取操作系统版本中的WinRT应用麦德龙C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用C#和Visual Studio 11 Beta版编写Metro风格应用。
现在,我想要得到的OS的操作系统版本。我怎样才能得到呢?

I'm programming a Metro Style App with C# and the Visual Studio 11 Beta. Now I want to get the OS-Version of the OS. How can I get this?

我发现了如何做到这一点在正常的应用程序。
在那里,您乘坐环境级的属性OSVERSION但在.NET的核心没有这个属性。

I found out how to do it in "normal" Applications. There you take the Environment-Class with the attribute OSVersion but in .NET Core there isn't this attribute

推荐答案

有关新的应用程序,你应该检查特定的功能,而不是操作系统版本。

For new applications you should check for specific features, not OS version.

据我可以告诉没有理由来检查操作系统版本为城域应用仅适用于胜8。

As far as I can tell there is no reason to check for OS version as metro applications are only available for win 8.

编辑:商店应用程序可用于多个Windows版本,但现在我们仍然建议以测试功能,而不是操作系统版本。最低操作系统版本被设置为当您创建一个项目创建目标。

Store applications are available on multiple Windows versions now but it is still recommended to test for features instead of OS versions. Minimum OS version is set as the build target for a project when you create it.

编辑#2:如果您有兴趣在应用程序的安装基础可以洞察应用集成到项目开始针对Windows 8.1中应用程序的跟踪操作系统版本。这里是如何开始使用它HOWTO:

Edit #2: If you are interested in tracking OS versions in your application's install base you can integrate Application Insights into your project starting with applications targeted at Windows 8.1. Here's a howto on getting started with it:

http://azure.microsoft.com/en-us/documentation/articles/app-insights-windows-get-started/

这篇关于获取操作系统版本中的WinRT应用麦德龙C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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