Windows.Foundation.IReferenceArray Not Found

I’m getting this error when creating an App Package in Visual Community.

Repo.

  1. Create test game in Unity 5.2.1p1 Universal 10

  2. Open Solution in Visual Studio Community 2015 with Visual Studio Tools for Universal Windows Apps 14.0.23121.00 D14OOB

  3. Create App Package.

1>C:\Program Files (x86)\MSBuild\Microsoft.NetNative\x64\ilc\IlcInternals.targets(791,7): error : MCG0018: MCG0018:TypeExpected Type ‘Windows.Foundation.IReferenceArray’ was not found. Check that your build system references Windows.winmd, references .NET for Windows Store Apps, and is configured to use .NET Native.
1>
1>C:\Program Files (x86)\MSBuild\Microsoft.NetNative\Microsoft.NetNative.targets(434,5): error MSB3073: The command "“C:\Program Files (x86)\MSBuild\Microsoft.NetNative\x64\ilc\ilc.exe” /in:“D:\New Unity Project\Build\New Unity Project\obj\x64\Master\ilc\in” /out:“D:\New Unity Project\Build\New Unity Project\bin\x64\Master\ilc” /intermediatespath:“D:\New Unity Project\Build\New Unity Project\obj\x64\Master\ilc\intermediate” /v:normal /keepintermediates:true /buildtype:ret /exename:“New Unity Project.exe” /makepripath:“C:\Program Files (x86)\Windows Kits\10\bin\x64\MakePri.exe” /appPriProjectRoot:“D:\New Unity Project\Build\New Unity Project” /rcpath:“C:\Program Files (x86)\Windows Kits\10\bin\x86\rc.exe” /targetplatformsdklibpath:“C:\Program Files (x86)\Windows Kits\10\lib\10.0.10240.0\um” /targetplatformsdkmetadatapath:“D:\New Unity Project\Build\New Unity Project\obj\x64\Master\ilc\in\WinMetadata” /targetframeworkpath:“C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319” /RdXmlPath:“C:\Program Files (x86)\MSBuild\Microsoft.NetNative\LibraryXML” /suppressPDBWarnings:true /AllowNoManagedCode /UseCustomFramework “/logger:CsvLogger;908;3528"” exited with code 1201.

I followed this workaround and the above error will appear.