Redigera

Dela via


WorkflowCompilerParameters.LibraryPaths Property

Definition

Gets the property that represents a collection of directory names under which compiler looks for referenced assemblies.

public:
 property System::Collections::Specialized::StringCollection ^ LibraryPaths { System::Collections::Specialized::StringCollection ^ get(); };
public System.Collections.Specialized.StringCollection LibraryPaths { get; }
member this.LibraryPaths : System.Collections.Specialized.StringCollection
Public ReadOnly Property LibraryPaths As StringCollection

Property Value

The property that represents a collection of directory names under which compiler looks for referenced assemblies.

Examples

The following code example demonstrates how to create a new instance of the WorkflowCompilerParameters class, add LibraryPaths and set the value for the CompilerParameters.OutputAssembly property. The code also creates a new instance of the WorkflowCompiler class and runs the WorkflowCompiler.Compile method. This code assumes that results is of type WorkflowCompilerResults. This code example is part of the Outlook Workflow Wizard SDK Sample from the WizardForm.cs file. For more information, see Outlook Workflow Wizard.

// Compile the workflow
String[] assemblyNames = { "ReadEmailActivity.dll" };
WorkflowCompiler compiler = new WorkflowCompiler();
WorkflowCompilerParameters parameters = new WorkflowCompilerParameters(assemblyNames);
parameters.LibraryPaths.Add(Path.GetDirectoryName(typeof(BaseMailbox).Assembly.Location));
parameters.OutputAssembly = "CustomOutlookWorkflow" + Guid.NewGuid().ToString() + ".dll";
results = compiler.Compile(parameters, this.xamlFile);
' Compile the workflow
Dim assemblyNames() As String = {"ReadEmailActivity.dll"}

Dim compiler As WorkflowCompiler = New WorkflowCompiler()
Dim parameters As WorkflowCompilerParameters = New WorkflowCompilerParameters(assemblyNames)
parameters.LibraryPaths.Add(Path.GetDirectoryName(GetType(BaseMailbox).Assembly.Location))
parameters.OutputAssembly = "CustomOutlookWorkflow" + Guid.NewGuid().ToString() + ".dll"
results = compiler.Compile(parameters, Me.xamlFile)

Remarks

The compiler adds standard library paths to the collection.

Applies to