PCL Storage System.NotImplementedException

xamarinboyxamarinboy TRMember ✭✭

Dear all,

I have installed PCLStorage nuget package to all of Portable Project, Android Project and iOS Project. Then i have get this piece of code from github page of PCL Storage:

public async Task PCLStorageSample() { IFolder rootFolder = FileSystem.Current.LocalStorage; IFolder folder = await rootFolder.CreateFolderAsync("MySubFolder", CreationCollisionOption.OpenIfExists); IFile file = await folder.CreateFileAsync("answer.txt", CreationCollisionOption.ReplaceExisting); await file.WriteAllTextAsync("42"); }

Then called this method after click of a button and see this error:

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

I searched a lot and can not find a solution. I need your helps.

Thanks,

Onur

Answers

  • Anth12Anth12 USMember

    Exact same problem here, did you find any solution? I have referenced the package in the PCL & Droid project but keep getting the exception:

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

  • xamarinboyxamarinboy TRMember ✭✭

    I created a new project and PCL Storage worked very well in the new project

    @Anth12 said:
    Exact same problem here, did you find any solution? I have referenced the package in the PCL & Droid project but keep getting the exception:

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

  • Anth12Anth12 USMember

    Thanks for your reply. My guess is an issue with the package installation in that case, I did try removing the references and re-adding but not joy. Im trying UnifiedStorage now...

  • Gigex42Gigex42 USMember ✭✭✭

    thought I was the only one with this problem..

    Any help?
    Worked with the same version of PCLStorage in some project before..

  • Gigex42Gigex42 USMember ✭✭✭

    No solution?

  • xamarinboyxamarinboy TRMember ✭✭

    @Daniel.Reiter said:
    thought I was the only one with this problem..

    Any help?
    Worked with the same version of PCLStorage in some project before..

    Daniel,

    As i remember i did not spend much time for this problem and i have created a new project. It works fine now

  • BalaAKBalaAK INMember ✭✭

    any updates ???????

  • BalaAKBalaAK INMember ✭✭

    Please install the plugin to both pcl and ios project or Android project.. It will work

Sign In or Register to comment.