AFPlugIn.ResolvePlugInAssemblyPath Method
- Last UpdatedNov 18, 2025
- 3 minute read
- PI System
- AF SDK 2024 R2
- Developer
Namespace: OSIsoft.AF
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static string ResolvePlugInAssemblyPath( string fileName, string fileVersion = null, AFPlugInLoadProperties loadProperties = AFPlugInLoadProperties.Default, bool defaultOnly = false )
Public Shared Function ResolvePlugInAssemblyPath ( fileName As String, Optional fileVersion As String = Nothing, Optional loadProperties As AFPlugInLoadProperties = AFPlugInLoadProperties.Default, Optional defaultOnly As Boolean = false ) As String Dim fileName As String Dim fileVersion As String Dim loadProperties As AFPlugInLoadProperties Dim defaultOnly As Boolean Dim returnValue As String returnValue = AFPlugIn.ResolvePlugInAssemblyPath(fileName, fileVersion, loadProperties, defaultOnly)
public: static String^ ResolvePlugInAssemblyPath( String^ fileName, String^ fileVersion = nullptr, AFPlugInLoadProperties loadProperties = AFPlugInLoadProperties::Default, bool defaultOnly = false )
static member ResolvePlugInAssemblyPath : fileName : string * ?fileVersion : string * ?loadProperties : AFPlugInLoadProperties * ?defaultOnly : bool (* Defaults: let _fileVersion = defaultArg fileVersion null let _loadProperties = defaultArg loadProperties AFPlugInLoadProperties.Default let _defaultOnly = defaultArg defaultOnly false *) -> string
Parameters
- fileName
- Type: SystemString
The name of the assembly associated with an AFPlugIn to be resolved. - fileVersion (Optional)
- Type: SystemString
The file version of the assembly associated with an AFPlugIn to be resolved. If , then this method will resolve to the latest version of the assembly. - loadProperties (Optional)
- Type: OSIsoft.AFAFPlugInLoadProperties
Any AFPlugInLoadProperties associated with loading the specified assembly. If not specified, then the Default load properties are used. - defaultOnly (Optional)
- Type: SystemBoolean
If , the only the default plugin assembly directory will be searched for the plugin and the fileVersion parameter will be ignored. The default value for this property is .
Return Value
Type: StringIf the path can be resolved to an existing assembly, then the full path to that assembly is returned. Otherwise, is returned.
Remarks
This helper method resolves an assembly associated with an AFPlugIn to a full path name. This can then be used with the LoadFrom(String) method to load the assembly.
Plugins loaded from the server are stored in the OSIsoft\AF\PlugIns directory under the CommonApplicationData directory. Each plugin is stored in a sub-directory based upon its version. The resolved path returned searches for the plugin under the directory that matches the fileVersion parameter if specified. A default plugin can be stored in the root OSIsoft\AF\PlugIns directory. This method returns the highest version of the plugin that is compatible with loadProperties.