public void SubstituteNuspecContent()
{
NuspecContent = File.ReadAllText(nuspecPath);
GetAssemblyPath();
Version = GetOrReplace("version", GetVersionToken);
Id = GetOrReplace("id", () => Path.GetFileNameWithoutExtension(MetadataAssembly));
Authors = GetOrReplace("authors", GetCompany);
GetOrReplace("owners", GetCompany);
Description = GetOrReplace("description", GetDescription);
GetOrReplace("copyright", GetCopyright);
Language = GetOrReplace("language", () => "es-US");
Tags = GetOrReplace("tags", () => Id);
if (NuspecContent.Contains(">$") || NuspecContent.Contains("$<"))
{
var message = "Found '>$' or '$<'. It is likely there is an property that could not be replaced. nuspec content=\r\n" + NuspecContent;
throw new ExpectedException(message);
}
}