-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Console error #142
Comments
Hello @name, Can you provide a runnable project/solution or a Fiddle with the issue you describe? You can send private files here: [email protected] We were not able to reproduce this, and we are not sure how registering those members will affect the Best Regards, Jonathan |
using Z.Expressions; Is a testing setup. Am trying to get it running with every possibility added one after another. |
Hello @kller1993 , My developer tried to reproduce the issue with the same code as you but still is not able to reproduce it. So I believe a runnable project will be required (you can send private files here: [email protected]) as we currently miss something to have the same behavior as you. Best Regards, Jon |
Hello @JonathanMagnan , I just want to confirm, if you received the Mail with the .rar of the Project. Best Regards, kller1993 |
Hello @kller1993 , We indeed got your project. I will answer directly to your email. For people looking for the issue cause: In the code, the One solution instead to try to register all types is using the |
Hello @JonathanMagnan , Am wondering, where my mistake is, as Auto doesnt seem to work. public class TestingArea
{
public static void Main()
{
var context = new EvalContext();
context.RegisterAutoAddMissingTypeAssembly(typeof(TestingArea).Assembly);
context.AutoAddMissingTypes = true;
{
var load = context.Execute<string>("TestingArea.Loader()");
var t = context.Execute(load);
Console.WriteLine("EndTest");
}
}
public static string Loader()
{
int linec = 1;
int linec2 = 1;
string code = "";
Console.WriteLine("Path:");
string path = Console.ReadLine();
string[] cmd = File.ReadAllLines(path);
foreach (string line in cmd)
{
if (!line.Contains("//"))
{
if (!line.StartsWith("using"))
{
//Console.WriteLine(Convert.ToString(linec2).PadLeft(10, ' ').PadRight(15, ' ') + Convert.ToString(linec).PadLeft(10, ' ').PadRight(15, ' ') + line);
code = code + line;
linec2++;
}
}
linec++;
}
return code;
}
} It doesnt register at least types. Edit: var context = new EvalContext();
context.RegisterAutoAddMissingTypeAssembly(typeof(TestingArea).Assembly);
context.AutoAddMissingTypes = true; before the imported Code helps, but it only changed to missing the EvalContext type. |
Hello @kller1993 , The first part to use I suspect what is not working is what is the code that will be returned by the A cause could also be that whenever you specify an assembly in the If you could provide a full runnable example, that will surely be easier on our side to tell you exactly why this is not working. Best Regards, Jon |
Hello @kller1993 , Since our last conversation, we haven't heard from you. How is everything going? Let me know if you need further assistance. Best regards, Jon |
Hello again, A simple reminder that we are here to assist you. Don't hesitate to contact us if you need anything. Best regards, Jon |
Unhandled exception. Z.Expressions.Compiler.Shared.EvalException: Oops! No applicable member has been found for the expression. The error occurred for expression "." at position 69 near ".ReadLine(); Console.W".
Apparently the ReadLine from Console.ReadLine isnt a recognized member, unlike the WriteLine.
Edit: Error appeared after creating a loop to register the used members, etc. In this case:
using System;
using System.Data;
using System.Data.Odbc;
using System.Data.SqlTypes;
using System.Xml;
using MySqlConnector;
The text was updated successfully, but these errors were encountered: