public void Run() { var shippedLines = File.ReadAllLines(ApiShippedFile); var builder = new StringBuilder(); var reader = new ApiReader(new FileInfo(AssemblyFile)); foreach (var api in reader.Read()) { if (!shippedLines.Contains(api)) { builder.AppendLine(api); } } var unshippedApis = builder.ToString(); File.WriteAllText(ApiShippedFile, unshippedApis); }