A method for producing a hermetically gas-tight optoelectronic or electro-optical component for optoelectronic measurement and analysis of gases or gas mixtures with high robustness against heat and moisture, comprising the following steps: a) providing a carrier for at least one optoelectronic or electro-optical transducer element, said carrier also being used as the base plate of a housing, b) providing a housing cap which has an opening (4.2) on a base surface (4.1) and which consists of a metallic material with a cover rate of less than 10 -8 mbar l/s, c) creating at least one breakthrough in the housing cap such that, after the housing cap has been placed on the carrier, an interior space for receiving the at least one transducer element is formed by the housing cap above the carrier, radiation relevant for the at least one transducer element can pass unhindered through the housing cap along a beam path aligned substantially orthogonally to the carrier between a breakthrough and the transducer element, d) providing at least one window element, which is transparent to the transducerrelevant radiation, with a shape and size adapted to the respective breakthrough of the housing cap, e) producing a circumferential edge metallisation (10.2) on the window element as a contact surface to an edge region of the at least one breakthrough in the form of a layer sequence of at least two layers, wherein the window element is coated starting with a first layer of chromium or titanium and a second layer of at least one element from the group consisting of nickel, iron-nickel, platinum and palladium, f) mounting carrier, transducer element, housing cap and the at least one window element, wherein a hermetically gas-tight connection between the housing cap and the at least one window element is produced by melting a metallic material between the edge metallisation (10.2) of the at least one window element and the housing cap and a hermetically gas-tight connection between the housing cap and the carrier is produced by forming a second seam of molten metallic material in a hermetically gas-tight manner with the carrier, and the housing cap is positioned on the carrier before being connected to the carrier, such that the at least one breakthrough is aligned with respect to the respectively required beam path of the at least one transducer element. a) providing a carrier for at least one optoelectronic or electro-optical transducer element, said carrier also being used as the base plate of a housing, b) providing a housing cap which has an opening (4.2) on a base surface (4.1) and which consists of a metallic material with a cover rate of less than 10 -8 mbar l/s, c) creating at least one breakthrough in the housing cap such that, after the housing cap has been placed on the carrier, an interior space for receiving the at least one transducer element is formed by the housing cap above the carrier, radiation relevant for the at least one transducer element can pass unhindered through the housing cap along a beam path aligned substantially orthogonally to the carrier between a breakthrough and the transducer element, d) providing at least one window element, which is transparent to the transducerrelevant radiation, with a shape and size adapted to the respective breakthrough of the housing cap, e) producing a circumferential edge metallisation (10.2) on the window element as a contact surface to an edge region of the at least one breakthrough in the form of a layer sequence of at least two layers, wherein the window element is coated starting with a first layer of chromium or titanium and a second layer of at least one element from the group consisting of nickel, iron-nickel, platinum and palladium, f) mounting carrier, transducer element, housing cap and the at least one window element, wherein a hermetically gas-tight connection between the housing cap and the at least one window element is produced by melting a metallic material between the edge metallisation (10.2) of the at least one window element and the housing cap and a hermetically gas-tight connection between the housing cap and the carrier is produced by forming a second seam of molten metallic material in a hermetically gas-tight manner with the carrier, and the housing cap is positioned on the carrier before being connected to the carrier, such that the at least one breakthrough is aligned with respect to the respectively required beam path of the at least one transducer element.