0

I have a database project in Visual Studio 2010 that deploys tables and stored procedures to the server without issue. However, none of the index scripts get included in the sql output script and therefore are not getting applied.

I have been unable to find anything that addresses this issue. I don't know what I'm missing. The index scripts' "Build Action" properties are set to "Build" and I don't see anything in the .sqldeployment or .sqlsettings files regarding index deployment specifically.

norepro
  • 777
  • 2
  • 9
  • 18

1 Answers1

1

I discovered the issue. When anyone on my team did a schema compare to their local databases, VS would block comment the index scripts because those indexes don't exist locally. Once I discovered this and uncommented the scripts, the indexes were once again included in the deployment.

norepro
  • 777
  • 2
  • 9
  • 18
  • I'm running into something similar - what do you mean by "block comment"? Was it actually modifying the script files? – Bobby B Jan 18 '13 at 22:08
  • @Bobby it would comment out the entire block of code inside the script file. – norepro Jan 28 '13 at 16:28
  • Interestingly weird. I found that mine was not set to build with the project for some reason (check the properties on the file). I updated that property and everything worked as it should. – Bobby B Jan 28 '13 at 20:41