Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReShaper ignores -r flag on mcs.rsp #270

Closed
bilenkonito opened this issue Nov 10, 2017 · 6 comments
Closed

ReShaper ignores -r flag on mcs.rsp #270

bilenkonito opened this issue Nov 10, 2017 · 6 comments
Assignees
Milestone

Comments

@bilenkonito
Copy link

Hello there,

I am having an issue with the ReShaper plugin for Rider where it completely ignores the -r flag to inject assembly references.
I need to reference System.Net.Http.dll and the following line inside the rcs.rsp makes Unity reference the dll: -r:System.Net.Http.dll

However, Rider completely ignores this and keeps telling me it cannot find System.Net.Http.
If I add the reference manually, it works fine until I switch to Unity and it regenerates the solution, as expected.

Kind Regards

@van800 van800 self-assigned this Nov 10, 2017
@van800
Copy link
Contributor

van800 commented Nov 10, 2017

Reproduced the problem.

NET4.6 should be set in Unity.

Add Assets/mcs.rsp, containing -r:System.Net.Http.dll
and a class with

using UnityEngine;
using System.Net.Http;
public class Test : MonoBehaviour
{
void Start()
{
HttpClient Client = new HttpClient();
Client.GetStringAsync("http:https://www.microsoft.com").ContinueWith(t => Debug.Log(t));
}
}
It compiles in Unity, but doesn't in Rider

van800 added a commit that referenced this issue Nov 10, 2017
@van800
Copy link
Contributor

van800 commented Nov 10, 2017

Thanks for the request, I hope it will help you and other people.
Feel free to try the fast-fix. It will help a lot if you try it with your setup at this early stage.
I have only tested it on Linux right now.
You may manually update your Unity3dRider.cs according to b826f46
Fix will get to Rider nightly builds only after testing and merge to master.

@bilenkonito
Copy link
Author

bilenkonito commented Nov 13, 2017

I have applied the changes to my Unity3dRider.cs but I does not seem to be making a difference.
My setup:

  • Windows 10 15063.674
  • Unity 2017.2.0f3
  • Rider 2017.2 #RD-172.4144.1459

If you need me to provide any debug info regarding this, please let me know exactly what you need and I will gladly provide it.

@van800
Copy link
Contributor

van800 commented Nov 13, 2017

@aftokinito
I suppose that you changed the Unity3dRider.cs, return to Unity and double click on any script, right?
Could you please debug the ApplyManualCompilingSettingsReferences to see what is not going well?

I actually tested it at least on Windows and Linux.

Also there will be a nightly build with this fix, I hope in couple of days, I will notify you.

@bilenkonito
Copy link
Author

@van800 nevermind, after restarting both Rider and Unity, Rider is now loading the reference correctly.
I would appreciate if you could still update this issue when the fix goes on the Rider nightly.

@van800
Copy link
Contributor

van800 commented Nov 14, 2017

Feature landed in publicly available Rider 2017.3 nightly build
Build #RD-173.3389.1226, built on November 13, 2017
available via Jetbrains Toolbox App

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants