From a programmer viewpoint, when this error occurs "Format of the executable (.exe) or library (.dll) is invalid." it is because the module is not a .net module or the file is corrupted. Check if you have any sort of trojans or viruses trying to modify your files .
Also sometimes it happens on 32bits operating system even if the software is developped to run on Any CPU architecture but i dont think it is the problem, may i ask what version of windows do you have ?