I have a msbuild task that outputs to a file.
Now I want to search that file for a certain text or regex expression and return true if it is there and false if it isn't
any idea of a task that could do this for me?
I have a msbuild task that outputs to a file.
Now I want to search that file for a certain text or regex expression and return true if it is there and false if it isn't
any idea of a task that could do this for me?
If you're using MSBuild 4 (with Visual Studio 2010), you can use Property Functions and do this without any custom task:
<IsMyFileMatching>$([System.Text.RegularExpressions.Regex]::IsMatch($([System.File]::ReadAllText("yourfile"), "pattern")))</IsMyFileMatching>