In our setup program, we have recently changed to use vsdbcmd to deploy our dbschema file. I followed the steps in this Microsoft MSDN article on how to deploy vsdbcmd.exe on a machine that doesn’t have Visual Studio installed. However, I kept getting the follow error when I tested the program on a non-developer machine: An unexpected failure occurred: An attempt was made to load a program with an in correct format. (Exception from HRESULT: 0x8007000B). After doing some research, I got it working by following the instructions in this blog article. Basically, you do not need to copy any of the SQL CE libraries or the BatchParser library. Simply copy all the Visual Studio files listed in the MSDN article, then install SQL SMO and SQL Compact on the machine where you run vsdbcmd. That should work.

Advertisements