I am working with a very big project (a solution that contains 16 projects and each project contains about 100 files).

It is written in C++/C# with Visual Studio 2005.
One of the projects has around 2000 resources out of which only 400 are actually used.
How do I remove those unused resources?

I tried to accomplish the task by searching for used ones.
It worked and I was able to build the solution, but it broke at runtime.

I guess because enums are used. (IMPORTANT)

How can I make sure that it doesn't break at runtime?

EDIT:
I think one method could be to generate the resource (that is not found) on the fly at runtime (somehow).
But I have no idea about ... anything.

NOTE: It's okay if a few unnecessary resources are still there.

Edit
Report