Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I disable Task Runner Explorer in Visual Studio?

The Task Runner Explorer just throws errors for me in Visual Studio 2015 RC and I just want to disable it and run my gulp file from the command line like I always have. Is there a way to turn off the Task Runner Explorer?

like image 641
Sean Avatar asked Jun 24 '15 20:06

Sean


People also ask

How to view task runner explorer Visual Studio?

If you have never used or opened the built in task runner it is simple, press Alt + Shift + Backspace or select it from the other windows list from the View menu. You should see the task runner window at the bottom of Visual Studio.

What is task runner in Visual Studio?

The Task Runner Explorer shows a list of available tasks and executing them is as simple as a click of the mouse. You can even bind any task to specific events that occur in Visual Studio such as Build, Clean and Project Open.

How to Open task runner explorer?

Right-click Gruntfile. js and select Task Runner Explorer from the context menu. The Task Runner Explorer window will open.

How do I run Gulpfile in Visual Studio?

Run a Gulp Task in Visual Studio CodeType "Run Task" and select it, which will bring up a list of tasks configured in Gulp. Choose the Gulp Task you want to run! Most of your Gulp Tasks will probably be automated using gulp watch, but manual Gulp Tasks can easily be run within Visual Studio Code.


2 Answers

After all I was able to solve the problem of disabling any unnecessary Visual Studio package in a clean and minimally invasive way, which does not require changing of VS configuration files or fiddling with the registry! This includes Task Runner facility, VsHub facility which causes a lot of VS instability and slowdown as well as any other VS Package out of 150+ it ships with.

Here is a short recap: Basic functionality component for VS is a Package (don’t mix it up with NuGet packages – those are not relevant here). All extensions you may install from Web (as well as many preinstalled ones) are in the form of VSIX which is extended Package format. Visual Studio has an API (unpublished, but still) which can work with VSIX packages, including finding them and Enable/Disable them. Unfortunately it only can handle VSIX and does not see pure VS Packages. This is declared by design – pure VS Packages are considered system components and do not have supported way to Disable them. Or so they say… I have decompiled official (although badly outdated) MS plugin for extensions diagnostics and found that it does a lot of fiddling directly with the registry to obtain information about installed VSPackages, but does not even try to change anything there (think Disable). My own investigation of HKCU\Software\Microsoft\VisualStudio discovered that huge and elaborate data structure there is useless to fiddle with as it is merely the cache of VS internal state which VS refreshes randomly and often, so even if we figure out how to disable the package through registry it would be pointless as VS would overwrite it right away.

Two clues which finally brought me to the final solution were those: 1. There is a file C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.pkgdef The content of that file is not particularly interesting, but my C++ past gave me a hint that if there is PkgDef, there is a good chance there may be PkgUnDef also, even though it is normally not present. ProcMon confirmed that during startup VS checks for devenv.pkgundef file presence and I was on the right path. 2. Second hint – I know that some other products (think SQL Server Management Studio) use VS Shell in disguise (that’s why you still see VS 2010 in your Add\Remove programs – it is SQL SMS). And those other products obviously have a way to cut out most of VS functionality and only leave a few features they really need from it. So I learned how they do it and here you go – pkgundef file again!

It was a matter of a few probes and registry scans to write the correct content for devenv.PkgUnDef to get rid of the packages I don’t like with no visible side effects or bad consequences.

My C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.pkgundef looks like that:

// Exclude TaskRunnerExplorer
[$RootKey$\Packages\{b483c4e7-43a6-4f7b-a9a1-79e2c5d12148}]
// Exclude VsHubServicePackage
[$RootKey$\Packages\{F419E6BB-F72F-42CF-ACFE-D0D0E17FCB17}]
// Exclude JavaScriptWebExtensionsPackage
[$RootKey$\Packages\{30db8f9b-ec9f-44d6-b377-83c7c27a1a8b}]

To check what specific packages you have loaded there is Extension Analyser. It is rather dated, so I hacked together a version which works with VS 2015 here.

Another way to see what slows VS down is to run it with the /Log parameter and apply Activity Log Proviler.

Hope it helps people to regain their slim and fast Visual Studio! Konstantin

like image 190
Konstantin Erman Avatar answered Sep 22 '22 11:09

Konstantin Erman


The links at the bottom explain how to disable packages (extensions) that are built into Visual Studio.

Basically:

  • Navigate to C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools.
  • Backup the extension.vsixmanifest file and the TaskRunnerExplorer directory.
  • Look in the TaskRunnerExplorer\*.pkg files and take note of GUID keys at the top of the files (e.g. [$RootKey$\Packages\{b483c4e7-43a6-4f7b-a9a1-79e2c5d12148}]).
  • Edit the extension.vsixmanifest file and remove any mention of TaskRunnerExplorer.
  • Delete the TaskRunnerExplorer directory.
  • Backup and delete the GUID key(s) from the registry, inside of HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\14.0_Config\Packages\. Currently, those keys are {8da206d4-9521-4f38-92c9-a8d5d0af611c} and {b483c4e7-43a6-4f7b-a9a1-79e2c5d12148}.

Note: To edit files in Program Files (x86), you either have to run your notepad app in Admin mode or edit a copy from within a directory that you own and then overwrite the original.

http://blog.spinthemoose.com/2012/12/28/how-to-unregister-a-visual-studio-package-extension/

http://blog.spinthemoose.com/2013/01/02/the-correct-way-to-uninstall-visual-studio-packages-extensions/

like image 24
Wayne Bloss Avatar answered Sep 19 '22 11:09

Wayne Bloss