luminous-software/start-page-plus

(Question) How to edit Recent Paths / where are the items stored?

boris-df opened this issue · 2 comments

Installed product versions

  • Visual Studio 2019

Description

I've had to change the local mapping path of my TFS repository - so everything that was on c:/here/project/p1.sln is now located on c:/here/new-sub/project/p1.sln

That means, that all my (pinned) projects in the recents list are invalid (cannot open them because the files are not there anymore)

Now i like to manually fix that path - but where are these items stored?

As far as i can see in the code it should be in the registry somewhere

private const string ROOT = "ApplicationPrivateSettings";
        private const string METADATA = "_metadata";
        private const string BASELINES = "baselines";
        private const string CODE_CONTAINERS = "CodeContainers";
        private const string OFFLINE = "Offline";

private string CodeContainersKey
            => $"{ROOT}\\{METADATA}\\{BASELINES}\\{CODE_CONTAINERS}";

(found in https://github.com/luminous-software/start-page-plus/blob/master/src/ui/Services/RecentItemDataService.cs)

But i cannot find such path(s) in my registry; i cannot find my solution names in the registry ... so where are they? how can i fix/edit the solutions-paths?

Thank you

I've been in exactly the same situation as you describe, so I know where you're coming from.

The Offline object found in the CodeContainers node is a mysterious thing indeed. I'm guessing there's two reasons for this.

  1. It's probably been around since the early days of VS, and still exists for backwards compatibility.
  2. It's not actually the official supported way of doing what I do in Start Page+, it's an implementation detail. There are VS services for doing this, but they're so old and arcane that it was just too complex and time-consuming, and I happened on this method during my online searches.

While you could do what my code does, and manipulate the Offline object and then put it back, it's a bit risky and I found dealing with it manually was quite tedious. It's basically just a JSON object, with a whole bunch of nested properties to deal with.

I've been lucky so far that this cludgey method of getting/manipulating the Recent Items from VS has just worked for what I needed. I'd LOVE to find a better method, but it doesn't seem to be causing any problems (yet), and although I've searched exhaustively I haven't had the time to look any further.

I've just added some code to manually edit each entry with a dialog box, and as soon as I tidy things up a bit I can make it available for you to test out if you want. I'm guessing you'd probably prefer to edit in bulk but that'd be more work for me to accomplish.

image

I hope will be helpful, if not perfect!

Hi, yes such a feature would have helped me ;)
I gave up on it because i didn't found a way to find the paths on my hard drive - so i simply opened the projects from the new paths

Since then i have a new problem with that:

  • i've tried to remove my favorites (with the X button) -> but then with the next start of VS they were back!
  • i've tried to unpin my favorites (with the pin needle) -> only to find them back pinned with the next VS start
  • i've tried to first unpin and then remove them -> with no luck for a long time

Even more strange: It may look like it worked because if i end VS and restart it it looks fine (my solution from the new path is pinned as favorite) but the next day the solutions from the old (non existing) paths are back! Pinned as favorites

i didn't find a way to REALLY remove old entrieds from the Recent list ... this very annoying because the solutions all have the same names of course but different paths. Now i have to reeeeally look twice before i find the correct solution i like to open - and pinning the new one doesn't help: the pin is gone the next day or the day after

ANY idea what is going on? Is the system unable to remove entries if the paths of those entries doesn't exist anymore?