Skip to content

Instantly share code, notes, and snippets.

@Aszan
Last active April 22, 2016 20:38
Show Gist options
  • Save Aszan/19f064ada3fe357b6b50 to your computer and use it in GitHub Desktop.
Save Aszan/19f064ada3fe357b6b50 to your computer and use it in GitHub Desktop.
UWP issues

APPX4001: Build property AppxBundlePlatforms is not explicitly set and is calculated based on currently building architecture. Use 'Create App Package' wizard or edit project file to set it

=> Add AppxBundlePlatforms section to .csproj

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    ...
    <AppxBundlePlatforms>x86|x64|arm</AppxBundlePlatforms>
  </PropertyGroup>
<!-- Let’s open the file Default.rd.xml inside the project Properties folder: it contains the Runtime Directives for .NET Native -->
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
<Application>
<!--
An Assembly element with Name="*Application*" applies to all
assemblies in the application package. The asterisks are not
wildcards.
-->
<Assembly Name="*Application*" Dynamic="Required All" />
<!-- Add your application specific runtime directives here. -->
<Type Name="Windows.UI.Xaml.Controls.ItemClickEventArgs"
Dynamic="Required Public" />
</Application>
</Directives>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment