I understand for the most part how signing an exe using the Microsoft signtool works. I have an exe (C#) that I want to only run if the file has not been modified, and if I understand correctly, this can verify that. What I don’t understand is how to verify the file. If my code to verify the file is built inside the exe I am verifying, couldn’t one just decompile the exe, remove the code that checks the file, and re-compile it?
My understanding of code signing is essentially this:

Image credit to:
https://developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html
But I don’t see how one couldn’t just take the mechanism that checks the file’s integrity out of the file entirely, and run the program after it has been modified.
Yes, someone may do this, but not you are responsible to verify the code. The CLR does it automatically for dlls that have a public key token. If the public key doesn’t match the file hash, the CLR will not load the file.
Simply give your exe a strong name and you will be safe.