Command Line Manifest Builder

how-to | home

Manifest maker now includes a command line project build tool.

sxs32cmd.exe uses the same project file as the GUI and creates the same output. You can create project files using the GUI then run the command line builder either standalone or integrated into your build process.

sxs32cmd.exe command line syntax

Syntax: sxs32cmd [options] <project-file-path>

Options:

/a:<0|1>
Perform manifest auto-fix, default: 1
/p:<0|1>
Pause before exiting the program, default: 0
/x:<0|1>
Build even if CLR DLLs present and no CLR available, default: 0
/c:<0|1>
Copy DLL files instead of moving, default: 0
/z:<0|1>
Enable trace, default: 1
/t:<path>
Path to the program trace file, default: %temp%\sxs32cmd.log
/l:<number>
Trace level (between 0 and 9), default: 2
/n:<number>
Embed manifest as '#number' resource, default: none
In the past this option only controlled CLR manifests. Starting with version 4.0 it also applies to COM, DLL and EXE manifests.
/k:<0|1>
Erase manifest file after embedding, default: 1
Only applies if the manifest is being embedded, ignored otherwise.
/f:<path>
Build a manifest fragment, path: full path to the manifest file. See Visual Studio integration for more information.
/g:<path>
Get assembly version from this file (EXE or DLL).
/r:<path>
Build a manifest fragment, manifest search root folder: folder in which Windows looks for private assemblies used by the fragment. Default: project target folder.
/d:<path>
Destination folder: overrides the folder saved in the project.
/w:<value>
Override the processorArchitecture attribute. Valid values are x86 and amd64. To allow easy integration with Visual Studio Manifest Maker also accepts the value of $(PlatformName) command macro (win32 is treated as x85 and x64 is treated as amd64).
/e:<0|1>
Write multiple type libraries in <file name='abc.dll\n'> tags, default: 0.
/v:<0|1>
Use generic processor type in assembly references, default: 0.
/b:<0|1>
Use PSDispatch proxy instead of PSOAInterface, default: 0.
/o:<value>
Use 'runtimeVersion' for CLR build; clear: '/o:-', recommended: '/o:auto'.
/u:<0|1>
Update private assembly reference identities, default: 0.
/m:<0|1>
Compress shared assembly files into the MSI file, default: registry setting.
This option is only used when building a shared assembly and ignored in other cases. If this option is selected only distribute the MSI file from the target folder. If this option is not selected distribute the entire content of the target folder.
/y:<0|1|2>
Relative file loading; default: setting from the user's registry. Valid values are:
0 = no relative paths used, only absolute paths (compatible with Manifest maker 1.* and 2.0)
1 = try path relative to project folder first, then target folder then absolute path (compatible with version 2.3)
2 = try path relative to target folder first, then project folder then absolute path
/q:<0|1>
Quiet mode, Visual Studio compatible messages only.
/?
Help summary

Additionally the following options are intended for integrated builds:

/com:<path>
Build a COM manifest for this DLL (normally #1)
/clr:<path>
Build a CLR manifest for this DLL (normally #1)
/dll:<path>
Build a DLL manifest for this DLL (normally #2 or #3)
/exe:<path>
Build an application manifest for this program (normally #1)

For convenience, if /dll is used with a program, it is silently changed to /exe and a /com used with a .Net DLL is silently changed to /clr. In effect /dll can be used for REF-manifests and /com for DEF-manifests.

If more than one of the above options is specified, the last one wins. The project file path is optional. However, if there is no project file for a /dll or /exe build, the resulting manifest will be empty. For /clr and /com builds, the project file is ignored.

The following options modify build specific settings for the module selected one of the options above:

/i:<0|1>
Use source path, CLR DLLs only.
/j:<0|1>
Use current registration, COM DLLs only.
/s:<0|1>
Run self registration with full privileges, COM DLLs only.
/h:<use>
Override file use of the above DLL; valid values:
* = default
n = ignore
o = other file
c = CLRclass
d = DLLmanifest

Manifest Maker may silently ignore incompatible override values.

Options are case insensitive and can be specified in any order. Duplicate options are allowed - next value overrides the previous value. There may be only one project file path and it must be enclosed in quotes if it contains spaces. This program returns zero on success and an error code on failure.

To create a COM or CLR manifest in a Visual Studio or MSBuild build environment use:

/com:"$(TargetPath)"

Do not use sxs32mm project file for building DEF manifests using /com or /clr.

To create an application manifest of a DLL REF manifest use:

/dll:"$(TargetPath)" "%(Inputs.FullPath)"

where Inputs is a placeholder for the MSBuild item with the *.sxs32mm project file.

When building both DEF and REF manifests for a DLL, build the REF manifest first.

Options are case insensitive and can be specified in any order. Duplicate options are allowed - next value overrides the previous value. There may be only one project file path and it must be enclosed in quotes if it contains spaces. This program returns zero on success and an error code on failure.

Read more on using command line Manifest Maker with Visual Studio and MSBuild.