build and package restore