Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

UWP: Shared Folders

DZone's Guide to

UWP: Shared Folders

You can define a folder (or folders) in an app that can also be used by other apps from the same publisher and which also know about that folder. Learn more here.

· Mobile Zone
Free Resource

Discover how to focus on operators for Reactive Programming and how they are essential to react to data in your application.  Brought to you in partnership with Wakanda

All this month, I'm taking some time each day to explore (and document) things that are related to UWP development that I haven't fully investigated or used before. While doing it over lunch each day I'm calling it #UWPLunch.

This feature has been around as long as Windows 10. I've just never used it.
You can define a folder (or folders) in an app that can also be used by other apps from the same publisher and which also know about that folder.

Be careful of copying from the docs on this topic as they contain two errors in the sample XML.

The element name is  PublisherCacheFolders (with an 's')  and the  Folder elements must be closed.

Like this:

  <Extensions>
    <Extension Category="windows.publisherCacheFolders">
      <PublisherCacheFolders>
        <Folder Name="Config" />
      </PublisherCacheFolders>
    </Extension>
  </Extensions>

Just add the above to Package.AppxManifest for each project.

You can then access this folder from all projects with:

 StorageFolder configFolder = ApplicationData.Current.GetPublisherCacheFolder("Config");

Simples.

Learn how divergent branches can appear in your repository and how to better understand why they are called “branches".  Brought to you in partnership with Wakanda

Topics:
folders ,xml ,uwp ,apps ,mobile

Published at DZone with permission of Matt Lacey, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}