locked
Windows Store App Libraries For Blob Storage RRS feed

  • Question

  • I would like to use Windows Azure Storage from within a Windows Store Application. Specifically the Blob Storage.

    Can someone point me at the libraries?  DevStudio 2012 Nuget Installer seems to only have the .net versions.

    Monday, June 3, 2013 8:36 PM

Answers

  • I understand now, but why would you want to add windows 8 libraries for your store app (not called mobile services)

    here is the link that will help, you will need to download and extract storage client for windows store app

    --------------------------------------

    Please mark as answered if it helped


    ---------------------------------- Please mark as answered if it helped Vishal Narayan Saxena http://twitter.com/vishalishere http://www.ogleogle.com/vishal/

    Monday, June 3, 2013 10:24 PM
  • To get the storage client library for Windows Azure Storage for Windows 8 Apps, download the source code from Github - https://github.com/WindowsAzure/azure-sdk-for-net, open the project in Visual Studio and build the RT project. Once the project is built successfully, you can get the "Microsoft.WindowsAzure.Storage.winmd" file from bin directory which you can reference in your project.
    Tuesday, June 4, 2013 11:30 AM

All replies

  • Hi RedcleyDev,

    here is the sample code that shows how to upload files to blob storage using azure mobile services.

    you can also follow this link to a stackoverflow thread, that explains how to get it working, 

    also here is the download link for the Azure sdk(s)

    --------------------------------

    Please mark as answered if it helped


    ---------------------------------- Please mark as answered if it helped Vishal Narayan Saxena http://twitter.com/vishalishere http://www.ogleogle.com/vishal/

    Monday, June 3, 2013 9:18 PM
  • Sorry, still confused...

    I'm trying to programmatically save an image to a windows storage blob from my windows store app.

    I have found several docs and examples referencing: CloudStorageAccount, CloudBlobClient , CloudBlobContainer, see the below snippet.

    However I have been unable to find the windows 8 library for these classes.  The SDK you pointed me at does install correctly however does not seem to contain "Microsoft.WindowsAzure.Storage" Per the msn documentation for those classes.

    ====================================================

                // Retrieve storage account from connection string.
                CloudStorageAccount storageAccount = CloudStorageAccount.Parse(
                    CloudConfigurationManager.GetSetting("StorageConnectionString"));

                // Create the blob client.
                CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();

                // Retrieve reference to a previously created container.
                CloudBlobContainer container = blobClient.GetContainerReference("mycontainer");

                // Retrieve reference to a blob named "myblob".
                CloudBlockBlob blockBlob = container.GetBlockBlobReference("myblob");

                // Create or overwrite the "myblob" blob with contents from a local file.
                using (var fileStream = System.IO.File.OpenRead(@"path\myfile"))
                {
                    blockBlob.UploadFromStream(fileStream);
                }

     
    Monday, June 3, 2013 10:06 PM
  • I understand now, but why would you want to add windows 8 libraries for your store app (not called mobile services)

    here is the link that will help, you will need to download and extract storage client for windows store app

    --------------------------------------

    Please mark as answered if it helped


    ---------------------------------- Please mark as answered if it helped Vishal Narayan Saxena http://twitter.com/vishalishere http://www.ogleogle.com/vishal/

    Monday, June 3, 2013 10:24 PM
  • To get the storage client library for Windows Azure Storage for Windows 8 Apps, download the source code from Github - https://github.com/WindowsAzure/azure-sdk-for-net, open the project in Visual Studio and build the RT project. Once the project is built successfully, you can get the "Microsoft.WindowsAzure.Storage.winmd" file from bin directory which you can reference in your project.
    Tuesday, June 4, 2013 11:30 AM