Task.Run
'System.Threading.Tasks.Task' does not contain a definition for 'Run'
Cannot find all types required by the 'async' modifier. Are you targeting the wrong framework version, or missing a reference to an assembly
public class MyClass
{
public int id { get; set; }
public int State { get; set; } // 0 New, 1 Not Finish, 2 Finish
public double GetValue(long i)
{
return 0;
}
public MyClass(int num)
{
id = num;
State = 0;
}
public void RealRun()
{
Task.Run(() => ARun());
}
async public void ARun()
{
ProcessStartInfo start = new ProcessStartInfo();
start.Arguments = "";
start.FileName = "portia.exe";
start.WindowStyle = ProcessWindowStyle.Hidden;
start.WorkingDirectory = @"D: ...
Go to the complete details ...