How to update linked folders?

I've added a folder in one project which is a link to another folder in another project.  When I added it, it created links to all the files in the folder, and some nested folders, too.  Now there are new files in the source folder and some new folders.  I've tried adding them manually, and the IDE adds them, and they show until I restart the IDE, but once I do, they are no longer there.

I opened the csproj file where the linked files are and have noticed that it is NOT updated with the link references, despite the fact that they show in the IDE.  I suspect something's wrong, but it could be me.  Does anyone have any tips?

Comment actions Permalink

Hello, could you please clarify what OS and Rider version you are running? How exactly you have added folders, was it via Rider Solution Explorer option Add Existing Folder or somehow else?

Comment actions Permalink

I added the folder using Windows 10/11, Rider 2022.1.2.

Steps were:

  1. Find a folder in project where I want the link to be added
  2. Right click it to get context menu
  3. Choose "Add" -> "Add Existing"
  4. Find external folder I want to link in File Selector
  5. Click folder to highlight, click "Select folder"
  6. When prompted choose "Add links"
  7. Rider adds the folder and recursively links all the files in the folder to the solution.

This works great, but if new files are added to the linked folder, they do not get added to the solution and there is no obvious way to trigger an update.  Adding the new files as links individually where they belong in the tree structure results in them showing in the IDE until it is restarted.  This is because the IDE treats them as added in the UI, but does not update the csproj file.  So far, I've just manually edited the csproj file to add them, which is error prone and tedious.

Interestingly, Visual Studio doesn't even have the capability at all.  You can only add individual files.  I wonder if they side-stepped the update problem by just not doing it at all.

Comment actions Permalink

Thank you for reporting the issue, I have created a corresponding record on our bug tracker: RIDER-81157. Please upvote it and click on Watch to monitor the progress of the issue.


Please sign in to leave a comment.