Debugging the disappearing SQL Add Adapter metadata wizard

28 July 2008

This afternoon I encountered a very annoying problem. I wanted to generate a schema with the add adapter metadata wizard to use with the SQL adapter. Normally the wizard shows a couple of screens in which you have to enter information and at the end (after pressing finish button) you’ll get a generated XSD. On my dev box when I was half way in the wizard I pressed next and …… nothing …… the Wizard just disappeared. No error in the eventlog, no error in Visual Studio.

While googling for a solution to this problem I found a number of people having exactly the same problem. Besides re-installing the entire machine there is no real solution mentioned. Because I didn’t want to reinstall my machine and because I think there are different causes for this problem I decided to take the hard way. Below is a description of the steps I took to save myself a lot of time:

I started by looking for the SQL Adapter binaries. No rocket science is needed to find out that those are located inside the ‘Microsoft.BizTalk.Adapter.SQLAdmin.dll’ assembly. This assembly can be found in the BizTalk installation folder.
The next step is to use Reflector together with Reflector FileDisassembler AddIn to ‘extract’ the source code of the wizard.
After fixing some references and other minor things I was able to recompile the .dll.
Next thing is to tell Visual Studio debugger to break on all exceptions instead of having the code handle them.  (You can do this in the dialog which appears by pressing CTRL-ALT-E in Visual Studio).
By starting a new Visual Studio instance and attaching the other one (with the extraced source) to it I was able to debug the wizard.
When I reached the point where the wizard was disappearing before I now got an exception telling me exactly what was wrong (see picture below). 

SQL Adapter FileNotFoundException

SQL Adapter FileNotFoundException

It turned out the installation of MSXML on my box was wrong/corrupted. I got a FileNotFoundException which basically told me that I had to (re)install MSXML. After reinstalling MSXML and throwing away the decompiled source (to keep MS people happy ;-) ) the wizard was working OK.

I was very happy that I reduced completely reinstalling the BTS box to just reinstalling MSXML.


Follow

Get every new post delivered to your Inbox.