protected void ReadReferences() { var references = Project.GetMetadataReferences(); if (references != null) { foreach (var reference in references) { if (reference.ReferenceOutputAssemblyIsTrue()) { var filePath = GetDocumentFilePath(reference); var aliases = reference.GetAliases(); if (aliases.IsDefaultOrEmpty) { Add("reference", filePath); } else { foreach (var alias in aliases) { if (string.Equals(alias, "global", StringComparison.OrdinalIgnoreCase)) { Add("reference", filePath); } else { Add("reference", $"{alias}=\"{filePath}\""); } } } } } } }