public IReadOnlyDictionary <string, IEvaluatedProjectPropertyValue> EvaluateProperties(Dictionary <string, string> propertyValues = null) { var result = new Dictionary <string, IEvaluatedProjectPropertyValue>(); using (new MsBuildConditionContext(MsBuildProject, propertyValues)) { foreach (var property in Properties.Values) { var projectPropertyElement = MsBuildProject.GetProperty(property.Name)?.Xml; if (projectPropertyElement != null) { result.Add( property.Name, new EvaluatedProjectPropertyValue(projectPropertyElement.Value, new ProjectPropertyOccurrence(projectPropertyElement))); } } } return(result); }