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?
All system and user-defined error messages in an instance of the Database Engine are contained in the sys. messages catalog view. You can use the RAISERROR statement to return user-defined errors to an application.
If the error was one of the errors in the sys. messages catalog view, then @@ERROR contains the value from the sys. messages. message_id column for that error.
Close the SSMS application (if it is running). On the computer, go to Control Panel > All Control Panel Items > Programs and Features. From the list of programs, right click SQL Server Management Studio and click Uninstall. Click Repair to begin the SSMS install repair.
Delete the dbmdl file in your database project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With