|
1 | 1 | # Ixc config file |
2 | 2 |
|
3 | | -**AXSharp.config.json** can contain some settings for the compiler. Upon the first run of the ixc the default `AXSharp.config.json` file is created if not previoulsy created manually. |
4 | | - |
5 | | -Some compilation options can be overrided by CLI, such as `OutputProjectFolder` (-o) will override `OutputProjectFolder` setting in the config file. |
| 3 | +**AXSharp.config.json** can contain settings for the compiler. Upon the first run of `ixc` a default `AXSharp.config.json` file is created if one does not already exist. |
6 | 4 |
|
| 5 | +Some options can be overridden from the CLI. For example, the `-o` flag overrides `OutputProjectFolder`. |
7 | 6 |
|
8 | 7 | **Default config file** |
9 | 8 |
|
10 | 9 | ~~~json |
11 | 10 | { |
12 | | - "OutputProjectFolder":"ix", |
| 11 | + "OutputProjectFolder": "ix" |
13 | 12 | } |
14 | 13 | ~~~ |
15 | 14 |
|
16 | | -**Config file example** |
| 15 | +**Config file example (library with UI companion)** |
17 | 16 |
|
18 | 17 | ~~~json |
19 | 18 | { |
20 | | - "OutputProjectFolder":"..\\ix-app" |
| 19 | + "OutputProjectFolder": "../ix", |
| 20 | + "UiHostProject": "../blazorapp/blazorapp.csproj" |
21 | 21 | } |
22 | 22 | ~~~ |
23 | 23 |
|
24 | | -| Parameter | Meaning | Default | |
25 | | -| ------------------- | ------------------------------------------------------------------------------------------------------ | ------- | |
26 | | -| OutputProjectFolder | Sets the directory where the ixc will emmit the twin project.Use path relative to apax project folder. | 'ix' | |
27 | | -| | The value is overridable from the CLI | | |
| 24 | +## Parameters |
| 25 | + |
| 26 | +| Parameter | CLI flag | Meaning | Default | |
| 27 | +| --- | --- | --- | --- | |
| 28 | +| `OutputProjectFolder` | `-o` | Directory where `ixc` emits the twin project. Path relative to the AX project folder. | `ix` | |
| 29 | +| `ProjectFile` | `-p` | Name of the output `.csproj` file. | *(project name)* | |
| 30 | +| `UseBase` | `-b` | Use `$base` for base types in inherited classes. Obsolete. | `false` | |
| 31 | +| `NoDependencyUpdate` | `-u` | Prevent dependent twin packages from being installed via apax. | `false` | |
| 32 | +| `IgnoreS7Pragmas` | `-s` | Ignore `S7.extern` pragmas; compile all members regardless of communication settings. | `false` | |
| 33 | +| `SkipDependencyCompilation` | `-d` | Skip compilation of referenced AX# dependency projects. | `false` | |
| 34 | +| `TargetPlatfromMoniker` | `-t` | Target platform: `ax` or `tia`. | `ax` | |
| 35 | +| `UiHostProject` | `-a` | Path (relative to the AX project folder or absolute) of the `.csproj` that hosts or consumes UI companion NuGet packages. In library development this is the Blazor/UI application project; in application development this is the application project itself. When set, `ixc` automatically installs UI companion package references into this project. | *(none)* | |
| 36 | + |
| 37 | +## UI companion packages |
| 38 | + |
| 39 | +When a PLC library ships a UI companion package (Blazor components, auto-generated views, etc.), `ixc` can automatically wire up the dependency for you. |
| 40 | + |
| 41 | +**Library author** — set `UiHostProject` in the library's `AXSharp.config.json` to the path of the UI project that is built alongside the twin project. When `ixc` runs it will: |
28 | 42 |
|
| 43 | +1. Determine the UI package ID from the `<PackageId>` element in the referenced `.csproj`, or fall back to `<apax-package-name>.UI` when the file does not exist. |
| 44 | +2. Write that ID and the library version into `axsharp.companion.json` alongside the usual twin connector fields. |
29 | 45 |
|
| 46 | +**Consumer** — set `UiHostProject` in your project's `AXSharp.config.json` to point at the application project (e.g. a Blazor server app) that should receive the dependency. When `ixc` resolves a dependency that carries UI companion info, it automatically adds the corresponding NuGet package reference (or project reference when working directly from source) to the configured host project. |
| 47 | + |
| 48 | +~~~json |
| 49 | +{ |
| 50 | + "OutputProjectFolder": "../ix", |
| 51 | + "UiHostProject": "../MyBlazorApp/MyBlazorApp.csproj" |
| 52 | +} |
| 53 | +~~~ |
0 commit comments