Problem loading type library

Hi everyone,

i am doing an upgrade from NAV2013r2 to NAV2018.
In the old version, I've created a codeunit to manage different connection for an integration with a delivery enterprise. For this, in the procedures of the codeunit, exist different automation variables. In the old server, work perfect, but when I'0m trying o compile this CodeUbnit in NAV2018, in a new server, I get this error:

"Cannot obtain information of the type library
The type library could be damaged or has an invalid format.
Try to register again OLE control or the Automation server"

Any hint?