You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi , for example I have MessageX.dll has a class that show a messagebox .
this dll is embedded in my app by fody Costura , it loaded to my host .
how can I added to my script ?
private void Button_Click(object sender, RoutedEventArgs e)
{
string code = @" //
using System.Windows.Forms;
using MessageX;
public class Script
{
public void SayHello()
{
Class1.saysomething();
}
}";
CSScript.Evaluator.GetReferencedAssemblies(code);
dynamic script = CSScript.Evaluator
.LoadCode(code);
script.SayHello();
}
Error I get : error CS0246: The type or namespace name `MessageX' could not be found. Are you missing an assembly reference?
The text was updated successfully, but these errors were encountered:
The appcomain assemblies are supposed to be referenced by default:
publicclassExternalClass// dynamictest3.Program.ExternalClass{publicstaticvoidSayHello(){
Console.WriteLine("Hello...");}}staticvoidIssue_113(){using(SimpleAsmProbing.For(Assembly.GetExecutingAssembly().Location.GetDirName())){dynamicscript= CSScript.RoslynEvaluator
.LoadCode(@"using System.Windows.Forms; using dynamictest3; public class Script { public void SayHello() { Program.ExternalClass.SayHello(); } }");
script.SayHello();}}
Though from your code it's not clear which engine you are using. It looks like Mono since it is the default engine of CSScript.RoslynEvaluator.
Hi , for example I have MessageX.dll has a class that show a messagebox .
this dll is embedded in my app by fody Costura , it loaded to my host .
how can I added to my script ?
Error I get :
error CS0246: The type or namespace name `MessageX' could not be found. Are you missing an assembly reference?
The text was updated successfully, but these errors were encountered: