Compressor device comprising an oil-injected compressor element having an inlet for gas to be compressed and an outlet for compressed gas, wherein the outlet is connected via an outlet line to an oil separator connected by an injection line to said compressor element for an injection of oil, wherein controllable cooling means for the oil are provided, the compressor device further being provided with a control unit and thereto connected measuring means for controlling the cooling means to control a temperature (T_uit_afsch) of the compressed gas downstream of the oil separator , characterized in that the measuring means include means for determining a temperature (T_uit) of the compressed gas at the outlet and a temperature sensor for determining the temperature (T_uit_afsch) of the compressed gas downstream of the oil separator , the control unit containing a controller for controlling the cooling means on the basis of signals from said means and the temperature sensor and on the basis of a dew point of the compressed gas; and that the controller of the control unit comprises - a feed-forward control which will calculate a corrected temperature set point (T_set_corr) on the basis of the temperature (T_uit) and the dew point of the compressed gas, which is used by a controller to control the cooling means on the basis of a difference between the corrected temperature set point (T_set_corr) and the temperature (T_uit_afsch) of the compressed gas downstream of the oil separator , in such a way that the temperature (T_uit_afsch) of the compressed gas downstream of the oil separator is higher than said dew point; or - a master controller and a slave controller , wherein the master controller determines a corrected temperature set point (T_set_corr) for the slave controller on the basis of the dew point and the temperature (T_uit_afsch) of the compressed gas downstream of the oil separator , which will control the cooling means on the basis of this corrected temperature set point (T_set_corr) and the temperature (T_uit) of the compressed gas at the outlet , in such a way that the temperature (T_uit_afsch) of the compressed gas downstream of the oil separator is higher than said dew point. - a feed-forward control which will calculate a corrected temperature set point (T_set_corr) on the basis of the temperature (T_uit) and the dew point of the compressed gas, which is used by a controller to control the cooling means on the basis of a difference between the corrected temperature set point (T_set_corr) and the temperature (T_uit_afsch) of the compressed gas downstream of the oil separator , in such a way that the temperature (T_uit_afsch) of the compressed gas downstream of the oil separator is higher than said dew point; or - a master controller and a slave controller , wherein the master controller determines a corrected temperature set point (T_set_corr) for the slave controller on the basis of the dew point and the temperature (T_uit_afsch) of the compressed gas downstream of the oil separator , which will control the cooling means on the basis of this corrected temperature set point (T_set_corr) and the temperature (T_uit) of the compressed gas at the outlet , in such a way that the temperature (T_uit_afsch) of the compressed gas downstream of the oil separator is higher than said dew point. <EOS>