Friday, January 12, 2007

Some items in the removed assembly are still being used by items not defined in the same assembly

When trying to redeploy a BizTalk 2004 solution I received the following error message:

"Some items in the removed assembly are still being used by items not defined in the same assembly, thus removal of the assembly failed. Make sure that items in the assembly you are trying to remove fulfill the following conditions:
1. Pipelines, maps, and schemas are not being used by Send Ports or Receive Locations
2. Roles have no enlisted parties."

When you execute the following query against the configuration database, the result gives you the name(s) of the BizTalk artifact(s) which block(s) the deployment of your solution:

select 'RcvPort' PortType, r.nvcName Port, item.name MapName,assem.nvcName Assembly, nSequence, indoc_docspec_name, outdoc_docspec_name from bts_receiveport_transform rtinner join bts_receiveport r on rt.nReceivePortID = r.nIDinner join bt_mapspec ms on ms.id = rt.uidTransformGUIDinner join bts_assembly assem on ms.assemblyid = assem.nID inner join bts_item item on ms.itemid = item.id
union
select 'SendPort' PortType, r.nvcName Port, item.name MapName, assem.nvcName Assembly, nSequence, indoc_docspec_name, outdoc_docspec_name from bts_sendport_transform rtinner join bts_sendport r on rt.nSendPortID = r.nIDinner join bt_mapspec ms on ms.id = rt.uidTransformGUIDinner join bts_assembly assem on ms.assemblyid = assem.nID inner join bts_item item on ms.itemid = item.id
order by PortType, Port, nSequence

In my case a Send Port with a filter (which contained a reference to a schema) blocked redeployment. Removing the filter from the Send port was enough to be able to redeploy.

No comments: