The Resource File Generator converts .txt files and .resx (XML-based resource format) files to common language runtime binary .resources files that can be embedded in a runtime binary executable or compiled into satellite assemblies. For information about deploying and retrieving .resources files, see Resources in Applications.
Resgen.exe performs the following conversions:
- Converts .txt files to .resources or .resx files.
- Converts .resources files to text or .resx files.
- Converts .resx files to text or .resources files.
resgen [/compile] filename.extension [outputFilename.extension][…]
Option | Description |
---|---|
/compile | Allows you to specify multiple .resx or .txt files to convert to .resources files in a single bulk operation. If you do not specify this option, you can specify only one input file argument. |
/r: assembly | Specifies that types are to be loaded from assembly. If you specify this option, a .resx file with a previous version of a type will use the type in assembly. |
/str: language[,namespace[,classname[,filename]]] | Creates a strongly-typed resource class file in the programming language (C# or Visual Basic) specified in the language option. You can use the namespace option to specify the project's default namespace, the classname option to specify the name of the generated class, and the filename option to specify the name of the class file. |
/usesourcepath | Specifies that the input file's current directory is to be used for resolving relative file paths. |
resgen myResources.resx myResources.resources /str:C#,Namespace1,MyClass,MyFile.vb