How do I share my game with a friend?

Every time they try to open the game it says “The code execution cannot proceed because UnityPlayer.dll was not found.”

You can’t just hand someone the executable. You need to give them the entire build folder. This has the .exe, a couple of .dlls (one is the UnityPlayer), and the Build_Data folder.

So find the folder you made the build in, zip it up, and send it to them. Then it should be work.