Visual Studio 2022 Preview 2.1 Task Runner Explorer not appearing

 The task runner explorer was not getting displayed after I clicked the menu option from Others Windows > Task Runner Explorer

I tried a lot of gimmicks: 


Nothing worked as expected though!

Then, I thought I would have a fix in the latest release although the release notes didn't have any hint about task runner explorer issues or fixes:



Fyi, If you already have an existing Visual Studio 2022 preview on your machine, you can use the Visual Studio Installer to update to the latest release as per this link


But, even after that, my task runner explorer didn't appear. Since I had Visual Studio 2019 in my machine, I did a comparison of the dll sizes and I could obviously find some difference: 


Next step was to dotpeek the dlls for clues. 

Interestingly, when I peeked the (2019 dll) code (the concerned machine had both VS 2019 and VS 2022), the task runner user control, had references to 2022 task explorer dll: 

 
I'm currently clueless why this would happen.



I already tried uninstalling 2019 in one of the other Virtual machines but the task explorer didn't appear in the 2022 version. Yes, I did many machine restarts.

So, the next step would be take one step backward and see what happens when I install VS 2022 preview in a brand new machine and go from there. Keep you posted!

29/07/2021:

Couldn't find any errors in the VS error log file -

My Visual Studio 2022 log files (Activitylog.xml) here:

C:\Users\navadmin\AppData\Roaming\Microsoft\VisualStudio\17.0_59b61952 (generically %APPDATA%\Microsoft\VisualStudio)

Then, when I decided to report the problem, I could see the problem is already reported and a release is pending for this issue:

https://developercommunity.visualstudio.com/search?entry=problem&space=8&q=task+runner+explorer


So, if you are using Visual Studio 2022 Preview 2.1 or prior and the task runner explorer window does not appear on click of the menu, then you need to wait until the next release!

Some dotpeek analysis:

I moved the 2022 and 2019 Microsoft.WebTools.TaskRunnerExplorer.dll each to a separate folder. Not sure why I did this but I did!

In case of 2022, this is the command that invokes the explorer window in Microsoft.WebTools.TaskRunnerExplorer.dll:


When I checked the guid of the task runner explorer window, I could find a match:


Looks like commands layer is a new implementation since its missing in Visual Studio 2019:




Also, in case of 2019, I could find this open task explorer option on click of menu:


2019, Show task runner tool window method for reference:


Now, I switched back to the 2022 dll and could find the same methods as above.

Then, when I checked the base class for 2022, looks like it is using a new AsyncPackage base class:


In case of 2019, the implementation is different:


In case of 2022, it seems to be using a new async functionality,  ShowTaskRunnerToolWindow method seems to invoke ShowTaskRunnerToolWindowAsync():


While the 2019 ShowTaskRunnerToolWindow, which is synchronous looks like this,


The async method in case of 2022 looks like this:


I decided to stop my analysis here since there is a drastic variation in the two implementations.

Comments

Popular Posts