Created
September 10, 2021 20:20
-
-
Save jonpryor/5d4a58216f8e7e7e49f52651d9bb018b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% msbuild /nologo /v:m /t:Foo x.targets | |
IsValid= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project> | |
<PropertyGroup> | |
<InvalidVersion>1.2.3a4</InvalidVersion> | |
<IsValid Condition="$([System.Version]::TryParse( | |
'$(InvalidVersion)', | |
$([System.Version]::Parse('1.2.3.4')) | |
))">True</IsValid> | |
</PropertyGroup> | |
<Target Name="Foo"> | |
<Message Text="IsValid=$(IsValid)" Importance="High" /> | |
</Target> | |
</Project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment