I'm assuming you're using MSVC++, which I could be wrong, but the best solution is to restart your computer, copy all of your files, resources included into a new project and try again. MSVC++ is known for corrupting it's project files. If you're using a different IDE, it's possible a resource file is missing/corrupt/deleted. You may have to find your .res file as well and see what it contains...this could possibly mean rewriting it. Just look around.
The reason the .exe works is because it's already compiled into a binary. This means that regardless of what happens to the rest of your project, minus DLL's, it will always work. In order to compile again, try the above and post back.