VIsual Studio 2012 / ReSharper 7.1 / MvvmCross 3.5.1

Hi All,

I'm working happily away on my solutions using these tools and frameworks. All is working really great from a coding perspective, I'm actually really impressed with everything so far.

However ...

I have all my Core code in one solution, lets call it "Pcl" for argument sake. Then I also have an Android solution that contains any platform specific implementations of things and also symbolic links to the *.cs code files from the Pcl solution. All compiling and working great.

The problem is in the Android solution I have commands in the view models like this:

/// <summary>The _login command.</summary>
private IMvxCommand _loginCommand;

/// <summary>
/// Gets the login command.
/// </summary>
public IMvxCommand LoginCommand
{
    get
    {
        _loginCommand = _loginCommand ?? new MvxCommand(AttemptLogin, CanExecuteLogin);
        return _loginCommand;
    }
}

In the Pcl project this is fine however in the Android solution ReSharper reports an issue with this code:

Module 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=xxx,' should be referenced

The code compiles and runs exactly as expected but I don't like the false positives that are being generated. The project has a reference to System version 2.0.5.0 but there is no System version 4.0.0.0 available to reference.

Is this an issue with an old ReSharper (it's not on v9) or have I made a basic blunder in my solution and project setup?

Is there anything I can do about this?

TIA,

J

Posts

  • JimBennettJimBennett Jim Bennett GBInsider, University, Developer Group Leader ✭✭✭✭

    R# comes with a 30 day trial - so maybe try with 9.1 to see if it goes away?

  • JamesGreen.8031JamesGreen.8031 James Green GBMember ✭✭

    I was actually considering doing this ... To be honest I'm annoyed with myself for not having upgraded earlier since the price to go from 7.1 to 9 is now MORE than the initial cost of 7!!!!!

    Go figure ...

  • JamesGreen.8031JamesGreen.8031 James Green GBMember ✭✭

    Hmm ... just install version 9 and it's reporting even MORE errors on a solution that builds and runs fine.

  • JamesGreen.8031JamesGreen.8031 James Green GBMember ✭✭

    This is a complete nightmare. My favourite tool and It's thoroughly broken when used on Xamarin / MvvmCross projects.

    It's stopped reporting problems in my Pcl solution but my Android solution is absolutely riddled with errors about "System Version=4.0.0.0" should be referenced errors.

  • JimBennettJimBennett Jim Bennett GBInsider, University, Developer Group Leader ✭✭✭✭

    Weird. I use it with VS2013 and it works perfectly. It's screwed with 2015 but 2013 is fine.
    Have you tried clearing the resharper caches?

  • JamesGreen.8031JamesGreen.8031 James Green GBMember ✭✭

    OK, cut a long story short I ended up with so many issues NuGet started behaving really strangely as well. I've wiped my machine completely and upgraded to Windows 8.1. Lost 3 days to all of this.

    It turns out that the issue was ReSharper was picking up that in fact I didn't have .NETPortable Profile259 on my machine. This Profile comes with Visual Studio 2013 Update 2 (including Express).

    So I now have a clean installation of Windows 8.1 and I'm going to supplement my setup with VS2013 until I can afford to Upgrade my VS2012 Pro to 2013 or 2015 depending on what happens with the upgrade costs once that hits the streets.

    A royal mess ...

Sign In or Register to comment.