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,开发者_如何学Go Nabin
"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?
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:
- Zip File
- MSI Installer
精彩评论