title: Delphi .dpr and .dproj - consequences of a mismatch
body: <p>What are the implications of having a mismatch in the 'uses' list in a Delphi projects .dpr and .dproj files (XE if it's important)?</p>
  
  <p>From first glance it appears that the .dproj gets updated to match the .dpr but is this always the case?</p>
  
  <p>The reason we have this issue is that we need to apply a parameter to the project after checking out of version control, this parameter varies per developer so was always giving us conflicts in version control. We decided to sort this issue using a template file and generating the .dproj file from this. We now have the potential problem of developers forgetting to modify the template when adding/removing .pas files from the project. As I said, it <em>seems</em> to work, but does anyone know any dangers that we may encounter?</p>
  
  <p>Alternatively, does anyone have a better idea for a solution? DProjMaker seems interesting - anyone used it? <a href="http://delphi-divining.blogspot.co.uk/2012/10/dprojmaker-tool-to-create-delphi.html" rel="nofollow">http://delphi-divining.blogspot.co.uk/2012/10/dprojmaker-tool-to-create-delphi.html</a></p>
  
  <p>2nd option - could we just remove all .pas links from the templates and rely on Delphi regenerating them when needed? I think this will only affect MSBuild? (can someone confirm)</p>
  
  <p><strong>Additional info in response to comment:</strong>
  The parameter is an encoded string that contains database connection information (and possibly some other stuff, I've not looked too deeply). </p>
  
  <p>In normal (user) operation we have a login program where the user selects which database they want to connect and launches the other apps passing this information as a parameter. As developers we need to launch the programs directly, so we generate the relevant code for the database we're connecting to and have it set as the parameter to be passed to the application in Delphi.</p>