Share via


UWP Apps with Network Share Access

Hi Developers,

If you recall, Windows 10 Creators Update introduced support for registering loose file packages from a network share to enhance collaborative and multi-device app development. We heard great things from you all (our developer community) about how your app building productivity increased – specifically while working on apps that are asset heavy.

Building on that great work, in the Windows 10 Fall Creators Update, we are happy to announce network share access from pre-release apps for validation!

What does this mean?

App development (especially game development) has always been a collaborative and iterative effort. Roughly speaking the process works as follows; designers create assets, developers build the engine to leverage those assets and the testers validate and provide feedback. The three operations are very tightly coupled and required for any app to be successful. By allowing network access to packaged apps, the app development process and validation process increases in agility; developers refer to assets from a known network share within the app and designers drop new assets into that same network share when they’re ready, eliminating the need to re-package, re-download and re-install the app during validation.

Furthermore, if the app is being distributed via the Windows Store for validation (e.g. via tokens or flighting), this functionality is still 100% usable – so long as the referenced network share is accessible to the device with the app.

Note: It’s important to remember that this feature should only be used for pre-release versions of your UWP app. Once you’re ready to publish the app for General Availability (GA), assets must be placed inside the UWP app package when it’s being submitted to the Windows Store.

How does it work?

To get started, there are two things you’ll need to do:

    1. Enable network share access via the app capability declaration in the manifest, specifically "developerModeNetwork"

<Capabilities> <rescap:Capability Name="developmentModeNetwork" /> </Capabilities>

2. The target device where the app will be installed, needs to be in developer mode

Now you’re ready to access files on a network share! Here’s how that is done.

File access:

To access the files on the network share from your UWP app, you will need to use the Win32 file access APIs.

Network credentials:

For unsecured network shares, there is no setup required.

For secured network shares, the users on the target device can add credentials to access the network share using the Windows 10 Application Deployment tool (WinAppDeployCmd).

Demo: Here is a simple UWP game that uses Win32 APIs to load assets from the app package. The readme file has the step by step instructions to create your own version of the game that accesses the network share for the game assets.

If you have any questions regarding network share access to your UWP apps or have any issues with the GitHub sample, please post them in the comments section below.

Thanks,

Chaitanya Donthini – Program Manager, Windows Developer Platform