Indeed, a failure when building the plugin would be the behavior I think we should be seeing. However, I think this is not quite what you’re seeing.
It gets confusing because I’m not sure how UE4 behaves in the instance that you have the same plugin in both your project folder, and installed to the engine. If you look at the build output you linked though, it’s raising the error on the header file in the engine, not within the plugin folder that it’s currently building. You should remove the plugin from the engine before trying to rebuild it.
Try the following:
- Delete the /4.12/Engine/Plugins/MyTestPlugin folder.
- Ensure that TestStruct.h (within YourProject/Plugins/MyTestPlugin/Source/MyTestPlugin/Public or similar) is the corrected version.
- Now resume from the original step 2.