Exemplo n.º 1
0
        public static void SetupVanillaVsExperimentalInstance(string suffix)
        {
            AskIfNotOnBuildServerAndProductiveVs(suffix);

            try
            {
                _visualStudioInstance = new VsExperimentalInstance(VsExperimentalInstance.Versions.VS2015, suffix);
                if (string.IsNullOrEmpty(suffix))
                {
                    _keepDirtyVsInstance = true;
                    _visualStudioInstance.InstallExtension(VsixPath);
                }
                else
                {
                    if (!_keepDirtyVsInstance)
                    {
                        _keepDirtyVsInstance = AskToCleanIfExists();
                    }
                    if (!_keepDirtyVsInstance)
                    {
                        _visualStudioInstance.FirstTimeInitialization();
                        _visualStudioInstance.InstallExtension(VsixPath);
                    }
                }
            }
            catch (AutomationException exception)
            {
                exception.LogAndThrow();
            }
        }
Exemplo n.º 2
0
        public static void CleanVsExperimentalInstance()
        {
            _mainWindow?.Dispose();
            _application?.Dispose();

            _testExplorer = null;
            _mainWindow   = null;
            _application  = null;

            if (!_keepDirtyVsInstance)
            {
                // wait for removal of locks on some files we want to delete
                // TODO: find more reliable method than using Sleep()
                Thread.Sleep(TimeSpan.FromSeconds(1));
                _visualStudioInstance.Clean();
            }
            _visualStudioInstance = null;
        }
Exemplo n.º 3
0
        public static void CleanVsExperimentalInstance()
        {
            _mainWindow?.Dispose();
            _application?.Dispose();

            _testExplorer = null;
            _mainWindow = null;
            _application = null;

            if (!_keepDirtyVsInstance)
            {
                // wait for removal of locks on some files we want to delete
                // TODO: find more reliable method than using Sleep()
                Thread.Sleep(TimeSpan.FromSeconds(1));
                _visualStudioInstance.Clean();
            }
            _visualStudioInstance = null;
        }
Exemplo n.º 4
0
        public static void SetupVanillaVsExperimentalInstance(string suffix)
        {
            AskIfNotOnBuildServerAndProductiveVs(suffix);

            try
            {
                _visualStudioInstance = new VsExperimentalInstance(VsExperimentalInstance.Versions.VS2015, suffix);
                if (string.IsNullOrEmpty(suffix))
                {
                    _keepDirtyVsInstance = true;
                    _visualStudioInstance.InstallExtension(VsixPath);
                }
                else
                {
                    if (!_keepDirtyVsInstance)
                    {
                        _keepDirtyVsInstance = AskToCleanIfExists();
                    }
                    if (!_keepDirtyVsInstance)
                    {
                        _visualStudioInstance.FirstTimeInitialization();
                        _visualStudioInstance.InstallExtension(VsixPath);
                    }
                }
            }
            catch (AutomationException exception)
            {
                exception.LogAndThrow();
            }
        }