-
Notifications
You must be signed in to change notification settings - Fork 6
plugin sdk assembly resolution
Plugins and workspace modules often rely on additional assemblies beyond the official Genetec SDK libraries. These include third-party libraries or custom-built dependencies that are not part of the Security Center installation.
By default, when Security Center loads a plugin or workspace module, it does not probe the module's directory for these non-SDK assemblies, so the .NET runtime fails to load them.
For dependencies located in the same folder as your plugin or workspace module DLL, no code is required: set AddFoldersToAssemblyProbe to True in the module's registration. Security Center probes that folder and resolves a missing dependency only when a DLL there matches the exact assembly identity requested: its name, version, culture, and public key token. This covers most integrations, where each dependency is copied next to the module and its version matches what the module was built against. Because the match is exact, it does not resolve a dependency whose on-disk version differs from the one requested.
Register a custom assembly resolver when that exact-match probing does not fit, for example when a dependency's version differs from what the module references, when a dependency lives outside the module folder, or when certain assemblies must be excluded from probing. A custom resolver is your own code, so you control how it matches assemblies and where it looks for them. The AssemblyResolver sample probes the folder of the module that includes it and loads <name>.dll by name alone, without checking the version, and skips generated *.XmlSerializers assemblies. Register the resolver early in the plugin or module lifecycle, before any dependent types are referenced; a static constructor is the typical place, and calling the sample's Initialize() method there ensures the static constructor runs.
Security Desk and Config Tool load all workspace modules into the same process. This means all modules share the same AppDomain, and only one version of a given assembly can be loaded. If multiple modules depend on the same DLL but use different versions, this can result in type mismatches or runtime failures.
Workspace developers must therefore align versions of shared libraries across all deployed modules to avoid conflicts. There is no isolation at the module level for external dependencies.
Use these answers to resolve the most common assembly-resolution questions.
By default, the .NET runtime resolves assemblies using the application base directory and the Global Assembly Cache (GAC). Genetec plugins and workspace modules are loaded dynamically by Security Center, and their dependencies are not on those standard probing paths, so a dependency fails to load unless the module's folder is probed. The code-free way to enable that probing is to set AddFoldersToAssemblyProbe to True in the module's registration. Register a custom resolver only when its exact-version, same-folder matching does not fit, as described above.
No. The Genetec.Sdk.*.dll assemblies are provided and loaded automatically by Security Center. You must not attempt to load or override them manually. This guidance applies only to additional assemblies your module depends on.
Place all non-SDK dependencies in the same directory as your plugin DLL (for role integrations) or workspace module DLL (for UI integrations). Both AddFoldersToAssemblyProbe and a custom resolver probe this location when resolving missing assemblies.
When you use a custom resolver such as the AssemblyResolver sample, call its Initialize() method in a static constructor within your plugin class or workspace module class. This registers the resolver before any dependent assemblies are loaded by the runtime.
No. That directory is managed by the Genetec installer and must never be modified. Files placed there may be deleted or replaced during upgrades, and doing so may result in an unsupported configuration.
All workspace modules are loaded into the same process and AppDomain (Security Desk or Config Tool). The .NET runtime allows only a single version of a given assembly to be loaded per AppDomain. If multiple modules reference different versions, the first one loaded wins. This may lead to runtime exceptions in others. You must coordinate versioning to prevent conflicts.
No. Workspace modules run in a shared process with a shared AppDomain. There is no mechanism for isolation. Avoiding conflicts requires coordination at build and versioning time.
- Plugin SDK overview: Plugin architecture, lifecycle, and components.
- Deploying plugins: Plugin packaging, registration, and deployment.
- Referencing SDK assemblies: Referencing SDK assemblies and runtime resolution.
- Overview
- Connecting to Security Center
- SDK certificates
- Referencing SDK assemblies
- SDK compatibility
- Entities
- Entity cache
- Entity loading, cache, and query options
- Transactions
- Events
- Actions
- Security Desk
- Custom events
- ReportManager
- ReportManager query reference
- Access control raw events
- DownloadAllRelatedData and StrictResults
- Privileges
- Partitions
- About custom fields
- About video
- About cameras
- Enrolling a video unit
- Archiver and auxiliary archiver roles
- Archive transfer
- About access control
- About cardholders and credentials
- About doors, areas, elevators, and access points
- About access rules and schedules
- About access control units and interface modules
- Enrolling an access control unit
- Door templates
- Visitors
- Mobile credentials
- About threat levels
- About alarms
- Maps
- Logging
- Overview
- Certificates
- Lifecycle
- Threading
- State management
- Configuration
- Restricted configuration
- Events
- Queries
- Request manager
- Database
- Entity ownership
- Engine extensions
- Entity mappings
- Server management
- Custom privileges
- Custom entity types
- Resolving non-SDK assemblies
- Deploying plugins
- .NET 8 support
- Overview
- Certificates
- Creating modules
- Tasks
- Pages
- Components
- Tile extensions
- Services
- Contextual actions
- Options extensions
- Configuration pages
- Monitors
- Shared components
- Commands
- Extending events
- Map extensions
- Timeline providers
- Image extractors
- Credential encoders
- Credential readers
- Cardholder fields extractors
- Badge printers
- Content builders
- Dashboard widgets
- Incidents
- Logon providers
- Pinnable content builders
- Custom report pages
- Overview
- Getting started
- MediaPlayer
- VideoSourceFilter
- MediaExporter
- MediaFile
- G64 converters
- FileCryptingManager
- PlaybackSequenceQuerier
- PlaybackStreamReader
- OverlayFactory
- PtzCoordinatesManager
- AudioTransmitter
- AudioRecorder
- AnalogMonitorController
- Camera blocking
- Overview
- Getting started
- Referencing entities
- Entity operations
- About access control in the Web SDK
- About video in the Web SDK
- Users and user groups
- Partitions
- Custom fields
- Custom card formats
- Actions
- Events and alarms
- Incidents
- Reports
- Tasks
- Macros
- Custom entity types
- System endpoints
- Performance guide
- Reference
- Under the hood
- Troubleshooting