he paied a visit to 是用来修饰 the building 的。pay a visit to 是短语,参观的意思.the building 作为主语的话,后边缺少的就是动词了,the building是单数名词,所以动词需要用stands