Tuesday, 21 October 2014

BizTalk BTDF Copy all files ,folders and subfolders

I use to write a bunch of lines of code to create folders and subfolders to copy along with BTDF Package.  I was't sure how to copy all files and fodler in single line of code and could't find any clue when I googled.

If I have a Directory stucture  like
Folder1 -> SubFolder1 -> SubSubFolder1->*.*   and so on it was quite hard to keep adding
< copy > nodes under   Target Name="CustomRedist" node for each Folder and subfolders.

Recently I found a better way of copying all folder , subfolder and all files using "RecursiveDir" option using BTDF.  Hope this would help you to minimize the code.


Result :
It copied below list of folders and files  at package  Installed folder.


Drop a comment if this article helps you to solve your problemYou can reach me @ raj.webjunky@yahoo.com

Friday, 17 October 2014

BizTalk Deploy Map Stored procedure returned non-zero result Microsoft.BizTalk.Deployment.Assembly.BtsMap.Save()

You might be surprisd to see unknown error messag while you are deploying the bizTalk maps using Visual studio  or deploy maps directly using add as resource. I googled nearly 1 day to find a right fix but could't find any.

I could find a un expected error as detailed below.

Error :

Failed to deploy map "MyTestMapName".
Error saving map. Stored procedure returned non-zero result. Check if source and target schemas are present.

Error 140 at Microsoft.BizTalk.Deployment.Assembly.BtsMap.Save()
   at Microsoft.BizTalk.Deployment.Assembly.BtsArtifactCollection.Save()
   at Microsoft.BizTalk.Deployment.Assembly.BtsAssembly.Save(String applicationName)
   at Microsoft.BizTalk.Deployment.BizTalkAssembly.PrivateDeploy(String server, String database, String assemblyPathname, String applicationName)
   at Microsoft.BizTalk.Deployment.BizTalkAssembly.Deploy(Boolean redeploy, String server, String database, String assemblyPathname, String group, String applicationName, ApplicationLog log) 

Solution :
What I could find here was, you might be referring the wrong schemas at source  or destination of your map. I am really surprised how map does not recognize the Schemas when they were not in list.

Step1 : deleted all .cs class for each map which you have at solution
Step2 : re- refer the source and destination schemas
Step3:  Clear Bin folders and Rebuild and Deploy the solution.

It worked for me with above steps, hope you can solve it too.

Drop a comment if this article helped you to solve your problemYou can reach me @ raj.webjunky@yahoo.com