开发者

How do I determine the current operating system version in MSBuild?

Is there a native or custom MSBuild task available that returns the current OS version? Is there a binary that I could call via an Exec task? Or is there some 开发者_如何学Pythonother option?

Edit: Peter Lang suggested the following link: http://www.paraesthesia.com/archive/2009/07/06/getting-the-windows-os-version-in-msbuild.aspx


You can try with a registry key lookup as described in this post.


You could Exec this PowerShell line:

Get-WMIObject Win32_OperatingSystem | select Version
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜