Schema referenced by Map '<Namespace>.<MappName>' has been deleted. The local, cached version of the BizTalk Server group configuration is out of date. You must refresh the BizTalk Server group configuration before making further changes. (Microsoft.BizTalk.Administration.SnapIn)
The deployment script stop working as deploying any DLL using BTSTask.exe was causing the same error:
Apart from the bugs fixed in Cumulative Update 1 this error can be caused by one more reason which was the case in this scenario.
You can re-produce this error by following these steps:
Step 1: Create a BizTalk project and add 2 sample schemas to it.
Step 2: Create another project add reference to the above BizTalk Project and add a mapper and use the 2 sample schemas created in Step 1 as source and destination in this map.
Step 3: Deploy the solution to BizTalk.
Step 4: Add another sample schema to the project created in Step 1.
Step 5: Update the mapper created in step 2 and replace either the source or destination schema with the new schema created in Step 4.
Step 6: Deploy only the DLL for the mapper project only.
Step 7: Try to refresh the BizTalk group in the BizTalk Administration Console or use the BTSTask you will start getting this error.
As BTSTask was not able to add/remove any resource so the entry for this mapper from the BizTalk Management DB was removed manually by executing the following queries in SQL management studio:
Step 1: Open the SQL management Studio and connect to the instance having BizTalkMgmtDb. Run this query:
SELECT [id] FROM [BizTalkMgmtDb].[dbo].[bts_item]
WHERE FullName = '<CopyTheNameOfTheMapFromErrorMessage>'
GO
Step 2: Get the value of id and replace it in below query:
DELETE FROM [BizTalkMgmtDb].[dbo].[bt_MapSpec] WHERE itemid = <Value of id from above query>
It will delete the entry for map from the BizTalk Management Database now you can rectify the issue with your deployment script and can redeploy the solution.
Cheers
Rohit Sharma