I have deployed a VS2010 database deployment to my build server on which SQL Server 2008 R2 is installed. Here's the output that matters:
Creating Acme.Database ...
D: \ TeamCity \ BuildAgent \ Work \ da2fc5ebd5805d44 \ src \ Acme.Database \ sql \ Acme.Database.sql (30.0): SQL01268 error: .Net SqlClient data provider: Msg 5133, Level 16, State 1, Line 1 The directory search for the file "C: \ Program Files \ Microsoft SQL Server ** MSSQL10.MSSQLSERVER ** \ MSSQL \ DATA \ Acme_Database_log.ldf" failed with an operating system error 3 (the system cannot find the path specified.).
D: \ TeamCity \ BuildAgent \ Work \ da2fc5ebd5805d44 \ src \ Acme.Database \ sql \ Acme.Database.sql (30.0): SQL01268 error: .Net SqlClient data provider: Msg 1802, Level 16, State 1, Line 1 CREATE DATABASE failed. Some file names cannot be created. Check related errors.
An error occurred while executing a batch.
Actual way here:
C: \ Program Files \ Microsoft SQL Server ** MSSQL10_50.MSSQLSERVER ** \ MSSQL \ DATA \ Acme_Database.mdf
The only link to the path that I could find in the database project was in the root folder, a file with the name:
PRIMARY.Acme_Database.sqlfile.sql
It includes the ALTER DATABASE statement, which I changed to use the _50 path, but that did not fix the problem.
I'm not sure why the db project needs to know where the actual MDF database file is located - I would think that it can just connect to it in TSQL, but in any case, I cannot get the project to deploy with this error and would appreciate for any help.
source share