title: SQL72043 and other SSDT errors: how can I find the incorrect code?
body: <p>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).</p>
  
  <p>However, if I try and publish I get:</p>
  
  <p><code>The script file could not be found</code> (no more information).</p>
  
  <p>If I schema compare the project with an existing database, all I get is:</p>
  
  <p><code>Cannot generate deployment plan</code> (again, no more information). </p>
  
  <p>Only when I do 'Run Code Analysis' do I get an error that could possibly mean anything:</p>
  
  <p><code>SQL72043: 7 elements are in an error state</code></p>
  
  <p>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?</p>