--- lang: ja-jp breaks: true --- # MSBuild プラットフォーム バージョン を取得する TargetPlatformVersion 2022-07-07 ```xml= <Target Name="NameBefore" BeforeTargets="BeforeBuild"> <Message Importance="high" Text="----------------- before [$(PlatformVersion)]" /> <Message Importance="high" Text="----------------- before [$(TargetPlatformVersion)]" /> <Message Importance="high" Text="----------------- before [$(WindowsTargetPlatformVersion)]" /> <Message Importance="high" Text="----------------- before [$(WindowsTargetPlatformMinVersion)]" /> </Target> ``` ```shell= 2>----------------- before [] 2>----------------- before [7.0] 2>----------------- before [] 2>----------------- before [] ``` ###### tags: `MSBuild` `プラットフォーム バージョン` `TargetPlatformVersion`