I found a very easy and quick solution, first of all copy the .h and .cpp files to the “Source” folder of the project, then open both files, and you have to replace only one line of code for each file and that’s it.
In the .h file, the line of code is searched for example “class MIGRATIONTEST_API UNewActorComponent: public UActorComponent” and it replaces “MIGRATIONTEST_API” by anyone who is in another file originally created in this project.
With the .cpp file is almost the same, the line of code to replace is for example #include
“MigrationTest.h”, once this is done just compile again and go.