/// <summary> /// The result will contain CLEAR and no sources specified in RestoreFallbackFolders if the clear keyword is in it. /// If there are additional fallback folders specified, the value AdditionalValue will be set in the result and then all the additional fallback folders will follow /// </summary> private static IEnumerable <string> GetRestoreFallbackFolders(IVsTargetFrameworks tfms) { var folders = HandleClear(MSBuildStringUtility.Split(GetNonEvaluatedPropertyOrNull(tfms, RestoreFallbackFolders, e => e))); var additional = MSBuildStringUtility.Split(GetNonEvaluatedPropertyOrNull(tfms, RestoreAdditionalProjectFallbackFolders, e => e)); return(VSRestoreSettingsUtilities.GetEntriesWithAdditional(folders, additional)); }
/// <summary> /// The result will contain CLEAR and no sources specified in RestoreFallbackFolders if the clear keyword is in it. /// If there are additional fallback folders specified, the value AdditionalValue will be set in the result and then all the additional fallback folders will follow /// </summary> internal static IEnumerable <string> GetRestoreFallbackFolders(IEnumerable tfms) { var folders = HandleClear(MSBuildStringUtility.Split(GetSingleNonEvaluatedPropertyOrNull(tfms, ProjectBuildProperties.RestoreFallbackFolders, e => e))); // Read RestoreAdditionalProjectFallbackFolders from the inner build. // Remove all excluded fallback folders listed in RestoreAdditionalProjectFallbackFoldersExcludes. var additional = MSBuildRestoreUtility.AggregateSources( values: GetAggregatePropertyValues(tfms, ProjectBuildProperties.RestoreAdditionalProjectFallbackFolders), excludeValues: GetAggregatePropertyValues(tfms, ProjectBuildProperties.RestoreAdditionalProjectFallbackFoldersExcludes)); return(VSRestoreSettingsUtilities.GetEntriesWithAdditional(folders, additional.ToArray())); }
/// <summary> /// The result will contain CLEAR and no sources specified in RestoreSources if the clear keyword is in it. /// If there are additional sources specified, the value AdditionalValue will be set in the result and then all the additional sources will follow /// </summary> internal static IEnumerable <string> GetRestoreSources(IEnumerable values) { var sources = HandleClear(MSBuildStringUtility.Split(GetSingleNonEvaluatedPropertyOrNull(values, ProjectBuildProperties.RestoreSources, e => e))); // Read RestoreAdditionalProjectSources from the inner build, these may be different between frameworks. // Exclude is not allowed for sources var additional = MSBuildRestoreUtility.AggregateSources( values: GetAggregatePropertyValues(values, ProjectBuildProperties.RestoreAdditionalProjectSources), excludeValues: Enumerable.Empty <string>()); return(VSRestoreSettingsUtilities.GetEntriesWithAdditional(sources, additional.ToArray())); }