Wednesday, August 02, 2023

4 times I got "sherlocked" by Visual Studio

"Sherlocked" - But, not in relation to the detective or associated fandoms.

Benedict Cumberbatch as Sherlock Holmes with a line across the image

It's the name used when functionality that was provided by an app or extension is incorporated into the OS or program running the extension. (ref1, ref2)


Here are 4 times that tools and extensions I've built to make it easier to work with Visual Studio have been "sherlocked".


1. UWP Design Time Data

Back in the day (prior to version 16.7 of Visual Studio), there was no way to see data-bound values in the designer of UWP apps. So I made a NuGet package that made it so you could. 
My approach was only ever intended as an interim solution as this functionality had been promised. I just got fed up of waiting.
Sadly, neither WinUI3 nor MAUI has Visual Designers, and so the relevance of all this is now moot.


2. Collapse usings on file open - part of Collapse Comments

Collapse Comments started out as an extension that only operated on comments. Over time, and thanks to feedback, some functionality was added that related to working with using directives too. This included the ability to collapse them when a file was opened.

Options for Collapse Comments extension

Then, in April 2022, this capability was also added to Roslyn.

Options Windows showing the Advanced Option to 'Collapse usings on file open'

I started working on the extension in 2018; an official request was made (by someone else) to have the functionality in Visual Studio in 202 (apparently JetBrains Rider already did this), then in 2022, VS did it too.
Someone on the Roslyn team reached out to let me know they were making the change. Which was nice.
The extension still exists as all the other functionality is unique and not built into VS--yet.

This is an encouragement that I am making valuable things with much broader potential reach. Note to self: work on marketing more.


3. Solution File Diff

Wanting to compare two files is a common task but something that was built-into Visual Studio prior to version 17.7 preview 2. My solution was often buggy so that this now exists is much better :)

If you're not yet using that version of Visual Studio (or above), you could also try FileDiffer.


4. Always Include

This was an experimental tool I created before C# has global and implicit usings. Whenever you opened a C# file, it would ensure that the using directives at the top of the file included a set of namespaces that you could configure.

Global and implicit usings make this almost entirely redundant now. However, I'm thinking of applying something similar to XAML files to apply a consistent set of XML namespace aliases to all files. - Let me know if this interest you too.


In addition to the above, I still have lots of extensions in the marketplace that provide other functionality that Visual Studio doesn't. Yet.....?