XNREFLECT.EXE is a command line utility that can be used to generate C++ code for XLL add-in functions from .NET assemblies. It is used as part of the build process within Visual Studio. It can also be used outside Visual Studio, at the command line. It can therefore be used as part of an automated build process.
The utility can be found in the bin
sub-directory
of the XLL+ installation.
XNREFLECT options
Option | Description |
---|---|
-t SettingsFile | Required. Full name of template settings file. |
-i InputFile [DocFile] | Required (at least 1). File name (including path) of .NET assembly. DocFile is optional. If provided, it should be the file name (including path) of a .NET compiled comment file. If omitted, a file with an xml extension in the same directory as InputFile will be used. |
-o OutputFile | Optional. TFull path of output file. |
-a true or false | Optional. If false, no header will be written to output file. |
-d DefaultsFile | Optional. Full path of file containing FunctionModel defaults. |
-v OverridesFile | Optional. Full path of file containing attribute overrides. |
-n boolean | Optional. If true, no logo will be displayed. If false or omitted, the program version information will be written to standard output. |
-c ControlFile | Optional. Contents of control file will be read as options. Note that paths in control file may be relative (to control file). Control file should be in .ini file format. |
-x ControlFile | Optional. Contents of control file will be read as options. Note that paths in control file may be relative (to control file). Control file should be in XML file format. |
-f Configuration | Optional. Ignore portions of control file that are not in the section for the named Configuration. Ignored without -c or -x. |
-p ExtensionsPath | Optional. List of directories, semi-colon separated, which will be searched for extension files. |
-h | Optional. Shows help. No other action takes place and the help project is not built. |
Exit code | Description |
---|---|
0 | Program completed successfully. |
1 | A command line argument contained an error. |
2 | An error occurred while the program was running. |
If a control file is provided, using either -c or -x, then the options contained in it will override any other options on the command line.
XNREFLECT -x C:\Files\MyAddin\MyLib.import.xml -f Debug
Importing .NET Assemblies |
Visual Studio version: 2005 or above
XLL+ version: 6.2 or above