示例#1
0
 internal static int Run(IEnumerable<string> arguments, RequestLanguage language, CompileFunc compileFunc)
 {
     // BTODO: Should be using BuildClient.GetCommandLineArgs(arguments) here.  But the native invoke 
     // ends up giving us both CoreRun and the exe file.  Need to find a good way to remove the host 
     // as well as the EXE argument. 
     var client = new CoreClrBuildClient(language, compileFunc);
     var clientDir = AppContext.BaseDirectory;
     var workingDir = Directory.GetCurrentDirectory();
     var buildPaths = new BuildPaths(clientDir: clientDir, workingDir: workingDir, sdkDir: null);
     return client.RunCompilation(arguments, buildPaths);
 }
示例#2
0
        internal static int Run(IEnumerable <string> arguments, RequestLanguage language, CompileFunc compileFunc)
        {
            // Should be using BuildClient.GetCommandLineArgs(arguments) here.  But the native invoke
            // ends up giving us both CoreRun and the exe file.  Need to find a good way to remove the host
            // as well as the EXE argument.
            // https://github.com/dotnet/roslyn/issues/6677
            var client     = new CoreClrBuildClient(language, compileFunc);
            var clientDir  = AppContext.BaseDirectory;
            var workingDir = Directory.GetCurrentDirectory();
            var buildPaths = new BuildPaths(clientDir: clientDir, workingDir: workingDir, sdkDir: null);

            return(client.RunCompilation(arguments, buildPaths).ExitCode);
        }
示例#3
0
 internal static int Run(IEnumerable<string> arguments, RequestLanguage language, CompileFunc compileFunc)
 {
     // Should be using BuildClient.GetCommandLineArgs(arguments) here.  But the native invoke
     // ends up giving us both CoreRun and the exe file.  Need to find a good way to remove the host
     // as well as the EXE argument.
     // https://github.com/dotnet/roslyn/issues/6677
     var client = new CoreClrBuildClient(language, compileFunc);
     var clientDir = AppContext.BaseDirectory;
     var workingDir = Directory.GetCurrentDirectory();
     var tempDir = Path.GetTempPath();
     var buildPaths = new BuildPaths(clientDir: clientDir, workingDir: workingDir, sdkDir: null, tempDir: tempDir);
     return client.RunCompilation(arguments, buildPaths).ExitCode;
 }
示例#4
0
        internal static int Run(IEnumerable <string> arguments, RequestLanguage language, CompileFunc compileFunc, IAnalyzerAssemblyLoader analyzerAssemblyLoader)
        {
            // Register encodings for console
            // https://github.com/dotnet/roslyn/issues/10785
            Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);

            // Should be using BuildClient.GetCommandLineArgs(arguments) here.  But the native invoke
            // ends up giving us both CoreRun and the exe file.  Need to find a good way to remove the host
            // as well as the EXE argument.
            // https://github.com/dotnet/roslyn/issues/6677
            var client     = new CoreClrBuildClient(language, compileFunc, analyzerAssemblyLoader);
            var clientDir  = AppContext.BaseDirectory;
            var workingDir = Directory.GetCurrentDirectory();
            var tempDir    = Path.GetTempPath();
            var buildPaths = new BuildPaths(clientDir: clientDir, workingDir: workingDir, sdkDir: null, tempDir: tempDir);

            return(client.RunCompilation(arguments, buildPaths).ExitCode);
        }