<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Universal Windows App Deployment</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/appinstaller/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/appinstaller/feed.xml</link>
    <description>The official blog of the team that owns building and deploying Universal Windows Apps</description>
    <lastBuildDate>Sat, 24 Feb 2018 18:32:12 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>On demand resource packages</title>
      <link>https://docs.microsoft.com/archive/blogs/appinstaller/on-demand-resource-packages</link>
      <pubDate>Fri, 23 Feb 2018 16:01:48 GMT</pubDate>
      <dc:creator><![CDATA[Sandeep George]]></dc:creator>
      <guid
        isPermaLink="false">http://blogs.msdn.microsoft.com/appinstaller/?p=1866</guid>
      <description><![CDATA[Resource packages offers a great way to reduce users disk footprint by segmenting language or scale...]]></description>
      <content:encoded><![CDATA[<a href="https://blogs.msdn.microsoft.com/appinstaller/2016/09/30/optimizing-the-download-of-universal-windows-apps-with-resource-packages/"><span>Resource packages </span></a>offers a great way to reduce users disk footprint by segmenting language or scale specific asset into separate packages that are downloaded automatically by Windows depending on the users machine configuration. If the user adds a new language to his/ her list of OS languages in Region &amp; language settings or changes the display configuration, across an automatic store update, the OS will fetch applicable resource packages for all installed apps on the device.

We received feedback from a number of developers that while the automatic install of resource packages is a great feature, they would like to acquire resource packages from within their app to light up some scenarios. For example a gamer that wants to download Japanese asset package just for that game but does not want to add Japanese as a OS language. Another example is a customer that is using a language learning app and wants to download new language learning material which is part of a language package, without adding this new language as his/ her OS language.

We are excited to announce that with SDK 10.0.17095.0, <a href="https://docs.microsoft.com/en-us/uwp/api/Windows.ApplicationModel.PackageCatalog"><span>AddResourcePackageAsync </span></a>API will allow developers to install a resource package for an app on demand!

<strong>How to use the API?</strong>
<ul>
 	<li>AddResourcePackageAsync takes the PackageFamilyName of the application as well as the resource ID that uniquely identifies the resource package that you are trying to download. The resource ID corresponds to the ResourceId element in the AppxManifest.xml of your resource package. You can also find this information in your application's AppxBundleManifest.xml which describes all the packages that make up your .appxbundle package.</li>
 	<li>Your application must be restarted to get a merged view of all resources that are available to your application, so the API offers the 'ForceTargetApplicationShutdown' option that you can pass to restart your application.</li>
 	<li>If there is an update available for your application when you are trying to download the resource package, the API will fail as the older version of the app is no longer available. By passing in the 'ApplyUpdateIfAvailable' flag, the API will update the app as well as get the requested resource package as part of the same download!</li>
 	<li>The API returns a progress for the download that you can display in your application. Also note that for Windows store applications, the resource package acquisition shows up in the Microsoft Store 'downloads and updates' page and shows up as an update to your application. The end user can choose to pause or cancel the download of the resource package from the Microsoft Store UX.</li>
</ul>
Here is a code snippet to explain the usage
<pre>private async void DownloadGermanResourcePackage(object sender, RoutedEventArgs e)
{            
    // ResourceId that is unique to the resource package
    string resourceId = "split.language-de";
    // Warn user that application will need to restart.
    // To take update if available pass in the ApplyUpdateIfAvailable flag
    var packageCatalog = PackageCatalog.OpenForCurrentPackage();
    PackageCatalogAddResourcePackageResult result = await packageCatalog.AddResourcePackageAsync("29270depappf.CaffeMacchiato_gah1vdar1nn7a", resourceId, 
        AddResourcePackageOptions.ApplyUpdateIfAvailable | AddResourcePackageOptions.ForceTargetApplicationShutdown)
        .AsTask&lt;PackageCatalogAddResourcePackageResult, PackageInstallProgress&gt;(new Progress
        (progress =&gt;;
        {
                // Draw progress
        }));

        if (result.ExtendedError != null)
        {
                //Display error or retry if needed
        }
}
</pre>
<strong>Development Workflow</strong>

The API works for both Store installed as well as sideloaded applications. As a developer for local validation, you can create an .appxbundle (contains the main app + resource packages) and sideload this from your local drive, network share or webserver. When your app calls the AddResourcePackageAsync API, Windows will  acquire the resource package from the location where the original application was installed. This makes the validation simple. Once this works, you can proceed to submit your application to the Windows Store and without any code changes, the API will now fetch the resource packages from the Windows Store!

<strong>Removing resource packages</strong>

Normally resource packages that are acquired by the application or downloaded by the OS remain on the device until the application is uninstalled. However the App can choose to remove the resource package(s) it downloaded via the <a href="https://docs.microsoft.com/en-us/uwp/api/Windows.ApplicationModel.PackageCatalog">RemoveResourcePackageAsync </a>API. You cannot remove a resource package that is applicable for the user or the device as a whole. For example, if French is an OS language for the user or the device, you cannot remove the French resource package using this API.

Here is a code snippet that shows the usage.
<pre>private async void RemoveResourcePackage(object sender, RoutedEventArgs e)
{            
    var packageCatalog = PackageCatalog.OpenForCurrentPackage();
    List resourcePackagesToRemove = new List();
    resourcePackagesToRemove.Add("split.language-de");
    //Warn user that application will be restarted
    var removePackageResult = await packageCatalog.RemoveResourcePackagesAsync(resourcePackagesToRemove);
    if (removePackageResult.ExtendedError != null)
    {
        // display error
    }
}

</pre>
Let us know what you think!

Cheers,
Sandeep George
Senior Program Manager
<pre></pre>]]></content:encoded>
    </item>
    <item>
      <title>Removing Optional Packages</title>
      <link>https://docs.microsoft.com/archive/blogs/appinstaller/remove-optional-packages</link>
      <pubDate>Fri, 17 Nov 2017 13:45:09 GMT</pubDate>
      <dc:creator><![CDATA[Sandeep George]]></dc:creator>
      <guid
        isPermaLink="false">http://blogs.msdn.microsoft.com/appinstaller/?p=1776</guid>
      <description><![CDATA[Optional packages provide a great way to componentize and distribute pieces of your application as...]]></description>
      <content:encoded><![CDATA[<span style="float: none;background-color: transparent;color: #333333;cursor: text;font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size: 16px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;line-height: 24px;text-align: left;text-decoration: none;text-indent: 0px">Optional packages provide a great way to componentize and distribute pieces of your application as separate entities allowing users to pick parts of your application to install. So how does a user remove these optional packages once installed? If your optional package has an entry in the AppList, well then users can right click and uninstall the optional packages like they uninstall other apps. Uninstalling the main application would remove its optional packages as well.  But if your optional package does not have an entry in the AppList, for example in the case of a content only optional package, then users would have to drill into 'Apps and Features' settings and click on Advanced options to manage the optional packages.</span>

<img width="398" height="130" class="alignnone wp-image-1796" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/11/removeop.jpg" />

<img width="380" height="507" class="alignnone wp-image-1786" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/11/removedlc.jpg" />

&nbsp;

<span style="float: none;background-color: transparent;color: #333333;cursor: text;font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size: 16px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;line-height: 24px;text-align: left;text-decoration: none;text-indent: 0px">We received feedback from our developers that the apps would like to provide a removal experience from within the app itself. For example, there is shiny new content available for the app but the user does not have enough disk space for new content. So the app would like to allow the user to  remove old content and then download new content.</span>

<span style="float: none;background-color: transparent;color: #333333;cursor: text;font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size: 16px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;line-height: 24px;text-align: left;text-decoration: none;text-indent: 0px">With the Fall Creators Update SDK (10.0.16229.0) , I am excited to announce that we added a new API <a href="https://docs.microsoft.com/en-us/uwp/api/Windows.ApplicationModel.PackageCatalog">RemoveOptionalPackageAsync</a> where you can pass in a list of optional packages that need to be removed. </span>

Here is a code snippet.
<div>
<pre>    PackageCatalog catalog = PackageCatalog.OpenForCurrentPackage();
    List&lt;string&gt; optionalList = new List&lt;string&gt;();
    optionalList.Add("FabrikamAgeAnalysis_kwpnjs8c36mz0");
    
    <strong>//Warn user that application will be restarted.</strong>
    var result = await catalog.RemoveOptionalPackagesAsync(optionalList);
    if(result.ExtendedError != null)
    {
        <span class="hljs-keyword">throw</span><span> removalResult.ExtendedError;</span><b></b>
    }
</pre>
</div>
<span style="float: none;background-color: transparent;color: #333333;cursor: text;font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size: 16px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;line-height: 24px;text-align: left;text-decoration: none;text-indent: 0px"><strong>Note:</strong> In the case of a related set the platform will need to restart your main application to finalize the removal to avoid situations where your app has content that is loaded from the package you are removing. Your apps must notify the users that the application will need to be restarted before you app calls the API. </span>

<span style="float: none;background-color: transparent;color: #333333;cursor: text;font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size: 16px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;line-height: 24px;text-align: left;text-decoration: none;text-indent: 0px">However, if your optional package is content only then, you should explicitly tell the platform that the package you are about to remove is 'not in use' by your application before you remove the optional package. This also allows you to remove the package without a restart.</span>

<span style="float: none;background-color: transparent;color: #333333;cursor: text;font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size: 16px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;line-height: 24px;text-align: left;text-decoration: none;text-indent: 0px">Here is a snippet of how you should uninstall a content only optional package.</span>
<div>
<pre>    //check if optional package is installed first
    var currentAppPackage = Windows.ApplicationModel.Package.Current;
    foreach (var package in currentAppPackage.Dependencies)
    {
        if (package.IsOptional &amp;&amp; package.Id.FamilyName.Contains("FabrikamFaceFilters"))
        {
            await package.SetInUseAsync(false);
        }
    }

    PackageCatalog catalog = PackageCatalog.OpenForCurrentPackage();
    List&lt;string&gt; optionalList = new List&lt;string&gt;();
    optionalList.Add("FabrikamFaceFilters_kwpnjs8c36mz0");

    var result = await catalog.RemoveOptionalPackagesAsync(optionalList);
    if(result.ExtendedError != null)
    {
        <span class="hljs-keyword">throw</span><span> removalResult.ExtendedError;</span><b></b>
    }
</pre>
</div>
&nbsp;

Let us know what you think!

Cheers,
Sandeep George
Senior Program Manager]]></content:encoded>
    </item>
    <item>
      <title>Automated app updates with .appinstaller file</title>
      <link>https://docs.microsoft.com/archive/blogs/appinstaller/automated-app-updates-with-appinstaller-file</link>
      <pubDate>Wed, 27 Sep 2017 11:13:15 GMT</pubDate>
      <dc:creator><![CDATA[c.donthini]]></dc:creator>
      <guid
        isPermaLink="false">http://blogs.msdn.microsoft.com/appinstaller/?p=1725</guid>
      <description><![CDATA[This blog covers updates for UWP apps that are not distributed through the Windows Store. This is a...]]></description>
      <content:encoded><![CDATA[This blog covers updates for UWP apps that are not distributed through the Windows Store. This is a great solution for enterprises that need to install their apps from internal network locations like http or unc paths.

Let’s say you’re a developer who wants to build a Windows 10 app, called MyHRApp, and you’d like to share it on the internal company website.

Before build 16291 Windows 10 app updates outside the store were very difficult, because they required both user action and you, the developer, had to handle app update logistics or IT Pros had to write complex scripts to do update logisitics. You had to manage system resources; manage app workflow during an update; handle app update logistics through more than 1 app version; handle behavior when updates are in a different location, and a lot more.
<h2>Introducing the .appinstaller file</h2>
To help streamline the update process, starting in Windows 10 Fall Creators Update (insider build 16291 or later), we introduced the .appinstaller file. This file contains a standardized description of the components of the app, the location of potential updates, and specifies an update policy as shown in the example below:

<a href="https://msdnshared.blob.core.windows.net/media/2017/09/appinstallerfile.png"><img width="1023" height="871" class="alignleft size-full wp-image-1735" alt="Sample AppInstaller file" src="https://msdnshared.blob.core.windows.net/media/2017/09/appinstallerfile.png" /></a>

The .appinstaller file contains sections for the main bundle as well as optional packages, dependencies, and update settings. The Uri in each section of the .appinstaller file is the location of the updates for that package. Notice that packages in the same .appinstaller file can have different versions. This is because versioning of each package is independent and is based on the number of updates that package had.

<blockquote><code>During deployment, the App Installer file is validated against the app packages referenced in the Uri element. So the Name, Publisher and Version should match the <a href="https://docs.microsoft.com/uwp/schemas/appxpackage/uapmanifestschema/element-identity">Package/Identity</a> element in the app package manifest.</code> </blockquote>

<em>Note:</em> The .appinstaller file is consumable through App Installer app and Powershell. Currently the App Installer app in Windows 10 Fall Creators Update only supports .appInstaller files that are located on a webserver. PowerShell (or the native PackageManager API) supports both http and unc locations doesn’t have these restrictions.
<h2>New workflow with .appinstaller</h2>
With the new workflow introduced in Build 16291 and later, when developing your MyHRApp you would also create a MyHRApp.appinstaller file and you’d upload it to the same webserver as the app.

Along with the app MyHRApp, the user's device downloads the MyHRApp.appinstaller file and uses it to check for updates. If an update is found, it gets downloaded in the background, without interfering with the app launch. The update gets applied by the system and the next time the user launches MyHRApp - the update is applied to the app. Then, the system informs you, the developer, of the updates so you can surface the information to the user as appropriate. For details on update status see <a href="https://blogs.msdn.microsoft.com/appinstaller/2016/11/11/developer-controlled-app-updates/">this blog</a>.

<em>Note</em>: When MyHRApp v2 update gets downloaded, the updated MyHRApp.appinstaller v2 file gets downloaded along with it.

<em>Note</em>: If you choose to change MyHRApp v2's location from webserver1 to webserver2, you only update MyHRApp.appinstaller in webserver1 to point to the new location of MyHRApp's v2 in webserver2. In webserver2 you would add MyHRApp.appxbundle's v2 along with a new MyHRApp.appinstaller for v2. In this case, when the user's device checks for an update in webserver1, it finds the pointer to webserver2 and downloads the v2 of MyHRApp along with the latest appinstaller file from webserver2.

With the .appinstaller file, your app is kept updated through the following process:

<a href="https://msdnshared.blob.core.windows.net/media/2017/09/appinstaller-file-update.png"><img width="1125" height="1066" class="alignleft size-full wp-image-1756" alt="Developer/User work flow auto-updates" src="https://msdnshared.blob.core.windows.net/media/2017/09/appinstaller-file-update.png" /></a>

In summary, the .appinstaller file removes the need for the developer to handle update intricacies in their app, and allows apps to update without disturbing the user. This adds up to an easier app deployment lifecycle, and a better app experience for users.

<span>We are very interested in hearing your feedback. Please post your comments and questions below.</span>

Thanks,

Nona Sirakova,<span> Program Manager – Windows Developer Platform</span>]]></content:encoded>
    </item>
    <item>
      <title>UWP App Installs from Web via App Installer</title>
      <link>https://docs.microsoft.com/archive/blogs/appinstaller/uwp-app-installs-from-web-via-app-installer</link>
      <pubDate>Tue, 26 Sep 2017 06:16:02 GMT</pubDate>
      <dc:creator><![CDATA[c.donthini]]></dc:creator>
      <guid
        isPermaLink="false">http://blogs.msdn.microsoft.com/appinstaller/?p=1695</guid>
      <description><![CDATA[We have introduced App Installer in the Windows 10 Anniversary Update to make installation of...]]></description>
      <content:encoded><![CDATA[We have introduced App Installer in the Windows 10 Anniversary Update to make installation of universal windows apps simple to install. With the App Installer, a user just has to double-click the app package to install.

Since the introduction of App Installer, we are heartened by the positive feedback that we received. So we are excited to announce the ability to <a href="#direct-install">directly install from web</a>, to install <a href="https://blogs.msdn.microsoft.com/appinstaller/2017/05/12/tooling-to-create-a-related-set/">related sets</a> and the ability to auto-update apps with Windows 10 Fall Creators Update. 

<blockquote>App Installer version greater than 1.0.12271.0 is required to support the new features. </blockquote>

<h2 id="direct-install">Direct Web Install</h2>
Typically, an app package needs to be locally available on device before it can be installed with the App Installer. For the web scenario, this means that the user must download the app package from the web server, after which it can be installed with App Installer. In the case of an app bundle where the package can contain the resources for all languages and assets for different scale factors, having to download it would waste a lot of disk space and time, which is why App Installer now has built features to streamline this process.

App Installer can install an app directly from a web server. When the user clicks on an app package hosted web link, App Installer is invoked automatically. The user is then taken to the app info view in App Installer and is then one click away from engaging directly with the app.

The direct app install is only available in the Windows 10 Fall Creators Update and newer. Previous versions of Windows (going back to the Windows 10 Anniversary Update) will be supported by the <a href="#old-version-windows">web install experience on previous versions of Windows 10</a>. This experience provides significant improvements to the existing app install procedure.
<h3>How does direct web install work?</h3>
<strong>Protocol Activation Scheme</strong>

We introduced a new protocol activation scheme that is already registered in the OS to invoke App Installer. When a user clicks a app package hosted web link with our registered scheme, App Installer is invoked. This activation mechanism is browser independent and so is beneficial to site administrators who can now be agnostic of the browsers while incorporating app packages into their web sites.

<strong>Requirements for protocol activation scheme</strong>
<ol>
 	<li>Web servers that support byte range requests (HTTP/1.1)
<ul>
 	<li>App Packages need to be hosted on servers that support HTTP/1.1 protocol</li>
</ul>
</li>
</ol>
<strong>How to enable this on your webpage</strong>

Users who want to host app packages on their web sites need to follow this step:

Prefix your app package URIs with the activation scheme <code>'ms-appinstaller:?source=' </code> referencing them on your webpage
<div class="tabs">
<div title="html webpage">
<pre class="brush: html">

&lt;html&gt;
   &lt;body&gt;
     &lt;h1&gt;MyApp Web Page&lt;/h1&gt;
     &lt;a href=&quot;ms-appinstaller:?source=http://mywebservice.azureedge.net/HubApp.appx&quot;&gt; Install app package &lt;/a&gt; 
     &lt;a href=&quot;ms-appinstaller:?source=http://mywebservice.azureedge.net/HubAppBundle.appxbundle&quot;&gt; Install app bundle &lt;/a&gt; 
     &lt;a href=&quot;ms-appinstaller:?source=http://mywebservice.azureedge.net/HubAppSet.appinstaller&quot;&gt; Install related set &lt;/a&gt;
    &lt;/body&gt;
&lt;/html&gt;

</pre>
</div>
</div>
<h2 id="old-version-windows">Web install experience on previous versions of Windows 10</h2>
On versions prior to the Fall Creators Update, App Installer cannot directly install the app from the web. On these versions, App Installer can only install app packages that are locally available.
So, App Installer will download the package and require the user to double click the downloaded package to install.
<h2>Microsoft SmartScreen integration</h2>
Microsoft SmartScreen has always been part of the installation process for installing apps via App Installer. SmartScreen ensures users are safeguarded from the malcontent that can make its way on to their devices. With the latest update to App Installer, SmartScreen is a AI powered module that will intelligently detect unsafe apps and warn the users accordingly.

<a href="http://blogs.msdn.microsoft.com/appinstaller/2017/09/27/automated-app-updates-with-appinstaller-file/">Click here </a>to learn more about installing a related set or learn how to auto-update your apps that are distributed using App Installer.

We hope that these new additions will give you more options to share and distribute UWP apps with your users. We are very interested in hearing your feedback. Please post your comments and questions below.

Thanks!
Chaitanya Donthini, Program Manager – Windows Developer Platform]]></content:encoded>
    </item>
    <item>
      <title>Using Windows Device Portal to debug streaming install</title>
      <link>https://docs.microsoft.com/archive/blogs/appinstaller/using-windows-device-portal-to-debug-streaming-install</link>
      <pubDate>Wed, 09 Aug 2017 10:42:09 GMT</pubDate>
      <dc:creator><![CDATA[Andy.Lx]]></dc:creator>
      <guid
        isPermaLink="false">http://blogs.msdn.microsoft.com/appinstaller/?p=1495</guid>
      <description><![CDATA[With the Fall Creators Update, you can now debug streaming install of UWP apps through the...]]></description>
      <content:encoded><![CDATA[<img width="800" height="418" class="alignnone size-full wp-image-1665" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/2017-08-14_DebugStreamingInstallWDP_TW.png" />

With the Fall Creators Update, you can now debug streaming install of UWP apps through the Windows Device Portal (WDP) and Xbox Device Portal (XDP). To find out more about WDP, you can read the blog post <a href="https://blogs.msdn.microsoft.com/appinstaller/2016/12/17/test-universal-windows-platform-apps-using-windows-device-portal/">here</a>, and to find out more about UWP streaming install, you can read the blog series <a href="https://blogs.msdn.microsoft.com/appinstaller/2017/03/15/uwp-streaming-app-installation/">here</a>.

Previously in the Creators Update, to debug your stream-able app, you would have to package your app and sideload it or implement the streaming debugging APIs (described in the streaming blog series) either in your own app or use the sample debugging app. The debugging APIs are necessary because in a loose file registered app, by default, all of the files are already present (there is nothing to streaming install), thus we need the APIs to simulate streaming install (environments where only certain content groups are present).

To make it easier to debug streaming install, we’ve added a new tool to WDP and XDP that provides you with a convenient interface for the debugging APIs. With the new tool, you will be able to simulate streaming install for your stream-able apps on your remote devices and make sure it behaves correctly to deliver a great streaming experience for your users.
<h2>Registering Your Stream-able App</h2>
Let’s see how the tool works in action. To debug a stream-able app, first you have to loose file register the app to the device. As an example, we’ll use the same streaming install demo app used in the streaming install blog series that you can find <a href="https://github.com/AppInstaller/StreamingInstallDemoApp">here</a>. Once you have the app, go to the Apps Manager tool in the WDP or the My Games and Apps tool in the XDP. You can loose file register the app by choosing either register from network share or deploy loose app files. (You can find out more about loose file registering from network shares from the blog post <a href="http://blogs.msdn.microsoft.com/appinstaller/2017/08/09/installing-from-network-shares-and-installing-related-sets-using-windows-device-portal/">here</a>.)

<img width="549" height="213" class="wp-image-1557 alignleft" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/WDP-Streaming-1.png" /> <img width="562" height="462" class="alignnone wp-image-1566" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/WDP-Streaming-2.png" />

Once the app has been deployed to the device, you can go to the “Streaming Install Debugger” workspace on the WDP or add the UWP Streaming Install Debugger to your workspace on the XDP.
<h2>Overview of the Streaming Install Debugger</h2>
Upon navigating to the tool, you should see it automatically select the stream-able app you just deployed. By default, it will select the latest loose file registered stream-able app automatically. If you don’t see your app selected, simply choose it from the first dropdown list. (If you don’t see the app listed, try the “Refresh” button and make sure your loose file folder contains an AppxContentGroupMap.xml.) You can also launch the app on the device from the tool by pressing the “Start” button.

<img width="1192" height="634" class="alignnone wp-image-1575" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/WDP-Streaming-3.png" />

The tool will list all of the content groups for your app in the order that they’re defined in the AppxContentGroupMap.xml (the default order that they will be downloaded in). The only content group that is not listed is the Required content group (so only the automatic content groups are listed). This is because the required content group cannot be manipulated with the debugging APIs in any way, since it is the group that is required for the app to be launchable.
<h2>Changing States of Content Groups</h2>
In the third column, you will see the states of the content groups. By default for loose file registered stream-able apps, content groups are all marked as Staged, meaning the files in all of the content groups are available to be accessed by the app. You can change the states of any of the content groups by just selecting another state in the Current State dropdown list. You don’t need to confirm your change, changes are applied immediately upon selection. If you changed the state, while the demo app is open on the device (at the “Start Your Adventure!” page), you should see your change immediately reflected. So for example, if we change Level2 to “Not Staged”, then in the app we should immediately see the Level 2 view button grayed out along with an incomplete progress bar below it.
<h2><img width="981" height="176" class="alignnone wp-image-1585 size-full" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/WDP-Streaming-4-e1502234632511.png" /> <img width="427" height="268" class="alignnone wp-image-1595 " alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/WDP-Streaming-5-e1502234694134.png" /></h2>
<h2>Simulating Staging for Content Groups</h2>
The fourth column, “Staging Percentage” is for simulating the staging progress of a content group. The sliders here will only be usable if that content group’s state is “Staging”. So for example, if we change “Level2” to “Staging” and then drag the slider to 0, we should see no change in the app (since this is the same visually as “Not Staged”). But if we then start dragging the slider to the right, stopping at 25, then the progress bar of Level 2 should fill up to 25% or ¼ of the way. If we drag the slider all the way to 100, then the View button becomes available again, and the progress bar disappears, since 100% staging is logically the same as the “Staged” state.
<h2><img width="970" height="179" class="alignnone wp-image-1596 " alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/WDP-Streaming-6-e1502236938990.png" /></h2>
<img width="453" height="296" class="alignnone wp-image-1605" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/WDP-Streaming-7.png" />
<h2>Sorting and Filtering Content Groups</h2>
As you are manipulating the content group states, you may also find it useful to only focus on certain content groups. You can sort content groups by order #, content group name (alphabetically), or current state (alphabetically). You can also filter content groups by typing in the text box below the “Start” button. You can filter by current state or content group name, and you can change this by using the dropdown to the left of the text box. So if we’re only interested in the Level # content groups, we select to filter by content group name and type “Level” in the text box.

<img width="986" height="204" class="alignnone size-full wp-image-1615" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/WDP-Streaming-8.png" />
<h2>Enabling and Using the Multi-Select Functionality</h2>
Lastly, you can also enable multi-select for the tool by pressing the button to the right of the filter text box. Turning on multi-select, you should see an additional column added to the beginning of the table with check boxes, along with another set of state controls next to the multi-select button. With multi-select on, you can manipulate all of the selected content groups’ states at once. So for example, if we want to set all content groups as “Not Staged” to simulate the moment right when the app becomes launchable, we can select all content groups by clicking on the topmost checkbox, then selecting “Not Staged” in the new set of state controls next to the multi-select button. We should see this change immediately in the app also.

<img width="962" height="340" class="alignnone wp-image-1625" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/WDP-Streaming-9.png" /> <img width="839" height="288" class="alignnone wp-image-1626" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/WDP-Streaming-10.png" />

So with the new streaming install debugger in WDP and XDP, you’ll be able to simulate different streaming install scenarios for your app deployed on a remote device and make sure it behaves correctly in the different scenarios to perfect your streaming install experience for your users.

&nbsp;

Questions?  Ask in the comments section below.

Andy Liu, Program Manager, Windows Developer Platform]]></content:encoded>
    </item>
    <item>
      <title>Installing from network shares and installing related sets using Windows Device Portal</title>
      <link>https://docs.microsoft.com/archive/blogs/appinstaller/installing-from-network-shares-and-installing-related-sets-using-windows-device-portal</link>
      <pubDate>Wed, 09 Aug 2017 10:40:25 GMT</pubDate>
      <dc:creator><![CDATA[Andy.Lx]]></dc:creator>
      <guid
        isPermaLink="false">http://blogs.msdn.microsoft.com/appinstaller/?p=1635</guid>
      <description><![CDATA[Windows Device Portal (WDP) is available on all Windows 10 devices and makes it a great tool for...]]></description>
      <content:encoded><![CDATA[<span>Windows Device Portal (WDP) is available on all Windows 10 devices and makes it a great tool for developers to use to perform their testing and validation. It caters to all audiences of the developer community with its browser UX and REST endpoints. For more information regarding WDP, its features and other benefits, we have a blog post </span><a href="https://blogs.msdn.microsoft.com/appinstaller/2016/12/17/test-universal-windows-platform-apps-using-windows-device-portal/">here</a><span>. </span>

<img width="800" height="418" class="alignnone size-full wp-image-1655" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/2017-08-11_WindowsDevicePortal_FB.jpg" />

&nbsp;
<h1><span>New in the Fall Creators Update</span></h1>
<span>In this update, we are adding support to </span>
<ul>
 	<li><span> </span><span>Register loose file apps from network shares</span></li>
 	<li><span> </span><span>Install related sets</span></li>
</ul>
<h2>Register Loose File Apps from Network Shares</h2>
Loose file network registration allows you to quickly iterate your apps as you no longer need to package and install the app on the target device each time a file is modified. Loose file network registration is also much quicker and doesn’t take up disk space on the target device. For more information regarding this deployment method, it is discussed in greater detail <a href="https://blogs.msdn.microsoft.com/appinstaller/2016/11/04/rapid-app-development-using-register-layout-from-network-share-new-in-build-14965/">here</a>.

Loose file network registration is an existing feature that was previously available via WinAppDeployCmd and Visual Studio. With the Fall Creators Update, we are bringing the support for network registration to device portal.

Here is how to register a loose file package from a network location –
<ol>
 	<li><em> </em><a href="https://docs.microsoft.com/en-us/windows/uwp/get-started/enable-your-device-for-development#activate-developer-mode-sideload-apps-and-access-other-developer-features">Enable WDP</a> on the target device
<img width="533" height="722" class="alignnone wp-image-1526" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/WDP-Install-4.png" /></li>
 	<li>From a web browser on your PC, go to <a href="https://localhost:50443">https://localhost:50443</a>
<ul>
 	<li>The browser will display the following message: "There’s a problem with this website’s security certificate". This happens because the certificate which is issued to the Device Portal is a test certificate. You can ignore this certificate error and proceed.</li>
</ul>
</li>
 	<li>In the Apps manager tab, click “Add” and select “Register a network share location”<img width="748" height="296" class="alignnone wp-image-1505" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/WDP-Install-1.png" /></li>
 	<li>In the text box, specify the path to the AppxManifest.xml file that is located in the root of your app package folder on a network share like so – <img width="747" height="380" class="alignnone wp-image-1515" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/WDP-Install-2.png" /></li>
 	<li>Now, if the target device isn’t aware of this network share, WDP will prompt the you for your credentials – <img width="746" height="274" class="alignnone wp-image-1516" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/WDP-Install-3.png" /></li>
 	<li>After successfully providing the credentials, the loose file app will be registered for use. You can either launch the app by finding it in the drop down menu or remove if you no longer need the app.</li>
</ol>
If the registered app is a stream-able app, you can use the streaming install debugger plugin to simulate streaming install on your remote devices. For detailed information regarding this new plugin, click <a href="http://blogs.msdn.microsoft.com/appinstaller/2017/08/09/using-windows-device-portal-to-debug-streaming-install/">here</a>.
<h2><span>Install Related Sets</span></h2>
An optional package is a portion of your app that you split out to be separately monetized or optionally downloaded. A related set is a set of the main package and optional packages that should be updated together to guarantee that they work with each other (strict versioning). To learn more about optional packages and related sets, please refer to this <a href="https://blogs.msdn.microsoft.com/appinstaller/2017/04/05/uwpoptionalpackages/">blog post</a> to learn more.<em> </em>

With the WDP update, you now have the ability to easily install and update related sets on your devices.

Here is how you can install related sets –<em> </em>
<ol>
 	<li>Follow steps 1 and 2 from the section above to enable device portal</li>
 	<li>In the Apps manager tab, click “Add” and select “Install packaged application”
<img width="728" height="386" class="alignnone wp-image-1535" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/WDP-Install-5.png" /></li>
 	<li>On PC where the package is available, drag and drop or browse to select the main app package and certificate(.cer) if required. Click the check box to also install optional packages. Click next to specify optional packages.
<ul>
 	<li><span>If framework packages are required for the installation of the related set, enable the check box to specify framework packages.</span></li>
</ul>
<img width="734" height="471" class="alignnone wp-image-1545" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/WDP-Install-6.png" /></li>
 	<li>Again, drag and drop or select the optional packages that you would like to install along with the main app package and click next to start the installation.<img width="712" height="380" class="alignnone wp-image-1555" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/08/WDP-Install-7.png" /></li>
 	<li>After successful installation, the installed app will be listed in the drop down menu. Select the desired app and click Start to launch or Remove to uninstall.
<ul>
 	<li>In case of failure, you will be prompted with an actionable error message detailing the reason.</li>
</ul>
</li>
</ol>
&nbsp;

If you have any questions and feedback regarding device portal and its deployment features, please post your comments below.

&nbsp;

Thanks,

Chaitanya

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>App remediation in Windows 10</title>
      <link>https://docs.microsoft.com/archive/blogs/appinstaller/app-remediation-in-windows-10</link>
      <pubDate>Wed, 12 Jul 2017 11:39:05 GMT</pubDate>
      <dc:creator><![CDATA[Jason Salameh MSFT]]></dc:creator>
      <guid
        isPermaLink="false">http://blogs.msdn.microsoft.com/appinstaller/?p=366</guid>
      <description><![CDATA[When building the Universal Windows Platform, one of the core tenets we had was ensuring app...]]></description>
      <content:encoded><![CDATA[When building the Universal Windows Platform, one of the core tenets we had was ensuring app behavior was predicable, successful and reliable. While we were able to make very strong guarantees, unfortunately sometimes things still go awry - but don't worry, we planned for that too! In the rare occurrence that a UWP app has hit an error, the platform is able to detect this and provide a neat way to fix the problem with the help of the Store - we call this app remediation.

Here's what it looks like when an app is in some error state and launch is attempted.

<img width="1024" height="576" class="size-large wp-image-375 aligncenter" alt="remediation" src="https://msdnshared.blob.core.windows.net/media/2016/11/remediation-1024x576.png" />

For the most part, these errors are transient and require some basic user action (e.g. an app's trial expired, it must be purchased or removed) and in other cases they require a bit more help from the Store (e.g. the app's files are corrupted, it must be re-downloaded). In all cases, when an app requires remediation, the action can be quickly completed without loosing any of the app's local data!! (e.g. game save or configuration)

While we generally don't like that there are speed bumps between our users and apps, we believe the Universal Windows Platform provides an easy way to get apps functional again without sacrificing on any of our core tenets.

&nbsp;

&lt;geek&gt;

For those who want to understand the nitty gritty of how app remediation works, it operates by leveraging the <a href="https://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.packagestatus.aspx">PackageStatus class</a> to indicate to the system that the app is in some non-ok state. Different components in the system are responsible for setting different PackageStatus values for their own unique circumstances.

For example, as part of activating an app, the system will check the state of the license of the app and may set the PackageStatus to <a href="https://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.packagestatus.licenseissue.aspx">LicenseIssue</a> if the app's trial has expired. Another scenario could be anti-virus software setting the PackageStatus to <a href="https://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.packagestatus.tampered.aspx">Tampered</a> if some files in the app have been altered in any way (based on the appxblockmap.xml). Yet another expected scenario could be PackageStatus getting set to <a href="https://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.packagestatus.packageoffline.aspx">PackageOffline</a> or <a href="https://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.packagestatus.dataoffline.aspx">DataOffline</a> if the package or the user's data (respectively) is on an ejected drive.

You might ask - what about groups of packages that have a dependency on one another? We simply take the union of all PackageStatus values and use it as the global PackageStatus for that package / user.

For those of you who have used App Extensions, PackageStatus can be used as a way to check the status of an App Extension. A typical scenario would be PackageStatus set to <a href="https://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.packagestatus.servicing.aspx">Servicing</a> if the App Extension is being currently updated.

&lt;/geek&gt;

&nbsp;

Any questions? leave them in the comments!

&nbsp;

Thanks!

<span>Jason Salameh, Senior Program Manager – Windows Developer Platform</span>]]></content:encoded>
    </item>
    <item>
      <title>UWP Apps with Network Share Access</title>
      <link>https://docs.microsoft.com/archive/blogs/appinstaller/uwp-apps-with-network-share-access</link>
      <pubDate>Fri, 09 Jun 2017 09:01:38 GMT</pubDate>
      <dc:creator><![CDATA[c.donthini]]></dc:creator>
      <guid
        isPermaLink="false">http://blogs.msdn.microsoft.com/appinstaller/?p=1475</guid>
      <description><![CDATA[Hi Developers,

If you recall, Windows 10 Creators Update introduced support for registering loose...]]></description>
      <content:encoded><![CDATA[Hi Developers,

If you recall, Windows 10 Creators Update introduced support for <a href="https://blogs.msdn.microsoft.com/appinstaller/2016/11/04/rapid-app-development-using-register-layout-from-network-share-new-in-build-14965/">registering loose file packages from a network share</a> 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!

<strong>What does this mean?</strong>

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.

<strong>Note</strong>: It’s important to remember that this feature <em>should only be used for pre-release </em>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.

<strong>How does it work?</strong>

To get started, there are two things you’ll need to do:
<ol>
<ol>
 	<li>Enable network share access via the <a href="https://docs.microsoft.com/en-us/windows/uwp/packaging/app-capability-declarations">app capability declaration</a> in the manifest, specifically "developerModeNetwork"</li>
</ol>
</ol>
<p style="padding-left: 90px"><code> &lt;Capabilities&gt;
&lt;rescap:Capability Name="developmentModeNetwork" /&gt;
&lt;/Capabilities&gt;</code></p>
<p style="padding-left: 60px">2. The target device where the app will be installed, needs to be in <a href="https://blogs.msdn.microsoft.com/appinstaller/2017/03/10/developer-mode-on-windows-desktop/">developer mode</a></p>
Now you’re ready to access files on a network share! Here’s how that is done.

<strong>File access:</strong>

To access the files on the network share from your UWP app, you will need to use the <a href="https://msdn.microsoft.com/en-us/library/windows/apps/mt644399.aspx#_api-ms-win-core-file-l1-2-1.dll">Win32 file access APIs</a>.

<strong>Network credentials:</strong>

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 (<a href="https://blogs.windows.com/buildingapps/2015/07/09/just-released-windows-10-application-deployment-tool/#x0dK13u7QP0ItvOr.97">WinAppDeployCmd</a>).

<strong>Demo:</strong>

<a href="https://github.com/AppInstaller/Windows-appsample-marble-maze">Here</a> is a simple UWP game that uses Win32 APIs to load assets from the app package. The <a href="https://github.com/AppInstaller/Windows-appsample-marble-maze/blob/master/readme.md">readme </a>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 <a href="https://github.com/AppInstaller/Windows-appsample-marble-maze">GitHub sample</a>, please post them in the comments section below.

Thanks,

Chaitanya Donthini – Program Manager, Windows Developer Platform]]></content:encoded>
    </item>
    <item>
      <title>Using Custom Properties for AppExtensions</title>
      <link>https://docs.microsoft.com/archive/blogs/appinstaller/using-custom-properties-for-appextensions</link>
      <pubDate>Thu, 25 May 2017 11:32:47 GMT</pubDate>
      <dc:creator><![CDATA[David Bennett (MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">http://blogs.msdn.microsoft.com/appinstaller/?p=1405</guid>
      <description><![CDATA[Properties are an optional but very useful feature of AppExtensions. There a wide range of possible...]]></description>
      <content:encoded><![CDATA[Properties are an optional but very useful feature of AppExtensions. There a wide range of possible metadata that you may require when creating an AppExtension Host platform, such as version, capabilities, lists of supported filetypes or other data that is helpful to know prior to loading an AppExtension and also highly specific to your app. Such information may even determine <em>how</em> you load an AppExtenion. Rather than trying to predict all of the fields you might need, we gave you an open canvas to define exactly what you need in however manner best suited for your app. AppExtension properties are a custom metadata field provided by the AppExtension developer in their AppxManifest. AppExtension Hosts can read this metadata when examining AppExtensions without having to load any content from the AppExtension.

There two important reasons why you should take advantage of AppExtension properties:
<ol>
 	<li>It's an easy way and safe way to store basic or important metadata about your app extension platform without having to put that information into files. You can use it for important concepts like versioning, permissions, and as enforcement. For example, your app could insist that a "version" field is defined and present in the properties, and have different loading behavior based on that value.</li>
 	<li>The information is stored in the app manifest. This means that it is something that can be indexed and made available via a Store Services API in the future. That means you can bubble it up for display to the user, or have more refined app extension searches for specific properties without having to deploy and load the extension first.</li>
</ol>
<strong>How to declare Properties</strong>

Properties are declared in the Package.appxmanifest file in your UWP package. They can be read at runtime by the Extension Host as a PropertySet. Since the host defines the platform, it is up to the host to communicate to the extension developers about which properties, if any are available and should be put into the AppExtension declaration.  <strong>In order to define Properties, you must edit the Package.appxmanifest directly.</strong> The ability to specify Properties is not in the Manifest Designer.

&nbsp;

To declare properties, put them in the &lt;uap3:Properties/&gt; element under AppExtension declaration. Here is a sample Microsoft Edge AppExtension declaration that uses properties supported by Edge.
<pre>          &lt;uap3:AppExtension Name="com.microsoft.edge.extension" Id="FirstExtension" PublicFolder="Extension" DisplayName="MyExtension"&gt;
            &lt;uap3:Properties&gt;
              &lt;Capabilities&gt;
                &lt;Capability Name="websiteContent" /&gt;
                &lt;Capability Name="websiteInfo" /&gt;
                &lt;Capability Name="browserWebRequest" /&gt;
                &lt;Capability Name="browserStorage" /&gt;
              &lt;/Capabilities&gt;
            &lt;/uap3:Properties&gt;
          &lt;/uap3:AppExtension&gt;
        &lt;/uap3:Extension&gt;</pre>
&nbsp;

Edge has defined a known property value of Capabilities with a list of extension capabilities declared. As a host, you can support whatever properties you want in your AppExtensions. Since these are a PropertySet, you can also have nested properties. Its a good idea to have a root version property that you can use in case you change formats of your extensions in the future. We intentionally did not put "version" as an attribute of AppExtensions so you would not be artificially confined to using our versioning semantics. Instead, we created properties where version could be one of many custom-defined attributes, in whatever way and format you want, and processed however you want.

<strong>How to use Properties</strong>

Suppose you have a simple property in an AppExtension that describes a version, such as the following:
<pre>            &lt;uap3:Properties&gt;
              &lt;Version&gt;1.0.0.0&lt;/Version&gt;
            &lt;/uap3:Properties&gt;</pre>
&nbsp;

To get this data at runtime, just call GetExtensionPropertiesAsync() on the AppExtension.
<pre>        string extensionVersion = "Unknown";
        var properties = await ext.GetExtensionPropertiesAsync() as PropertySet;
        if (properties != null)
        {
            if (properties.ContainsKey("Version"))
            {
                PropertySet versionProperty = properties["Version"] as PropertySet;
                extensionVersion = versionProperty["#text"].ToString();
            }
        }</pre>
&nbsp;
<p style="padding-left: 60px"><em>Note: In the Windows 10 Anniversary Update, there is an issue where GetExtensionPropertiesAsync() can return null instead of an empty PropertySet if there are no Properties element defined in the extension's app manifest. This will throw an exception in the above example.  If you are using an extension platform that is intended to target the Windows 10 Anniversary Update, be sure to check for this and treat the exception as an empty PropertySet. This issue is corrected in the Windows 10 Creators Update.</em></p>
&nbsp;

Properties can be a very useful way to manage the metadata in your app. As always we value your feedback; let us know if you have questions or problems!

&nbsp;

- David Bennett, Program Manager, Windows Developer Platform]]></content:encoded>
    </item>
    <item>
      <title>Walkthrough: Using App Extensions in Visual Studio</title>
      <link>https://docs.microsoft.com/archive/blogs/appinstaller/walkthrough-using-app-extensions-in-visual-studio</link>
      <pubDate>Tue, 16 May 2017 14:24:49 GMT</pubDate>
      <dc:creator><![CDATA[David Bennett (MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">http://blogs.msdn.microsoft.com/appinstaller/?p=1115</guid>
      <description><![CDATA[Interested in using extensions and don't quite know how to get started? Here's a walk-through of the...]]></description>
      <content:encoded><![CDATA[Interested in using extensions and don't quite know how to get started? Here's a walk-through of the basics for getting an app extension platform added to your app and testing it. Be sure to check out the introduction to App Extensions for a more high level overview.
<h2>How App Extensions Work</h2>
To set up App Extensions, you first have an App Extension Host app declare it is a host and specify it's namespace. Then in other apps providing extensions you create a similar App Extension declaration and specify the same namespace. At runtime the Host app can use the App Extension API to discover and access any installed the extensions which match one of the namespaces they have declared.

So to set up the App Extension relationship, we need to do the following:
<ol>
 	<li>Set up the App Extension Host declaration in the host app</li>
 	<li>Set up the App Extension declaration in the extending app(s)</li>
 	<li>Use the API in the host app to access the extensions</li>
</ol>
We'll start by going through each of those and then end with testing guidance.

&nbsp;
<h3>Create App Extension Host Declaration</h3>
<p style="padding-left: 30px"><strong>1) In your Universal App Project, right-click the "Package.appxmanifest" file and select "view code"</strong></p>
<p style="padding-left: 60px">This will bring up the XML view of the appxmanifest.</p>
<p style="padding-left: 30px"><strong>2) Add the uap3 schema reference attribute if it does not already exist to the &lt;Package&gt; element after the uap reference</strong></p>
<p style="padding-left: 60px"><code>xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3"</code></p>
<p style="padding-left: 30px"><strong>3) Add "uap3" to the IgnorableNamespaces attribute in the Package Element</strong></p>
<p style="padding-left: 60px"><code>IgnorableNamespaces="uap uap3 mp"</code></p>
<p style="padding-left: 60px">The above two steps should result in a package element that looks like this:</p>
<p style="padding-left: 60px"><img width="603" height="165" class="alignnone wp-image-1125" alt="appext1" src="https://msdnshared.blob.core.windows.net/media/2017/02/appext1-1024x280.png" /></p>
&nbsp;
<p style="padding-left: 30px"><strong>4) Add the App Extension Host declaration to the app </strong></p>
<p style="padding-left: 60px">This appears under the Application\Extensions elements:</p>
<p style="padding-left: 90px"><code>&lt;uap3:Extension Category="windows.appExtensionHost"&gt;</code></p>
<p style="padding-left: 105px"><code>&lt;uap3:AppExtensionHost&gt;</code></p>
<p style="padding-left: 120px"><code>&lt;uap3:Name&gt;build2016.appextensibility.demo&lt;/uap3:Name&gt;</code></p>
<p style="padding-left: 105px"><code>&lt;/uap3:AppExtensionHost&gt;</code></p>
<p style="padding-left: 90px"><code>&lt;/uap3:Extension&gt;</code></p>
<p style="padding-left: 60px">There is only one element to define here, which is the <strong>Name</strong>. This what we call the contract name; it is how we bind app extensions with hosts. Only extensions matching the name provided will be visible and actionable to an App Extension Host. By convention we recommend using a Name that incorporates your app or publisher name to avoid potential collisions with other apps using extensions.</p>
<p style="padding-left: 60px">There is no exclusivity rules for extension declarations; you can have multiple hosts and multiple extensions, and both together in the same app.</p>
<p style="padding-left: 60px">Once completed, your application node will look something like this:</p>
<p style="padding-left: 60px"><img width="603" height="404" class="alignnone wp-image-1135" alt="appext2" src="https://msdnshared.blob.core.windows.net/media/2017/02/appext2-1024x686.png" /></p>
&nbsp;
<h2>Create App Extension Declaration</h2>
The App Extension declaration is very similar. In the app you want to have provide an extension, do the following:

&nbsp;
<p style="padding-left: 30px"><strong>1) Repeat steps 1-3 in the previous section.</strong></p>
<p style="padding-left: 60px">Extensions and Extension Hosts both require the same uwp3 namespace.</p>
<p style="padding-left: 30px"><strong>2) Add the App Extension declaration to the app manifest, under the Application\Extensions element:</strong></p>
<p style="padding-left: 90px"><code>&lt;uap3:Extension Category="windows.appExtension"&gt;</code></p>
<p style="padding-left: 105px"><code>&lt;uap3:AppExtension Name="build2016.appextensibility.demo" Id="base" PublicFolder="Public" DisplayName="Grayscale" Description="Grayscale Image"&gt;</code></p>
<p style="padding-left: 120px"><code>&lt;uap3:Properties&gt;</code></p>
<p style="padding-left: 135px"><code>&lt;Service&gt;com.microsoft.grayscaleservice&lt;/Service&gt;</code></p>
<p style="padding-left: 120px"><code>&lt;/uap3:Properties&gt;</code></p>
<p style="padding-left: 105px"><code>&lt;/uap3:AppExtension&gt;</code></p>
<p style="padding-left: 90px"><code>&lt;/uap3:Extension&gt;</code></p>
<p style="padding-left: 60px">For this declaration you must have the <strong>Name</strong> attribute value exactly match the Name attribute value of the host declaration. This is a required attribute.</p>
<p style="padding-left: 60px">The <strong>PublicFolder</strong> attribute is the name of the folder relative to the package root that you want to share with the host app. By convention we typically use "Public" but you can use whatever name you want so long as it matches a valid folder in your app. This is a required attribute.</p>
<p style="padding-left: 60px"><strong>DisplayName</strong> and <strong>Description</strong> are queryable from and can use MRT references, which we recommend for localization support. The MRT references are loaded from the app extension package, not the host app.</p>
<p style="padding-left: 60px">The<strong> Id</strong> attribute is used to uniquely identify this particular extension. This is because you can have multiple App Extension declarations, even for the same host. If you want to have two extensions for a particular host name, then you can do so if you ensure that the Id values are different. App Extension hosts may use the Id value as a clue about what type of extension. For example, you could have one Extension designed for desktop and one for mobile, with the Id being the differentiator. You can also use Properties for that. Id is a required attribute.</p>
<p style="padding-left: 60px">The <strong>Properties</strong> element is filled with custom-defined metadata that is readable by the Host apps at runtime. In this example, I added a property that told the Host app the name of the service that the extension uses. You can also use properties as clues about the usage of the extension, what sort of features or capabilities the extension uses from the Host app, versioning, or many other uses. They are deliberately open-ended so Extension Host apps can specify the type of properties they look for or expect to be present for their extensions. Properties are optional and do not need to be specified.</p>
<p style="padding-left: 60px">When you are finished, your Application node should look something like this:</p>
<p style="padding-left: 60px"><img width="604" height="404" class="alignnone wp-image-1145" alt="appext3" src="https://msdnshared.blob.core.windows.net/media/2017/02/appext3-1024x685.png" /></p>
&nbsp;
<h2>Using the App Extension API in the Host App</h2>
Here's a brief overview of the API for App Extensions. You can see a working example of an extension manager using this API from our Build 2016 sample:

<a href="https://github.com/Microsoft/Build2016-B808-AppExtensibilitySample/blob/master/ExtensibilitySample/ExtensionManager.cs">https://github.com/Microsoft/Build2016-B808-AppExtensibilitySample/blob/master/ExtensibilitySample/ExtensionManager.cs</a>

&nbsp;
<p style="padding-left: 30px"><strong>Using the API</strong></p>
<p style="padding-left: 60px"><code>using Windows.ApplicationModel.AppExtensions;</code></p>
<p style="padding-left: 30px"><strong>Creating a Catalog</strong></p>
<p style="padding-left: 60px">Extensions listed by creating a catalog for each extension name your host supports.</p>
<p style="padding-left: 90px"><code>private AppExtensionCatalog _catalog;
_catalog = AppExtensionCatalog.Open("build2016.appextensibility.demo");</code>

<p style="padding-left: 60px">The name you specify in Open() should match the name you specify in the host declaration. If you have multiple hosts you must create a separate catalog for each.</p>
<p style="padding-left: 30px"><strong>Finding Existing Extensions</strong></p>
<p style="padding-left: 60px">Once you have a catalog you can use it to discover any existing and current extensions on the system that use that host name.</p>
<p style="padding-left: 90px"><code>IReadOnlyList&lt;AppExtension&gt; extensions = await _catalog.FindAllAsync();</code></p>
<p style="padding-left: 60px">This list is a snapshot at the time you call it. Extensions can be added or removed after this call, which is why you need Deployment events to avoid polling them.</p>
<p style="padding-left: 30px"><strong>Getting Extension Deployment Events</strong></p>
<p style="padding-left: 60px">To stay on top of changes to the set of extensions, you should subscribe to all of the extension deployment events:<code>
</code>

<p style="padding-left: 90px"><code> _catalog.PackageInstalled += Catalog_PackageInstalled;
_catalog.PackageUpdated += Catalog_PackageUpdated;
_catalog.PackageUninstalling += Catalog_PackageUninstalling;
_catalog.PackageUpdating += Catalog_PackageUpdating;
_catalog.PackageStatusChanged += Catalog_PackageStatusChanged;
</code>

<p style="padding-left: 30px"><strong>Getting Extension Properties</strong></p>
<p style="padding-left: 60px">If you have an extension named ext, then you can get any properties defined in the declaration of the extension:</p>
<p style="padding-left: 90px"><code>var properties = await ext.GetExtensionPropertiesAsync() as PropertySet;</code></p>
<p style="padding-left: 60px"><i>Important: In the Anniversary Edition, there is a bug where calling this on an extension that has no properties defined can return null instead of an empty PropertySet. This will throw an exception in the usage above. This is corrected in Insider builds to instead return an empty PropertySet. If targeting the Anniversary Edition as the minimum version you should either test for a null return or catch and handle the exception.</i></p>
<p style="padding-left: 30px"><strong>Reading the Public Folder</strong></p>
<p style="padding-left: 60px">You can read the contents of the PublicFolder specified by the app extension declaration using the catalog:</p>
<p style="padding-left: 90px"><code>extensionfile = await folder.GetFileAsync(fileName);</code></p>

<h2>Testing Extension Hosts and Extensions</h2>
If you are developing an app extension host and you want to test out extensions it can be a little tricky. An easy way to do it is to load up your test extension app in a separate instance of Visual Studio and run them side by side.

Then to test you can launch your host app and then in the extension app instance of VS, build &amp; deploy (Right-click the App in solution explorer, do Build and then do Deploy). You don't need to F5 the extension app, as extensions work as long as the app is deployed and do not require it to run. You can now independently deploy the extension app while debugging your host app.

Try different configurations where the host app comes along after the extension app, or try removing the extension app from Settings while the extension host is running.

A quick checklist of basic scenarios to test:
<ul>
 	<li>Run host and then deploy Extension app
<ul>
 	<li>Does the host pick up new extensions that come along while its running?</li>
</ul>
</li>
 	<li>Deploy Extension app and then deploy &amp; run host.
<ul>
 	<li>Does the host pick up previously-existing extensions?</li>
</ul>
</li>
 	<li>Run host and then remove extension app.
<ul>
 	<li>Does the host detect the remove correctly?</li>
</ul>
</li>
 	<li>Run host and then update the extension app to a newer version.
<ul>
 	<li>Does the host pick up the changes and unload the extension properly when you get update events?</li>
</ul>
</li>
</ul>
Some more advanced things to check are:
<ul>
 	<li>Run host, move extension app to removable media, remove that media
<ul>
 	<li>Does the host detect the change in package status and disable the extension?</li>
</ul>
</li>
 	<li>Run host, then corrupt the extension app (make it invalid, signed differently, etc.)
<ul>
 	<li>Does the host detect the tampered extension and handle it cleanly?</li>
</ul>
</li>
 	<li>Run host, deploy Extension app that has invalid content or properties
<ul>
 	<li>Does the host detect invalid content and handle it cleanly?</li>
</ul>
</li>
</ul>
If you have a good extension manager in your host then you should be able to gracefully handle all of those cases using the properties and events available in the API.

&nbsp;

There's much more to go over with App Extensions, but this is a good starting point. Are there any specific areas you would like to see more information on? Please leave your questions and feedback in the comments, thanks!

- David Bennett, Program Manager, Windows Developer Platform]]></content:encoded>
    </item>
  </channel>
</rss>