Adaptable Solution Commands
Introduction
The commands in this group are related to adaptable solutions.
These commands use a common exit code format.
The commands return 0 on success.
On error, the exit code consists of three digits XYZ:
X– Error type:1– parameter validation error2– output-related error3– operation execution error
Y– Parameter number the error relates to (if applicable). This is zero if the error is not parameter-related.Z– Error detail:1– file not found2– app is too old3– distribution is not enabled4– version is not in SemVer format5– app was not initialized from a solution package
For exit code examples, refer to the specific commands below.
mx show-app-version Command
The mx show-app-version command shows the publisher-side version of your solution (the version you develop) and the consumer-side version of the solution package your app is based on (the version when you consumed the solution).
Usage
Use the following command pattern for mx show-app-version:
mx show-app-version MPR-FILE [OPTIONS]
These are the OPTIONS:
| Option | Shortcut | Description |
|---|---|---|
--based-on |
-b |
Shows the Based on version. |
--help |
Shows help for the mx show-app-version command and exits. |
For MPR-FILE, enter an .mpr file.
The --based-on version is the version of the solution package (.mxsolution) that the current app is based on.
Examples
Here are two examples:
mx show-app-version C:\MyApp\MyApp.mprmx show-app-version C:\MyApp\MyApp.mpr -b
Return Codes
This command uses the common exit code format described above for all app-version related commands.
This table shows the return codes and their descriptions:
| Return Code | Description |
|---|---|
0 |
No errors. |
315 |
The -b flag was specified, but the app is not based on a solution. |
313 |
The -b flag was not specified, but distribution as a solution is not enabled for the app. |
mx set-app-version Command
The mx set-app-version command sets the version of your solution when building it.
Usage
Use the following command pattern for mx set-app-version:
mx set-app-version MPR-FILE VERSION
These are the OPTIONS:
| Option | Description |
|---|---|
--help |
Shows help for the mx set-app-version command and exits. |
For MPR-FILE, enter an .mpr file.
For VERSION, enter a version in the SemVer format.
Examples
Here is an example:
mx set-app-version C:\MyApp\MyApp.mpr 1.2.3
Return Codes
This command uses the common exit code format described above all app-version related commands.
This table shows the return codes and their descriptions:
| Return Code | Description |
|---|---|
0 |
No errors. |
124 |
The version is not in SemVer format. |
313 |
Distribution as a solution is not enabled for the app. |