Okay, this is saying that the .dll you’re using was built for a different version of Unreal Engine than the project and so the code cannot be used, and that it’s not able to do automatically update it. There are a number of different causes but here’s how I would start to go about fixing them:
Close UE4 and VS if they’re open (They may get confused…)
Go to the project folder and right-click on the UE4 project file and choose “Switch Unreal Engine version…”. Choose the version of UE4 you’re trying to use for this project and let it update.
Again right-click on the UE4 project file and choose “Generate Visual Studio project”. This makes sure the C++ project is up-to-date and will be working with the correct version of the UE4 Engine code.
Open the Visual Studio project from the same folder. Hit “Build”. If there are errors here then you’ll need to fix them before moving on, this is the stage where your .dll is being rebuilt and opening it in UE4 before it’s working won’t help matters.
Open the UE4 project and hit Compile. It should return very quickly as we’ve actually just built the code into the .dll, but it’s useful to check that UE4 is using the latest version.
Have a nice cup of coffee to celebrate. Some may view this as optional but I find it helps.
It’s looking like there’s still something left over from the previous build.
Try going through the steps again but this time after you close UE4 and VS also delete the /Intermediate, /Binaries, and /Saved folders from your project so that there’s nowhere for the old code to live (Back things up first, always pays to be safe). Also instead of just hitting “Build” in VS open the Build menu and choose “Clean Solution” and then “Build Solution” to make it compile from scratch.
Hopefully this’ll work to remove the broken compile.