Property GeneratedModulesPath
GeneratedModulesPath
Gets directory where assemblies for the scripts being debugged are located.
public string GeneratedModulesPath { get; set; }
Property Value
Examples
Here is how to use a GeneratedModulesPath in the C# code:
using System;
using Alternet.Scripter;
using Alternet.Scripter.Debugger;
public partial class Form1 : Form
{
private ScriptRun scriptRun;
private ScriptDebugger debugger;
private void Form1_Load(object sender, EventArgs e)
{
scriptRun = new ScriptRun();
scriptRun.ScriptLanguage = ScriptLanguage.CSharp;
scriptRun.LoadFile("myScript.cs");
var thisAssemblyLocation = GetType().Assembly.Location;
debugger = new ScriptDebugger
{
GeneratedModulesPath = Path.GetDirectoryName(thisAssemblyLocation),
ScriptRun = scriptRun,
};
}
}
Here is how to use a GeneratedModulesPath in the Visual Basic code:
Imports System
Imports Alternet.Scripter
Imports Alternet.Scripter.Debugger
Partial Public Class Form1
Inherits Form
Private scriptRun As ScriptRun
Private debugger As ScriptDebugger
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
scriptRun = New ScriptRun()
scriptRun.ScriptLanguage = ScriptLanguage.CSharp
scriptRun.LoadFile("myScript.cs")
Dim thisAssemblyLocation = [GetType]().Assembly.Location
debugger = New ScriptDebugger With {
.GeneratedModulesPath = Path.GetDirectoryName(thisAssemblyLocation),
.scriptRun = scriptRun
}
End Sub
End Class
Remarks
Use this property to change the output paths of the compiled assembly and a pdb file.