Multi-family buildings (MFB) accommodate 53% of the German apartment stock. Although PV-systems on single-family buildings are widely implemented, the PV-potential on MFBs has barely been touched. Therefore, the German government introduced the Mieterstromgesetz, the tenants electricity law (TEL), in 2016. This law exempts electricity directly produced and consumed in a building from certain charges and taxes. Within the TEL framework, the landlord acts as the local electricity provider and can profit from selling electricity to the tenants and tenants can save electricity costs. This paper analyses the techno-economic effects of the TEL on the energy system layout of a MFB in Germany. Furthermore, it gives implications on how the TEL affects the tenant-landlord relationship. In this analyses, a MILP model is used to maximize the net present value (NPV) and determines the optimal layout and dispatch of the energy system. The model can choose to invest in PV, CHP and a battery storage system. Additionally, one to six electric vehicles (EVs) are integrated into the model. The novelty of this paper is the model-based analysis of the German Mieterstromgesetz considering EVs. ... mehrThe results show that the combination of PV and CHP is the most profitable system layout with NPVs up to 31.9ke. An optimized charging strategy increases the self-consumption rate and the NPV substantially compared to a fast-charging-strategy. Thus, the TEL can create a symbiotic relationship between landlords and tenants.