Solved, I guess. Here is what I just posted into the Xamarin forum -- *GK*

5:53PM
<https://forums.xamarin.com/discussion/comment/264820/#Comment_264820> Accepted
Answer

In the absence of replies, I think I've worked this out myself.

The WindowsAzure.Storage package cannot be used in any PCL project with any
targets that I have tried. I suspected that this was the case, but hoped
that there would be some acceptable trick to workaround it. The following
statement on this page
<https://developer.xamarin.com/guides/xamarin-forms/cloud-services/storage/azure-storage/>
confirms my suspicion by a reversed argument.

*The Azure Storage Client Library for Xamarin supports Shared Access
Projects (SAP) for Xamarin.Forms only. However, the DependencyService class
can be used in a Portable Class Library (PCL) project to invoke Azure
Storage Client Library code contained in platform-specific projects.*

I found that you can add the WindowsAzure.Storage package to iOS and Droid
projects and they work correctly. So you are forced (as the quote above
hints) to add the packages to the platform projects and use SAP to share
the code or use a dependency interface. I have never needed to use SAPs
before, sticking only to PCLs because they are a neater separation of
functionality. So now I can see my first real justification for the
invention of SAP, although I could also add the common source files to the
project as links.

While discussing this issue in my local .NET forum it raised a bit of
confusion between the packages WindowsAzure.Storage and
Microsoft.Azure.Mobile.Client. The latter can be added to a PCL project,
but it's designed to work specifically with a service you compose in a
wizard style in the Azure portal. I've seen this done in a live demo and it
was quick and easy and would be a great RAD choice if the situation arises,
but I didn't want that, I wanted Azure Storage access using the package I
was most familiar with.

On 7 April 2017 at 14:26, William Luu <will....@gmail.com> wrote:

> I think it would work, or at least that's my reading of the target
> frameworks section of their readme: https://github.com/
> Azure/azure-storage-net#target-frameworks
>
> The relevant section in that readme
>
>    - Netstandard1.3: Storage Client Libraries for .NET are available to
>    support Netstandard application development including Xamarin/UWP
>    applications.
>
> If it doesn't work, then I would suggest adding an issue in that Github
> repo detailing how/why it is not working.
>
> On 7 April 2017 at 12:56, Greg Keogh <gfke...@gmail.com> wrote:
>
>> If I was to implement something like this (I've not done so, sorry) then
>>> I'd look at putting a WebAPI on it as the external interface.
>>>
>> There are scenarios for small mobile apps where creating a WebApi to
>> support it is overkill. I know you can "knock them up" in the Azure portal
>> pretty quickly, but there are times when just Azure tables or blobs along
>> with their very simple API could support a working app. So the question of
>> directly calling the Azure API (via the convenient Nuget package) remains a
>> mystery -- *GK*
>>
>
>

Reply via email to