A heat exchanger, particularly for charge air or exhaust gas, performs heat exchange between a first fluid and a second fluid, and includes heat exchanging guides for the first and second fluids, the guides being separated from each other in a core, the core having a plurality of flow channels through which the first fluid flows, and a housing that receives the flow channels and through which the second fluid flows. The heat exchanger also includes at least one compartment lid, which is flow-connected to the flow channels, and a base that is attached to the compartment lid and that is equipped with one or more passage openings for flow channels. The compartment lid is attached to the base via one or more connections which connections are bolted connections and / or a slotted crimping.