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 Answers
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: