C#: How to programmatically compile a DLL with certain XML content in the resources of the DLL?
More specifically, I'm wanting to compile the XML required by Microsoft to create a GDF.dll file, in order to add a game to the Games Exp开发者_Python百科lorer in Windows 7. I found this KB article that explains how to programmatically compile source into a DLL or EXE, but I'm unsure how to properly compile a DLL that contains XML.
I've never created or embedded GDF files before but after a quick search on msdn I believe you will need to do the following:
- Use the Game Definition File Editor to create the GDF file and associated resource compiler scripts* (.rc files)
- Compile the script with RC
- Use the CompilerParameters.Win32Resource property to embed the .res file generated in step 2
*I'm making the assumption here that the Game Definition File Editor creates .rc files. If the tool creates .resx files convert them to .resource files using the resgen tool and embed them using the CompilerParameters.EmbeddedResources property.
精彩评论