Reputation: 1277
So, I've got a project in SSDT (SQL Server Data Tools) in Visual Studio 2012. When I build this project, there are no errors - it builds fine (not even a warning or a message).
However, if I try and publish I get:
The script file could not be found
(no more information).
If I schema compare the project with an existing database, all I get is:
Cannot generate deployment plan
(again, no more information).
Only when I do 'Run Code Analysis' do I get an error that could possibly mean anything:
SQL72043: 7 elements are in an error state
I know this error can be caused by a missing comma in a table definition or similar trivial errors, but I've been tearing my hair out for hours looking through every line of SQL code in the project to find a problem. Is there any way I can shed more light on what lines of my code are causing the error?
Upvotes: 12
Views: 3656
Reputation: 28310
You can just go to IDE menu 'Project' -> 'Reanalyze Project' and then rebuild your database project to get rid of this error on Publish command.
Upvotes: 6
Reputation: 537
Deleting the dbml files didn't work for me, but to get the schema compare to work and not recieve the Cannot generate deployment plan error, I switched the source and target and compared the schemas again.
Upvotes: 1