Impotant to do that (from file https://download.beckhoff.com/download/Document/io/ethercat-development-products/ethercat_slave_design_quick_guide.pdf)

16. Copy the ESI file to the TwinCAT ESI...