Microsoft Store Open Source Series — AppServices library
Microsoft Store Open Source Series - Introduction to AppServices Library
Microsoft has launched the Microsoft Store Open Source Series to showcase their APIs and libraries built for the Microsoft Store. This post discusses the AppServices library, which allows UWP applications to escape sandbox limitations and execute code with full trust permissions.
Escaping the Sandbox
The AppServices library was created to allow UWP applications, such as the Microsoft Store, to access all files on the file system or use special capabilities that are blocked by default. This can be achieved by leveraging Desktop Bridge, which bundles a full trust Desktop component into the application package.
Full-Trust Desktop Components
Desktop Bridge allows classic Win32 Desktop apps to integrate UWP functionality into them without fully migrating to UWP. The UWP app and its full trust Win32 "companion" is bundled together, enabling the UWP app to delegate functionality to the Desktop component when needed.
Building an App Service with AppServices Library
The AppServices library provides APIs for designing and implementing app services. These APIs include handling marshalling cancellation tokens, progress callbacks, and infrastructure for launching Desktop extension processes and managing app service connections. The AppServices library is available in the AppServices NuGet package.