This post is a follow up to this post about a talk I gave at the Boston Code Camp.

One of the questions at the end of my talk was

if you change the target database version, is the schema validated against the selected version?

With some research I found the this article on MSDN. The article tells how you if you add “ON [PRIMARY]” to the end of a script, and then change the Target Version to Azure, the validation fails because “Filegroup reference and partitioning scheme” is not valid in Azure.

I also did my own test case using my example database project on github.
I added a field with the type of “Date” and changed the Target Version to 2005. The validation showed an error as expected because the “Date” datatype is not valid in SQL 2005.

SQL Date Error

So the answer is “Yes”, and SQL Database Project does validate for the target version selected.