SDM Command Line Compiler (SdmC.exe) [SDM]
SDM Reference |
SDM Command Line Compiler (SdmC.exe)
The SDM Command Line Compiler (SdmC.exe) is responsible for validating the correctness of a .sdm file according to the SystemDefinitionModel Schema. The compiler will take one or more .sdm files as an argument, execute a set of validation steps, and return a set of errors to the design surface. If the compile is successful, the compiler can output an .sdmdocument file.
SdmC.exe file.sdm [/Reference:ref1,ref2,...] [/Output:file] [/KeyFile:file] [/KeyContainer:name] [/WarningAsError:level] [/WarningReported:level] [/SearchPath:dir1,dir2,...] [/Help] [/InstanceOutput:file] [/ConfigReport:file] [/ErrorLimit:max] [/MaxComplexity:max] [/NoLogo] [/StopOnError] [@file1[@file2...]]
Arguments
file.sdm
The .sdm file to compile. The .sdm file is the only argument that does not have a switch prefix. This argument is similar to setting the Compiler.SourceFile property equal to file.sdm./Reference:ref1,ref2,...
Short form: /RReference to an import file for imports. For multiple references, use a comma-delimited list of references. This argument is similar to calling the Compiler.References.Add(ref) method.
/Output:file
Short form: /OThe output .sdmdocument file. If the .sdmdocument file is not specified, the default is the name of the input .sdm file with the file extension .sdmdocument. This argument is similar to setting the Compiler.TargetFile property equal to file.
/KeyFile:file
Short form: /KThe public/private key file to strongly name the output .sdmdocument file. This argument is similar to setting the Compiler.KeyFile property equal to file.
/KeyContainer:name
The public/private key container name to strongly name the output .sdmdocument file. This argument is similar to setting the Compiler.KeyContainer property equal to name./WarningAsError:level
The minimum level of warnings to treat as errors. Set to 0 for errors only and 3 for all warnings. The default is 0, which does not include any warnings. This argument is similar to setting the Compiler.WarningLevelAsErrors property equal to level./WarningReported:level
Short form /WThe least significant warning to print. Set to 0 for errors only and 3 for all warnings. The default is 2, which excludes informational messages. This argument is similar to setting the Compiler.WarningLevelReported property equal to level.
/SearchPath:dir1,dir2,...
Short form /SA comma– or semicolon-delimited path to search for references. The compiler will search the directories in the order they are specified.
/Help
Short form /?Display help for the command-line arguments.
/InstanceOutput:file
Short form /ISaves the instance output to a file. This argument is similar to setting the Compiler.InstanceSpaceOut property equal to file.
/ConfigReport:file
Short form /CSaves the deployment report (BOM) to a file. This argument is similar to setting the Compiler.DeploymentReportOut property equal to file.
/NoLogo
The copyright information is not displayed./ErrorLimit:max
Short form /EStops displaying errors after an approximate limit is reached (default is 100). This argument is similar to setting the Compiler.ErrorLimit property equal to number.
/MaxComplexity:max
Short form /MThe maximum complexity that will be used to evaluate flow and constraints (the default is 10). This argument is similar to setting the Compiler.MaxSimulationComplexity property equal to max.
/StopOnError
Used with a response file to indicate that if there are errors with one command line, do not continue executing the remaining command lines. This argument is only valid when used with @file.@file1[@file2...]
The response files contain many command lines that need to be executed. Each line in a response file is treated as a command line, where all arguments on the line are passed to the compiler.If all the commands succeed, SdmC.exe returns 0. If any of the commands fail, SdmC.exe returns 1.
Other arguments are illegal when the response file is specified, with the exception of /StopOnError.
Remarks
Visual Studio 2005 Team Edition for Architects must be installed to use the SDM command-line tools and compile the SDM samples.
The .sdm file name to compile is the only required argument. The remaining arguments are all optional. All arguments can be specified in any order. The optional arguments have the same defaults as the properties for the Compiler class.
When a user wants to validate a model, the SDM compiler loads the .sdm file and related references, validates the definitions in the file, simulates at least one of each definition, runs through expanding members, flowing setting values and checking constraints, and returns either errors or a compiled file.
An .sdm file can be constructed in any editor such as Notepad, or from the designers within Visual Studio 2005. The SDM compiler can be run from the command line on an .sdm file created either way. An .sdm file created through Visual Studio 2005 can be compiled within Visual Studio 2005 by selecting the Validate option from one of the system designers.
For information on how the SDM compiler compiles an .sdm file and its referenced .sdm files, see How to: Create a .sdmdocument File.
Example Code
The following example compiles the Microsoft.Sample.BasicSDM.sdm file (found in the current directory).
SdmC.exe Microsoft.Samples.BasicSDM.sdm
Example Code
The following example compiles the Microsoft.Certificates.sdm file. The references are in the %SdmModelsDir% directory.
Sdmc.exe Microsoft.Samples.Certificates.sdm /r Microsoft.WindowsHost.sdmdocument /r Microsoft.WindowsApplication.sdmdocument /r Microsoft.InternetInformationServices.sdmdocument /r Microsoft.WebHost.sdmdocument /r Microsoft.WebApplication.sdmdocument /r System.Constraints.sdmdocument /SearchPath "%SdmModelsDir%\"
See Also
How to: Create an SDM Document
Last updated: November 2005 | What did you think of this topic? | Order a Platform SDK CD |
© Microsoft Corporation. All rights reserved. Terms of use. |