Forum Libraries, Components, and Plugins
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Xam.Plugin.Connectivity doesn't work in .Net 4.5 Unit Test Project

aompgaompg DEMember

When using Xam.Plugin.Connectivity 2.0.0 via Nuget package in a PCL which includes .Net 4.5 as target, and using this PCL in an NUnit test project, a NotImplementedException gets thrown.

Here's the code in the plugin that probably leads to that:

        return null;

And then:

    if (ret == null)
        throw NotImplementedInReferenceAssembly();

Now I wonder how this can work if the library is meant to be portable, but the exception gets thrown when it's used in a portable library.

Or am I wrong and actually the return new ConnectivityImplementation(); line gets executed, but there just is no ConnectivityImplementation for .Net 4.5?

But .Net 4.5 seems to be a supported target, right?
(target="lib\portable-net45+wp80+wp81+wpa81+win8+MonoAndroid10+MonoTouch10+Xamarin.iOS10+UAP10\Plugin.Connectivity.dll" in

The Nuget package is also referenced in the NUnit test project.

Can anyone help me figuring out why that exception gets thrown and if/why it's supposed to be that way?

Best Answer


Sign In or Register to comment.