How to Compile and Run FindGeneric
The complete FindGeneric sample, including a Visual Studio 2008 project file, is in the CCI Metadata source tree under the Samples folder.
To compile and run FindGeneric:
- If you have not done so already, download the CCI Metadata source tree. For details on how to download the CCI Metadata sources, see
- In the source tree’s root folder, double-click the tree’s Visual Studio 2008 solution file, Metadata.sln. This solution encompasses the entire source tree, including the samples.
- If you have not done so already, build the entire source tree. This builds the CCI Metadata DLLS that the sample requires, along with the PeToPe application, PeToPe.exe.
- To view the complete FindGeneric source code, go to Solution Explorer and expand the Samples folder, which contains all the CCI Metadata samples.
- To run FindGeneric, open a command window, navigate to the FindGeneric project’s bin\Debug folder, and run PeToPe.exe against one or more .NET DLL or EXE files. The following example runs FindGeneric against itself.
...\Debug> FindGeneric.exe FindGeneric.exe
FindGeneric prints the signature for each generic method in a generic type in the command window.
The native FindGeneric sample does not contain any generic types or methods. To make the example print signatures, add a test class to FindGeneric, as described in
Add a Test Class
. You can also run FindGeneric on any suitable DLL or EXE file.