0
votes

I have migrated my project from .NET 3.5 to 4.0 and hence I am using MSBuild.exe of C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319 instead of C:\WINDOWS\Microsoft.NET\Framework\v3.5. This is causing ExecuteDDL task failure. Please help. Cheers, Nabin

2
Sure, that's enough information to go on. Not. Exceptions? Inner exceptions? Event logs? Build logs? – user1228
The "ExecuteDDL" task failed unexpectedly. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SqlServer.ConnectionInfo, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.SqlServer.ConnectionInfo, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& – Nabin

2 Answers

1
votes

"Could not load file or assembly 'Microsoft.SqlServer.ConnectionInfo, Version=9.0.242.0,"

Looks like it's looking for the SQL Server 2005 client tools, do you have these installed?

1
votes

The ExecuteDDL task from MSBuild community tasks uses the Microsoft.SqlServer.ConnectionInfo assembly. The assembly is loaded dynamically and it trys to load the following assemblies in the following order:

  • Microsoft.SqlServer.ConnectionInfo, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91
  • Microsoft.SqlServer.ConnectionInfo, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91

So it tries to load 10.0 (Sql Server 2008), then 9.0 (Sql Server 2005). If it can't find either of these it fails with the exception you received.

Sql Server puts these in the GAC by default, so check to see if these are on your machine first. If that doesn't solve your problem let me know. I wrote the task and I'll get some more info from you and get it working.

Update

Sql Server 2008 Support wasn't added until 03/2009 and unfortunately the official releases are older than that. Grab the nightly build from http://msbuildtasks.tigris.org/ which has a lot of bug fixes: