Ejemplo n.º 1
0
        private static int MainCore(string[] args)
        {
#if BOOTSTRAP
            ExitingTraceListener.Install();
#endif

            return(BuildClient.Run(args, RequestLanguage.VisualBasicCompile, Vbc.Run));
        }
Ejemplo n.º 2
0
        private static int MainCore(string[] args)
        {
#if BOOTSTRAP
            ExitingTraceListener.Install();
#endif

            using var logger = new CompilerServerLogger();
            return(BuildClient.Run(args, RequestLanguage.CSharpCompile, Csc.Run, logger));
        }
Ejemplo n.º 3
0
        private static int MainCore(string[] args)
        {
            using var logger = new CompilerServerLogger($"vbc {Process.GetCurrentProcess().Id}");

#if BOOTSTRAP
            ExitingTraceListener.Install(logger);
#endif

            return(BuildClient.Run(args, RequestLanguage.VisualBasicCompile, Vbc.Run, BuildClient.GetCompileOnServerFunc(logger)));
        }
Ejemplo n.º 4
0
        private static int MainCore(string[] args)
        {
#if BOOTSTRAP
            ExitingTraceListener.Install();
#endif

            var requestId = Guid.NewGuid();
            using var logger = new CompilerServerLogger($"vbc {requestId}");
            return(BuildClient.Run(args, RequestLanguage.VisualBasicCompile, Vbc.Run, logger, requestId));
        }
Ejemplo n.º 5
0
        private static int MainCore(string[] args)
        {
            var requestId = Guid.NewGuid();

            using var logger = new CompilerServerLogger($"csc {requestId}");

#if BOOTSTRAP
            ExitingTraceListener.Install(logger);
#endif

            return(BuildClient.Run(args, RequestLanguage.CSharpCompile, Csc.Run, logger, requestId));
        }
Ejemplo n.º 6
0
        private static int MainCore(string[] args)
        {
#if BOOTSTRAP
            ExitingTraceListener.Install();
#endif

#if NET472
            var loader = new DesktopAnalyzerAssemblyLoader();
#else
            var loader = new CoreClrAnalyzerAssemblyLoader();
#endif
            return(DesktopBuildClient.Run(args, RequestLanguage.VisualBasicCompile, Vbc.Run, loader));
        }
Ejemplo n.º 7
0
        public static int Main(string[] args)
        {
            NameValueCollection appSettings;

            try
            {
#if BOOTSTRAP
                ExitingTraceListener.Install();
#endif

#if NET472
                appSettings = System.Configuration.ConfigurationManager.AppSettings;
#else
                // Do not use AppSettings on non-desktop platforms
                appSettings = new NameValueCollection();
#endif
            }
            catch (Exception ex)
            {
                // It is possible for AppSettings to throw when the application or machine configuration
                // is corrupted.  This should not prevent the server from starting, but instead just revert
                // to the default configuration.
                appSettings = new NameValueCollection();
                CompilerServerLogger.LogException(ex, "Error loading application settings");
            }

            try
            {
                var controller = new BuildServerController(appSettings);
                return(controller.Run(args));
            }
            catch (FileNotFoundException e)
            {
                // Assume the exception was the result of a missing compiler assembly.
                LogException(e);
            }
            catch (TypeInitializationException e) when(e.InnerException is FileNotFoundException)
            {
                // Assume the exception was the result of a missing compiler assembly.
                LogException((FileNotFoundException)e.InnerException);
            }
            return(CommonCompiler.Failed);
        }