开发者

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

开发者 https://www.devze.com 2022-12-18 23:59 出处:网络
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?

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

精彩评论

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

关注公众号