For some integration tests I want to connect to the database and run a .sql file that has the schema needed for the tests to actually run, including GO statements. How can I
If you add following references in your project, then original code will work fine.
I use SQL 2008 Express.
Path: C:\Program Files (x86)\Microsoft SQL Server\100\SDK\Assemblies\
Files: microsoft.sqlserver.smo.dll, microsoft.sqlserver.connectioninfo.dll and Microsoft.SqlServer.Management.Sdk.Sfc.dll