earthling
earthling

Reputation: 5264

PCLStorage in Windows Phone 8

I'm using PCLStorage for a Win8/Wp8 project I'm working on. I'm using it within a PCL itself, and have it referenced in my Win8, Wp8 and PCL projects. Everything is working great in Win8.

In Wp8 however, once I hit my PCL for storage which uses PCLStorage, I'm getting a NotImpmlementedException when I call FileSystem.Current;

"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."

But like I said, I have the PCLStorage NuGet package referenced in my Wp8 project AND the PCL project the same way I do in my Win8 project.

Any idea what's happening?

(I should also note that PCLStorage is working fine if I use it in a new Wp8 project)

Upvotes: 2

Views: 1290

Answers (1)

Daniel Plaisted
Daniel Plaisted

Reputation: 16744

Try uninstalling the PCLStorage NuGet package from all projects and then reinstalling it in all of them.

If it still doesn't work, try checking the references to the PCLStorage DLLs in the WP8 project and make sure they are coming from the wp8 folder in the package.

If that doesn't lead anywhere, try setting copy local to false in the references from your PCL to the PCL Storage DLLs. If you have to do that it's an issue that needs to be fixed, so please file a bug for it.

EDIT: There is a bug in VS 2013 Update 2 RC that can cause this problem. This NuGet package is supposed to fix the issue if you reference it in your Windows Phone app: SuppressPackagingPclFacades. Alternatively setting Copy Local to false for the reference from your PCL library to the PCL Storage assemblies should also fix the issue.

Upvotes: 3

Related Questions