public JitHostController(string assemblyFile, JitTarget jitTarget, TargetScope targetScope, string methodListFile, IJitHostPathResolver pathResolver)
 {
     _assemblyFile   = assemblyFile;
     _jitTarget      = jitTarget;
     _targetScope    = targetScope;
     _methodListFile = methodListFile;
     _pathResolver   = pathResolver;
 }
Beispiel #2
0
        public static string GetDotnetExecutablePath(JitTarget jitTarget)
        {
            string dotnetExecutable;

            if (jitTarget.Platform == TargetPlatform.X64)
            {
                dotnetExecutable = Environment.ExpandEnvironmentVariables(@"%ProgramW6432%\dotnet\dotnet.exe");
            }
            else
            {
                dotnetExecutable = Environment.ExpandEnvironmentVariables(@"%ProgramFiles(x86)%\dotnet\dotnet.exe");
            }

            if (!File.Exists(dotnetExecutable))
            {
                throw new JitCompilerException($"dotnet.exe could not be found (expected under {dotnetExecutable}).\r\nPlease verify that the correct .Net Core Runtime is installed!");
            }

            return(dotnetExecutable);
        }