TextMeshPro build errors

When entering play mode, everything functions correctly: no errors, and so on.
However, when I try to build my game, I get a string of errors, all related to the serialisation of TextMeshPro components. I also get the error Error building player because script class layout is incompatible between the editor and the player.This is the error list I get:
(Note: I managed to fix one of the errors originating from one of my scripts by changing the variable so that it was not public. In the DLLs, I have no way of doing this.)
Is there any permanent fix for this? I’ve had problems with TMP before.
Thanks.

This behavior looks like something specific to your project. Perhaps a mismatched version of TMP for the version of Unity that you are using.

Did you recently upgrade Unity without upgrading to the corresponding version of TextMesh Pro?

What version of Unity and TextMesh Pro are you using?

Did you move the TextMesh Pro folder to some other location or move its Editor script folder?

I’m using 2017.3.0f3 and the DLL name under /TextMesh Pro/Plugins/Runtime DLL is TextMeshPro-2017.3-1.0.56-Runtime.dll.
Hope this helps.

That is the correct version.

What about my other questions? Did you move any of the TextMesh Pro folders or resources to some other locations?

You should not be getting any of these errors so something is causing this behavior. As usual finding what is always the hard part.

See if you get the same behavior when creating a new empty project with just TextMesh Pro. This would allow us to narrow down what might be the cause like some other script, asset, etc.

At one point, we renamed the folder but renamed it back once we had fixed some compatibility issues. Would this make a difference?

Renaming the folders would certainly result in issues.

Try what I requested above and then assuming it all works fine, review the structure and names of folders and make sure it is mirrored in your project.