A very, very interesting question. I just did a little bit of research and found that this practice is definitely Old Testament.
Sol′o·mon offered the communion sacrifices to Jehovah: He offered 22,000 cattle and 120,000 sheep. Thus the king and all the Israelites inaugurated the house of Jehovah. On that day the king had to sanctify the middle of the courtyard that is before the house of Jehovah, for there he had to offer up the burnt sacrifices, the grain offerings, and the fat pieces of the communion sacrifices, because the copper altar that is before Jehovah was too small to contain the burnt sacrifices, the grain offerings, and the fat pieces of the communion sacrifices. At that time Sol′o·mon held the festival together with all Israel, a great congregation from Le′bo-ha′math down to the Wadi of Egypt, before Jehovah our God for 7 days and then another 7 days, 14 days in all. On the following day, he sent the people away, and they blessed the king and went to their homes rejoicing and feeling glad of heart over all the goodness that Jehovah had shown to David his servant and Israel his people. - 1 Kings 8:63-66
Dedication of a building is like inaugurating.
There's reference to the Festival of Dedication at John 10:22. What was this? It wasn't a festival based on the Law, it turns out. I didn't know this.
The observance of the Festival of Dedication (Heb., chanuk·kah′) commemorates the recovery of Jewish independence from Syro-Grecian domination and the rededication to Jehovah of the temple at Jerusalem, which had been desecrated by Antiochus IV Epiphanes, who called himself The·os′ E·pi·pha·nes′ (“God Manifest”) - it-1 p. 824
This is actually quite interesting. Many scholars feel that this event marks the end of the 2300 days in Daniel 12. It makes for good research. I digress.
Another mention of dedication is here:
Whatever I have that could benefit you is corban (that is, a gift dedicated to God) - Mark 7:11
The first reference to any dedication of a building I could find is from w50 p. 220-224. The article starts out:
MONDAY, January 30, 1950, was set for dedication of the new Bethel to the consecrated service of the Most High God.
Of course, there is no record in the New Testament / Greek Scriptures of any buildings being consecrated to the service of the Most High God. Why? Stephen answers this in Acts 7:48-50:
However, the Most High does not dwell in houses made with hands, just as the prophet says: ‘The heaven is my throne, and the earth is my footstool. What sort of house will you build for me? Jehovah says. Or where is my resting-place? My hand made all these things, did it not?
In addition, in New Jerusalem, there is no temple as a building. Why? Revelation 21:22 answers:
I did not see a temple in it, for Jehovah God the Almighty is its temple, also the Lamb is.
In conclusion, from a very quick look into this, dedicating a building to God is an Old Testament practice. Is it wrong? Not that I can tell. But it's certainly not necessary.