Studyxnet / FilePicker-Plugin-for-Xamarin-and-Windows

FilePicker Plugin for Xamarin and Windows
MIT License
74 stars 52 forks source link

System.NotImplementedException during xUnit test from Xam.Plugins.Settings #88

Closed arichar1990 closed 5 years ago

arichar1990 commented 5 years ago

I am getting the following error when I try to run an xUnit test in a Xamarin project that uses Xam.Plugins.Settings to store data to the device:

Message: 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.

The exception occurs in the ISettings property initialization of the Settings class, which has the following form:

public static class Settings
    {
        private static ISettings AppSettings
        {
            get
            {
                return CrossSettings.Current;
            }
        }
}

When xUnit gets to the return CrossSettings line, the error occurs. Any chance anyone can tell me why this is happening? I have the nuget package installed in both the iOS and Android projects.

jfversluis commented 5 years ago

Please see #87