Hello. I have this error when i compile UWP.
Unity version: 2017.1.0b4
BuidType: D3D
Use Net Core
ScriptingBackand: IL2CPP
API LVL: .NET 2.0
Scripting Runtime version: 3.5
UnityException: Failed to run reference rewriter with command --target="Temp\StagingArea\Data\Managed\winrt.dll" --additionalreferences="Temp\StagingArea\Data\Managed" --platform="C:\Program Files (x86)\Windows Kits\10\UnionMetadata\Facade\Windows.winmd" --dbg=pdb --framework="Temp\StagingArea\Data\Managed" --alt=Microsoft.Win32.SafeHandles,mscorlib;System,mscorlib;System,System;System,System.Core;System.CodeDom.Compiler,System;System.Collections,mscorlib;System.Collections.Generic,mscorlib;System.Collections.Generic,System;System.Collections.Generic,System.Core;System.Collections.ObjectModel,mscorlib;System.Collections.ObjectModel,WindowsBase;System.Collections.Specialized,System;System.Collections.Specialized,WindowsBase;System.ComponentModel,System;System.ComponentModel.DataAnnotations,System.ComponentModel.DataAnnotations;System.Data,System.Data;System.Data.Common,System.Data;System.Diagnostics,mscorlib;System.Diagnostics,System;System.Diagnostics.CodeAnalysis,mscorlib;System.Globalization,mscorlib;System.IO,mscorlib;System.IO,System;System.IO,System.Core;System.IO.Compression,System;System.IO.IsolatedStorage,mscorlib;System.Linq,System.Core;System.Linq.Expressions,System.Core;System.Net,System;System.Net.NetworkInformation,System;System.Net.Security,System;System.Net.Sockets,System;System.Reflection,mscorlib;System.Reflection.Emit,mscorlib;System.Resources,mscorlib;System.Runtime,mscorlib;System.Runtime.CompilerServices,mscorlib;System.Runtime.CompilerServices,System.Core;System.Runtime.InteropServices,mscorlib;System.Runtime.InteropServices,System;System.Runtime.InteropServices.ComTypes,mscorlib;System.Runtime.InteropServices.ComTypes,System;System.Runtime.Serialization,mscorlib;System.Runtime.Serialization,System.Runtime.Serialization;System.Runtime.Serialization.Json,System.ServiceModel.Web;System.Security,mscorlib;System.Security.Authentication,System;System.Security.Principal,mscorlib;System.ServiceModel,System.ServiceModel;System.ServiceModel.Channels,System.ServiceModel;System.ServiceModel.Description,System.ServiceModel;System.ServiceModel.Dispatcher,System.ServiceModel;System.ServiceModel.Security,System.ServiceModel;System.ServiceModel.Security.Tokens,System.ServiceModel;System.Text,mscorlib;System.Text.RegularExpressions,System;System.Threading,mscorlib;System.Threading,System;System.Threading,System.Core;System.Xml,System.Runtime.Serialization;System.Xml,System.Xml;System.Xml.Linq,System.Xml.Linq;System.Xml.Schema,System.Xml;System.Xml.Serialization,System.Xml --ignore=System.IConvertible,mscorlib.
Error: type `Windows.ApplicationModel.Store.LicenseInformation` doesn't exist in target framework. It is referenced from winrt.dll at UnityEngine.Purchasing.Default.CurrentApp.
Error: type `Windows.ApplicationModel.Store.UnfulfilledConsumable` doesn't exist in target framework. It is referenced from winrt.dll at Windows.Foundation.IAsyncOperation`1<System.Collections.Generic.IReadOnlyList`1<Windows.ApplicationModel.Store.UnfulfilledConsumable>> UnityEngine.Purchasing.Default.CurrentApp::GetUnfulfilledConsumablesAsync().
Error: type `System.Collections.Generic.IReadOnlyList`1` doesn't exist in target framework. It is referenced from winrt.dll at Windows.Foundation.IAsyncOperation`1<System.Collections.Generic.IReadOnlyList`1<Windows.ApplicationModel.Store.UnfulfilledConsumable>> UnityEngine.Purchasing.Default.CurrentApp::GetUnfulfilledConsumablesAsync().
Error: type `Windows.Foundation.IAsyncOperation`1` doesn't exist in target framework. It is referenced from winrt.dll at Windows.Foundation.IAsyncOperation`1<System.Collections.Generic.IReadOnlyList`1<Windows.ApplicationModel.Store.UnfulfilledConsumable>> UnityEngine.Purchasing.Default.CurrentApp::GetUnfulfilledConsumablesAsync().
Error: type `Windows.ApplicationModel.Store.UnfulfilledConsumable` doesn't exist in target framework. It is referenced from winrt.dll at Windows.Foundation.IAsyncOperation`1<System.Collections.Generic.IReadOnlyList`1<Windows.ApplicationModel.Store.UnfulfilledConsumable>> UnityEngine.Purchasing.Default.CurrentApp::GetUnfulfilledConsumablesAsync().
Error: type `System.Collections.Generic.IReadOnlyList`1` doesn't exist in target framework. It is referenced from winrt.dll at Windows.Foundation.IAsyncOperation`1<System.Collections.Generic.IReadOnlyList`1<Windows.ApplicationModel.Store.UnfulfilledConsumable>> UnityEngine.Purchasing.Default.CurrentApp::GetUnfulfilledConsumablesAsync().
Error: type `Windows.Foundation.IAsyncOperation`1` doesn't exist in target framework. It is referenced from winrt.dll at Windows.Foundation.IAsyncOperation`1<System.Collections.Generic.IReadOnlyList`1<Windows.ApplicationModel.Store.UnfulfilledConsumable>> UnityEngine.Purchasing.Default.CurrentApp::GetUnfulfilledConsumablesAsync().
Error: type `Windows.ApplicationModel.Store.CurrentApp` doesn't exist in target framework. It is referenced from winrt.dll at Windows.Foundation.IAsyncOperation`1<System.Collections.Generic.IReadOnlyList`1<Windows.ApplicationModel.Store.UnfulfilledConsumable>> UnityEngine.Purchasing.Default.CurrentApp::GetUnfulfilledConsumablesAsync().
Error: type `Windows.ApplicationModel.Store.UnfulfilledConsumable` doesn't exist in target framework. It is referenced from winrt.dll at Windows.Foundation.IAsyncOperation`1<System.Collections.Generic.IReadOnlyList`1<Windows.ApplicationModel.Store.UnfulfilledConsumable>> UnityEngine.Purchasing.Default.CurrentApp::GetUnfulfilledConsumablesAsync().
Error: type `System.Collections.Generic.IReadOnlyList`1` doesn't exist in target framework. It is referenced from winrt.dll at Windows.Foundation.IAsyncOperation`1<System.Collections.Generic.IReadOnlyList`1<Windows.ApplicationModel.Store.UnfulfilledConsumable>> UnityEngine.Purchasing.Default.CurrentApp::GetUnfulfilledConsumablesAsync().
Error: type `Windows.Foundation.IAsyncOperation`1` doesn't exist in target framework. It is referenced from winrt.dll at Windows.Foundation.IAsyncOperation`1<System.Collections.Generic.IReadOnlyList`1<Windows.ApplicationModel.Store.UnfulfilledConsumable>> UnityEngine.Purchasing.Default.CurrentApp::GetUnfulfilledConsumablesAsync().
Catastrophic failure while running rrw: Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Windows.Foundation.UniversalApiContract, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
� Unity.SearchPathAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)
� Unity.SearchPathAssemblyResolver.Resolve(AssemblyNameReference name)
� Mono.Cecil.MetadataResolver.Resolve(TypeReference type) � C:\buildslave\cecil\build\Mono.Cecil\MetadataResolver.cs:��ப� 106
� Mono.Cecil.MetadataResolver.GetType(ModuleDefinition module, TypeReference reference) � C:\buildslave\cecil\build\Mono.Cecil\MetadataResolver.cs:��ப� 148
� Mono.Cecil.MetadataResolver.Resolve(MethodReference method) � C:\buildslave\cecil\build\Mono.Cecil\MetadataResolver.cs:��ப� 216
� Mono.Cecil.MethodReference.Resolve() � C:\buildslave\cecil\build\Mono.Cecil\MethodReference.cs:��ப� 170
� Unity.ReferenceRewriter.RewriteTypeReferences.Visit(MethodReference method, String referencingEntityName)
� Unity.ReferenceRewriter.ReferenceDispatcher.Visit(MethodReference method, String referencingEntityName)
� Unity.ReferenceRewriter.ReferenceDispatcher.DispatchMethodBody(MethodBody body)
� Unity.ReferenceRewriter.ReferenceDispatcher.DispatchMethod(MethodDefinition method)
� Unity.ReferenceRewriter.ReferenceDispatcher.DispatchMethods(TypeDefinition type)
� Unity.ReferenceRewriter.ReferenceDispatcher.Dispatch()
� Unity.ReferenceRewriter.RewriteTypeReferences.Run()
� Unity.ReferenceRewriter.RewriteOperation.Execute(RewriteContext context)
� Unity.ReferenceRewriter.Program.Main(String[] args)
PostProcessWinRT.RunReferenceRewriter () (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:615)
PostProcessWinRT.Process () (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:170)
UnityEditor.WSA.BuildPostprocessor.DoPostProcess (BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:155)
UnityEditor.WSA.BuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:162)
UnityEditor.HostView:OnGUI()