1. Open the solution with Visual Studio; 2. Create a new project for the module in question. In my case, this was "DnsDxe" - part of "NetworkPkg"; 3. Change the project from `Application (.exe)` to `Static library (.lib)` 5. Add all the relevant C files to the project; 6. Fix the include path