/// <summary> /// Fetch all property values from each target framework and combine them. /// </summary> private static IEnumerable <string> GetAggregatePropertyValues( IVsTargetFrameworks tfms, string propertyName) { // Only non-null values are added to the list as part of the split. return(tfms .Cast <IVsTargetFrameworkInfo>() .SelectMany(tfm => MSBuildStringUtility.Split(GetPropertyValueOrNull(tfm.Properties, propertyName)))); }
// Trying to fetch a list of property value from all tfm property bags. private static IEnumerable <TValue> GetNonEvaluatedPropertyOrNull <TValue>( IVsTargetFrameworks tfms, string propertyName, Func <string, TValue> valueFactory) { return(tfms .Cast <IVsTargetFrameworkInfo>() .Select(tfm => { var val = GetPropertyValueOrNull(tfm.Properties, propertyName); return val != null ? valueFactory(val) : default(TValue); }) .Distinct()); }