Connectivity plugin always throws NotImplementedException

I am trying to use Xam.Plugin.Connectivity 2.3.0 by James Montemagno in my Cross platform Xamarin app. The package is installed in all the three projects i.e. protable, android and iOS. But whenever i try to check connectivity, it throws NotImplementedException. This behaviour is independent of whether i try to access it in the portable or platform specific project. This is the code with which i try to access it

if (CrossConnectivity.Current.IsConnected)
{
//business logic
}

The exception details are as follows

System.NotImplementedException: This functionality is not implemented in the portable version of this assembly. You should reference the NuGet package from your main application project in order to reference the platform-specific implementation.

Answers

  • Sumit_SharmaSumit_Sharma USMember ✭✭✭

    May be packages are not installed in right way in all the projects.

    Do try to clean your solution , remove the connectivity package, re install connectivity plugin, build solution then try what you are trying to do.

    Hope it's help.

  • @Nightowl.4686 said:
    I am trying to use Xam.Plugin.Connectivity 2.3.0 by James Montemagno in my Cross platform Xamarin app. The package is installed in all the three projects i.e. protable, android and iOS. But whenever i try to check connectivity, it throws NotImplementedException. This behaviour is independent of whether i try to access it in the portable or platform specific project. This is the code with which i try to access it

    if (CrossConnectivity.Current.IsConnected)
    {
    //business logic
    }

    The exception details are as follows

    System.NotImplementedException: This functionality is not implemented in the portable version of this assembly. You should reference the NuGet package from your main application project in order to reference the platform-specific implementation.

    Hi,

    Have you found a solution ? I ve the same problem here...

  • SanjayHRSanjayHR INMember

    @Sumit_Sharma said:
    May be packages are not installed in right way in all the projects.

    Do try to clean your solution , remove the connectivity package, re install connectivity plugin, build solution then try what you are trying to do.

    Hope it's help.

    This worked for me. Thanks Sumit Sharma.

Sign In or Register to comment.