The expansion was to accommodate 100 new pupils following the arrival of 6 Royal Logistics Corps to Dishforth Airfield.
HRH The Duke, who holds the honorary military appointment of Deputy Colonel-in-Chief of the Royal Logistics Corps, unveiled a commemorative plaque at the new classrooms which will house the Early Years Foundation.
Headteacher Julie Lyon said: “The successful integration of the 6RLC families to Dishforth Airfield Primary School has been the result of years of planning.
“We have been extremely pleased with how our new pupils have settled in and HRH The Duke’s visit was a wonderful way to celebrate the beginning of a new era for the school.”
The Royal party also enjoyed a demonstration of street dance and drumming given by pupils and listened to the school choir.
They were then given a guided tour by Hayden Learmonth, Year 3, and Deborah Buliruarua, a Year 6 pupil.