How do you restore (or check) only the extended properties in a MS SQL Server .Bak file? We store the version number of our DBs as an extended property. As part of the automated build process, I want to be able to check that the "empty" DB that is part of the build set matches the version number of the executables being built.

I understand that I can't just read the *.bak file directly. I already query the (restored) DB to get that property. However, as part of the build process it seems silly to restore the entire DB just to get this one piece of information.

Is there a simple way to get just the extended properties without restoring the whole DB?
There's really no other way that I can think of than restoring the database.  The best option would be to have versioning stored elsewhere so that you don't have to go through all this trouble just to get a version number.

What you could do is have a little configuration file and a small application that performs the backups for you, and stores a key/value pair of filename/version.  That way you will have a reference as to what backup file is for which database version.  An easy application to write and it would save you a ton of time with restoring/querying just to find out this bit of data.