internal void LoadAspNetProjectSystem(Solution solution)
        {
            UnloadProjectSystem();

            applicationLifetime = new MonoDevelopApplicationLifetime();
            context             = new DnxContext();
            var factory = new AspNet5ProjectSystemFactory();

            projectSystem = factory.CreateProjectSystem(solution, applicationLifetime, context);
            projectSystem.Initalize();
        }
        void LoadDnxProjectSystem(Solution solution)
        {
            UnloadProjectSystem();

            applicationLifetime = new MonoDevelopApplicationLifetime();
            context             = new DnxContext();
            var factory = new DnxProjectSystemFactory();

            projectSystem = factory.CreateProjectSystem(solution, applicationLifetime, context);
            projectSystem.Initalize();

            if (context.RuntimePath == null)
            {
                string error = GetRuntimeError(projectSystem);
                throw new ApplicationException(error);
            }
        }
        void LoadDnxProjectSystem(Solution solution)
        {
            UnloadProjectSystem();

            applicationLifetime = new MonoDevelopApplicationLifetime();
            context             = new DnxContext();
            var factory = new DnxProjectSystemFactory();

            projectSystem = factory.CreateProjectSystem(solution, applicationLifetime, context);
            try {
                projectSystem.Initalize();
            } catch (Win32Exception ex) {
                if (ex.NativeErrorCode == 2)
                {
                    throw new DotNetCoreNotFoundException();
                }
                else
                {
                    throw;
                }
            }
        }