Problems building Database Project on a TFS 2010 Build Server – Unable to load sqlceme35.dll

Please note, this problem only applies to TFS 2010 Beta 2. The bug has been corrected in later builds.

As part of the current project I am working on, we have a 2008 Database project (Data Dude) in our solution. We found that the project built fine in our local Visual Studio 2010 environment however it would break the build on the build server. The message received was:

C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\TeamData\Microsoft.Data.Schema.TSqlTasks.targets (56): The "SqlBuildTask" task failed unexpectedly. System.DllNotFoundException: Unable to load DLL ‘sqlceme35.dll’: The specified module could not be found. (Exception from HRESULT: 0x8007007E)    at System.Data.SqlServerCe.NativeMethods.DllAddRef()……..

The build server for this project is a Windows Server 2008 R2 x64 virtual machine. After a series of emails, IMs and research with a fellow Readify colleague, Steve Godbold, we managed to discover it was an issue with the database project building on a x64 build server (as it worked correctly on a x86 build server). The issue is related more specifically to the build process not being able to locate the correct version of the sqlceme35.dll when building with a x64 target platform.  So here is the workaround.

In your Team Build definition, set the MSBuild Platform property to X86. You will find this property under Process > 3. Advanced

 

Save and rebuild.

Steve has put some more detail into this issue on his related blog post. Good luck!

More Information

VSTS DB Team Blog – What’s new for Data Dude in VS 2010

Follow

Get every new post delivered to your Inbox.