Skip to main content

Built-in library containing WPF user controls

Preview released

This function and the API used in this function have been released in advance. We do not guarantee the quality at this time, so please use it at your own risk. Also, please note that these specifications are subject to change without notice.

overview

In V2.0, the library is loaded in a different area for each extension so that a newer version of the library than the library referenced by Next Design itself can be used in the extension 1.
However, some libraries may affect behavior by being loaded in different regions.

For example, if a user control with screen drawing provided by WPF (Windows Presentation Foundation) is used in a library, and the library is loaded in different areas for each extension, the following problem occurs. has been confirmed.

  • If controls that are commonly used by multiple extensions are displayed alternately in each extension, the second and subsequent displays will fail.

To avoid such problems, we provide a mechanism to load and share the library in the same area as Next Design itself (this is called the default area).

info

If you want to use this mechanism, please upgrade to Next Design V2.0 Service Update 1 or later.

Specifying a shared library

You can specify in the manifest to load the WPF library etc. in the default area. A library that you specify to load in the default area is called a shared library. To specify a shared library, write the following in your manifest:

  • Specify the library path as a relative path from the manifest file.
manifest.json
{
"runtime": {
"sharedAssemblies" : [
{
"path" : "NextDesign.CustomUI.DataGrid.dll"
},
{
"path" : "mySubDir/NextDesign.CustomUI.Dialogs.dll"
}
]
}
}
  • The path can be a wildcard ("*"). However, wildcards are only valid within the same folder.
manifest.json
{
"runtime": {
"sharedAssemblies" : [
{
"path" : "NextDesign.CustomUI.*.dll"
},
{
"path" : "SomeUILib.*.dll"
},
{
"path" : "NextDesign.*.SomeLib.*.dll" // Multiple wildcards can also be
}
]
}
}

Loading shared libraries

Next Design scans the manifest of all valid extensions 2 regardless of life cycle to determine which library is designated as a shared library. At this time, if different versions of the same library are specified as shared libraries in each extension, the library with the latest file version among those libraries will be loaded.
With this mechanism, even an extension that has an older version of the library will use the latest library that is located in another extension folder.

For culture (resource), load the resource library for the culture of Next Design itself 3. At this time, search for subfolders such as ja and en in the same folder as the library to be loaded as a shared library.

Notes

  • If an extension that specifies the same library as a shared library and an extension that does not specify the same library as a shared library are mixed, the shared library will be used for all extensions.
    • At this time, the library with the latest file version among the libraries of the extension specified in the shared library will be loaded.
    • Therefore, even if you place a new version of the library with an extension that is not specified as a shared library, the corresponding library will not be loaded.
About resolving shared library versions

This mechanism also provides bug fixes and the latest features for extensions with older versions of the library.
On the other hand, if the library is not guaranteed backward compatibility, a run-time error may occur with an extension configured with an older version of the library.

Restrictions

  • Native libraries cannot be specified as shared libraries. Configure the shared library so that it does not contain native libraries.
  • The library referenced by Next Design itself cannot be specified as a shared library. Define the manifest so that the library referenced by the Next Design body is not specified as a shared library.

  1. See V2.0 Extension Loading Mechanism for details.
  2. Extensions that have not been disabled in the Extension Management of the Next Design body.
  3. The resource library does not need to be specified as a shared library in the manifest.