Open tfabraham opened 6 years ago
[2nice@6/18/2014] I believe that this should be added to PrependToBindingPortNames task's execute method, since the sendports in the party collection are marked up a little different:
this.Log.LogMessage(MessageImportance.Normal, "Prepending '{0}' to SendPortReference names in parties...", _stringToPrepend);
nodesToUpdate = bindingDoc.SelectNodes("//SendPortReference/name");
UpdatePortRefs(nodesToUpdate, PortType.Send, bindingDoc);
Regards, Bo.
[tfabraham@6/18/2014] That was my assumption as well, thanks!
[2nice@6/19/2014] This temporary fix works for me. Not sure if its a general fix. In execute method add:
this.Log.LogMessage(MessageImportance.Normal, "Prepending '{0}' to SendPortReference names in parties...", _stringToPrepend);
nodesToUpdate = bindingDoc.SelectNodes("//*[local-name()='SendPortReference']/*[local-name()='Name']");
UpdatePartyPortReferences(nodesToUpdate, bindingDoc);
and add the followring private method:
private void UpdatePartyPortReferences(XmlNodeList nodesToUpdate, XmlDocument bindingDoc)
{
foreach (XmlElement nodeToUpdate in nodesToUpdate)
{
XmlNode portDefinition =
bindingDoc.SelectSingleNode(string.Format("//SendPort[@Name='{0}']", nodeToUpdate.InnerText));
// only sendports in parties
// check if it's used
if (portDefinition != null)
{
nodeToUpdate.InnerText = string.Format("{0}_{1}", _stringToPrepend, nodeToUpdate.InnerText);
}
}
}
When one uses the feature, the Send port references in the of the binding file are not updated to be version specific, like all other send ports.
In all other places my send ports get the prefix: {projectname}{projectversion} but not in the PartyCollection.
This work item was migrated from CodePlex
CodePlex work item ID: '10658' Vote count: '1'