private string GetDotCoverVersion()

in TeamCity.dotCover/DotCoverInfo.cs [37:50]


    private string GetDotCoverVersion()
    {
        var projFile = BaseDirectory + @"\dotCoverRestore.csproj";
        foreach (var line in _fileSystem.ReadFileLines(projFile))
        {
            var match = PackageVersion.Match(line);
            if (match.Success)
            {
                return match.Groups[1].Value;
            }
        }

        throw new InvalidOperationException($"Cannot get dotCover version from project file \"{projFile}\".");
    }