tags:

views:

222

answers:

1

MSBUILD - When executing DDL file I get this error:

Unexpected System.Reflection.TargetInvocationException error executing SQL command

Before this execution two other ones are executed with no problems.

A: 

I'm assuming that you're using the ExecuteDDL task from the MSBuild Community Tasks library. If so, I've run into the same issue before and I have always found that the script fails if I run it manually in SQL Management Studio. I recommend that you run the two scripts that succeeded, then running the on that's failing manually and make sure that it doesn't have any errors.

Matt