private void ReplaceCustomPropertiesLineageIDs(IDTSCustomPropertyCollectionXX customProps) { IDTSCustomPropertyXX friendlyExpression = null; IDTSCustomPropertyXX expression = null; foreach (IDTSCustomPropertyXX prop in customProps) { if (prop.Name == "FriendlyExpression") { friendlyExpression = prop; } else if (prop.Name == "Expression") { prop.Value = ReplaceValueLineageIDs(prop.Value); expression = prop; } else if (prop.ContainsID) { if (prop.TypeConverter == "LCMappingType") { //this property shouldn't have ContainsID=true set, so we have to workaround this bug: https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=338029 } else { prop.Value = ReplaceValueLineageIDs(prop.Value); } } } if (friendlyExpression != null && expression != null) { friendlyExpression.Value = expression.Value; } }