Building Performance Optimization (BPO) plays a pivotal role in enhancing building performance, guaranteeing comfort while reducing resource consumption. Existing performance-driven generative design is computational demanding and difficult to be generalized to other similar buildings with difficult to be generalized to other building types or climate conditions. To fill this gap, this paper introduces a novel framework, which integrates multitask learning (MTL), code compliance check, and multi-objective optimization through NSGA-III algorithm. This framework is able to identify Paratoo Optimal design solutions, which comply with building codes, at low computation costs. The framework begins with selecting key design variables that are critical to building energy, comfort performance and life cycle cost. It then employs MTL to enhance the model's accuracy while reducing computational costs. Next, we designed a code compliance checking module followed by the NSGA-III optimization process, with the objective of identifying solutions that comply with existing building codes. The results indicate that the proposed MTL network achieved an R2 score of 0.983–0.993 on the test set. In the particular case study where equal weights are preferred, this approach yielded noteworthy reductions of 27.65%, 19.55%, and 31.13% in Building Energy Consumption (BEC), Life Cycle Cost (LCC), and Residue of continuous Daylight Autonomy (RcDA), respectively, for a rural dwelling, and exclude solutions that fail to satisfy regulatory standards. This framework allows designer to input the weights of each objective based on their preference and can be applied to other building types and climate regions. Last, we develop a solution selection tool based on the results output by the framework we proposed, which can be found at https://github.com/LiMingchen159/Village-House-Design-Strategy-in-Hebei-Province-China.