internal static void UpdateNuspecFile(string nuspecFilepath, string searchString, string replacementString) { //Update contents Nuspec file. if (File.Exists(nuspecFilepath)) { string specText = File.ReadAllText(nuspecFilepath); specText = specText.Replace(searchString, replacementString); File.WriteAllLines(nuspecFilepath, new[] { specText }); } } }