Shared Library and rider

Answered

Hello,

I just installed Rider and I tried to create a new class in my shared library.

But I can only add a file or folder. I create a .cs file.

The problem is that the file doesn't seem to be added to the .sln. I don't have any complation and when I open the project on VS2015 I don't have the file in the solution.

All the file already added with VS2015 works well.

So did I miss something, or is there a problem with shared libraries ?

Thanks,

0
12 comments

Thank you for your feedback.
Currently there are several issues in Shared Projects support, which prevents comfortable development.
https://youtrack.jetbrains.com/issue/RIDER-3785
https://youtrack.jetbrains.com/issue/RIDER-3784
https://youtrack.jetbrains.com/issue/RIDER-3812

We are working on it.

0

Hi,

 

Is there any progress on this?
I'm currently working on a project that uses shared libraries, and this has forced me back to Visual Studio end even though Resharper helps in alleviating the "pain", it's not quite the same.

0

Have you tried the newest available eap build, it seems that all major issues with shared files we re resolved.

0

Yes, I've been on EAP23 since it became available.
It's a portable shared library if that gives any more context.
I'll post up the error asap

 

EDIT [30.06.2017]
Installed EAP24, same error persists

0

This is the error I'm hitting 

Microsoft.PackageDependencyResolution.targets(154, 5): [null] Unexpected dependency 'C:\Users\********\Workspace\*******\*******.******\*******.Shared.csproj' with no version number.

Path is somewhat sensored as I'm I'd like to keep project names personal.
We're building 2 parts as shared portable libraries, one is for serve core functions and one is for a communcation layer.
So the main server is dependent on these 2 libraries and produces the above error when trying to build and run.

This part of the project builds perfectly fine in Visual Studio 2017.

0

Quick question though.

Should there be any diffs between the diagnostic output from the build between Visual Studio and Rider?

0

Please check that in Rider Settings that you are using Msbuild Toolset from VS2017. Also in Rider you may try the setting "Use ReSharper Build" checkbox on/off.

I have never compared the build output, but try it. If on Build tab in Rider you do not see the text output - search for "Toggle treeview mode" button on the Build tab toolbar.

0

I've pretty much tried toggling every build setting I have access to, and it still won't build.

However, I found that Rider is trying to resolve a projectreference entry as a packagereference, which will not work given that it's a projectreference.

0

Sorry for the delay, I am trying to reproduce your case. Please clear some question for me. Have you tried to create a minimal example demonstrating the problem? Your solution with portable libs was created in which VS? Portable libs are compiled to which contexts? Full dotnet and dotnetcore or something else? Thanks!

0

Please clone or fork the Minimal example here https://github.com/Fredr1kh/MVE

We did manage to isolate the error in the mean time.
When commenting out the reference to the Core project in WebApplication1.csproj, we found the error disappeared, and believe that this is caused by Core having a reference to Shared in addition to WebApplication1 having a reference to Shared as well.

WebApplication1 --+--> Core -> Shared
                                \-> Shared

Core is a .net core project targeting netstandard1.4
Shared is a Portable Class Library
Project was created with VS Community 2017

0

Thanks a lot for the sample.

Console command "dotnet build offtop.sln" also shows the "Unexpected dependency" error.

Are all your projects dotnetcore? It would be logic to put all code from Shared to Core. Is it possible in your big solution?

0

Without regard to the problem, I should say that "Shared Projects" and "Portable Projects" are different technologies from MS

0

Please sign in to leave a comment.