Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
arichar1990 opened this issue Jan 23, 2019 · 1 comment

Comments

@arichar1990
Copy link

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.

@arichar1990 arichar1990 changed the title System.NotImplementedException during xUnit from Xam.Plugins.Settings System.NotImplementedException during xUnit test from Xam.Plugins.Settings Jan 23, 2019
@jfversluis
Copy link
Contributor

Please see #87

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants