ReShaper ignores -r flag on mcs.rsp
bilenkonito opened this issue · 6 comments
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
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://www.microsoft.com").ContinueWith(t => Debug.Log(t));
}
}
It compiles in Unity, but doesn't in Rider
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.
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.
@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.
@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.
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