Rider losing symlinked directory structure on reopening of solution

Answered

Hi there,

I tried filing an issue on YouTrack, but can't seem to, as "application is in read-only mode".  I might not have permissions like I do for WebStorm?

In any case, when I include a directory (with nested subdirectories) of source files, Rider will ask whether to symlink/copy the files.  When I select symlink, the directory structure is shown in the Solution Pane and all is good.  After closing Rider and reopening, the directory structure is lost in the Solution view, and all the symlinked files are displayed flattened for the project (i.e., no subdirectories).

I was wondering whether this was desired behaviour or is it a bug?  It's interesting that the directory structure initially is shown properly, but is just lost on reload.

This was done on Rider 2018.3.4 on Mac.

Thanks

0
3 comments

Hello!

Could you please reproduce the problem with "Project Model" trace scenario enabled in "Help | Trace Scenarios (LOGS)" and attach them on https://youtrack.jetbrains.com/issue/RIDER-25533?

 

Thanks in advance!

Sofya.

0
Avatar
Permanently deleted user

I've updated the issue with the logs.  Please let me know if you need anything else from me.  Cheers!

0

Also having a lot of trouble getting symlinks working in Rider. It actually seems like there's logic within Rider going out of its way not to support them.

For example, within Rider's file browser (e.g. adding a reference to an existing project) if you open a symlinked directory, then look at the path in the file browser (directory drop down) it's changed your location to the fully resolved (absolute) path. So if you proceed to add the project it adds the wrong path.

However, Rider doesn't just insert the absolute path. It stores the relative path computed from the solutions absolute path and the projects absolute path i.e. it doesn't go through the symlink and ends up with an environment specific relative path.

Obviously that's not acceptable in a collaborative version controlled environment. So after correcting the path in the .sln. I can proceed to build the symlinked in project just fine (Right Click -> Build Selected Projects).

However, if I attempt to build any project that depends on the symlinked project I receive errors saying the referenced project can't be resolved; which is nonsense because I just built it from within Rider:

Microsoft.NET.Sdk.targets(128, 5): /usr/local/share/dotnet/sdk/2.1.302/Sdk/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(128,5): error : Cannot find project info for '<ABSOLUTE PATH TO CSPROJ>'. This can indicate a missing project reference.

P.S. Please fix "Right Click -> Copy" in the "Build failed" dialogue, I just had to type that out manually because selecting copy does not add the text to my clipboard.

 

However, I can resolve this issue (temporarily), by navigating to the directory of .csproj I'm trying to build and executing:

dotnet restore

Note: Visual Studio code has no issue with this project,the C# extension builds the project just fine as well.



Anyway, after I've run `dotnet restore` (nuget) once externally, I can then proceed to build within Rider, as long as I'm careful not to use NuGet within Rider (if I run NuGet restore within Rider it breaks again).


Building aside, things are still broken, when I proceed to try debug my xUnit tests, the debugger never launches.

 

All in all, Rider (2019.1.2 - macOS) does not like symlinks. Even after correcting all Rider's mistakes manually, I still can't use the IDE to debug.

dotnetcore 2.1.302

 

 

0

Please sign in to leave a comment.