Reference Rewriter found some errors

Hi,
i have a project that i should export for windows store but it gives me a very long error:

Reference Rewriter found some errors while running with command --target=“Temp\StagingArea\Assembly-CSharp.dll” --additionalreferences=“Temp\StagingArea”,“E:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.15063.0\Facade”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.ApplicationModel.Calls.CallsVoipContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.ApplicationModel.SocialInfo.SocialInfoContract\2.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Devices.DevicesLowLevelContract\3.0.0.0”,"E:\Program Files (x86)\Windows…

Unity 5.5.3, Scripting Backend .Net, Windows SDK 10.0.15063.0
I have deleted all the plugins but the error remains
I have exported an empty project and it works
→ i checkt the missing types (https://docs.unity3d.com/Manual/windowsstore-missingtypes.html) but cloundn’t find anything.

Has anybody an idea?
Best regards Nija

Can you post the full error?

Reference Rewriter found some errors while running with command --target=“Temp\StagingArea\Assembly-CSharp.dll” --additionalreferences=“Temp\StagingArea”,“E:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.15063.0\Facade”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.ApplicationModel.Calls.CallsVoipContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.ApplicationModel.SocialInfo.SocialInfoContract\2.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Devices.DevicesLowLevelContract\3.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Devices.Printers.PrintersContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Foundation.FoundationContract\3.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Foundation.UniversalApiContract\4.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Graphics.Printing3D.Printing3DContract\3.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Networking.Connectivity.WwanContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Services.Store.StoreContract\2.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Services.TargetedContent.TargetedContentContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.System.Profile.ProfileHardwareTokenContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.System.Profile.ProfileSharedModeContract\2.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.UI.ViewManagement.ViewManagementViewScalingContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.ApplicationModel.Activation.ActivatedEventsContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.ApplicationModel.Activation.ActivationCameraSettingsContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.ApplicationModel.Activation.ContactActivatedEventsContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.ApplicationModel.Activation.WebUISearchActivatedEventsContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.ApplicationModel.Background.BackgroundAlarmApplicationContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.ApplicationModel.Calls.Background.CallsBackgroundContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.ApplicationModel.Calls.LockScreenCallContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.ApplicationModel.FullTrustAppContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.ApplicationModel.Preview.InkWorkspace.PreviewInkWorkspaceContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.ApplicationModel.Preview.Notes.PreviewNotesContract\2.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.ApplicationModel.Resources.Management.ResourceIndexerContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.ApplicationModel.Search.Core.SearchCoreContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.ApplicationModel.Search.SearchContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.ApplicationModel.StartupTaskContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.ApplicationModel.Wallet.WalletContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Devices.Custom.CustomDeviceContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Devices.Portable.PortableDeviceContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Devices.Printers.Extensions.ExtensionsContract\2.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Devices.Scanners.ScannerDeviceContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Devices.Sms.LegacySmsApiContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Gaming.Input.GamingInputPreviewContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Gaming.Preview.GamesEnumerationContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Gaming.UI.GameChatOverlayContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Globalization.GlobalizationJapanesePhoneticAnalyzerContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Management.Deployment.Preview.DeploymentPreviewContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Management.Workplace.WorkplaceSettingsContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Media.Capture.AppBroadcastContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Media.Capture.AppCaptureContract\4.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Media.Capture.CameraCaptureUIContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Media.Capture.GameBarContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Media.Devices.CallControlContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Media.MediaControlContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Media.Playlists.PlaylistsContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Media.Protection.ProtectionRenewalContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Networking.NetworkOperators.LegacyNetworkOperatorsContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Networking.Sockets.ControlChannelTriggerContract\2.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Perception.Automation.Core.PerceptionAutomationCoreContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Security.EnterpriseData.EnterpriseDataContract\4.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Security.ExchangeActiveSyncProvisioning.EasContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Services.Maps.GuidanceContract\2.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Services.Maps.LocalSearchContract\3.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.System.Profile.SystemManufacturers.SystemManufacturersContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.System.Profile.ProfileRetailInfoContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.System.UserProfile.UserProfileContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.System.UserProfile.UserProfileLockScreenContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.UI.ApplicationSettings.ApplicationsSettingsContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.UI.Core.AnimationMetrics.AnimationMetricsContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.UI.Core.CoreWindowDialogsContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.UI.Xaml.Hosting.HostingContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Web.Http.Diagnostics.HttpDiagnosticsContract\2.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.System.SystemManagementContract\3.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.ApplicationModel.Calls.CallsPhoneContract\3.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.ApplicationModel.CommunicationBlocking.CommunicationBlockingContract\2.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Devices.SmartCards.SmartCardBackgroundTriggerContract\3.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Devices.SmartCards.SmartCardEmulatorContract\4.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Embedded.DeviceLockdown.DeviceLockdownContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Networking.NetworkOperators.NetworkOperatorsFdnContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Phone.PhoneContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.Phone.StartScreen.DualSimTileContract\1.0.0.0”,“E:\Program Files (x86)\Windows Kits\10\References\10.0.15063.0\Windows.UI.WebUI.Core.WebUICommandBarContract\1.0.0.0” --platform=“E:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.15063.0\Facade\Windows.winmd” --support=“Temp\StagingArea\WinRTLegacy.dll” --supportpartialns=Unity.Partial --system=System --dbg=pdb --lock=UWP\project.lock.json --alt=System.Xml.Serialization;System.Collections,System.Collections.NonGeneric;System.Reflection,System.Reflection.TypeExtensions;System.IO,System.IO.FileSystem;System.Net,System.Net.Primitives;System.Net.Sockets,System.Net.Primitives;System.Xml,System.Xml.XmlDocument;,Windows.winmd;,Windows.ApplicationModel.Calls.CallsVoipContract.winmd;,Windows.ApplicationModel.SocialInfo.SocialInfoContract.winmd;,Windows.Devices.DevicesLowLevelContract.winmd;,Windows.Devices.Printers.PrintersContract.winmd;,Windows.Foundation.FoundationContract.winmd;,Windows.Foundation.UniversalApiContract.winmd;,Windows.Graphics.Printing3D.Printing3DContract.winmd;,Windows.Networking.Connectivity.WwanContract.winmd;,Windows.Services.Store.StoreContract.winmd;,Windows.Services.TargetedContent.TargetedContentContract.winmd;,Windows.System.Profile.ProfileHardwareTokenContract.winmd;,Windows.System.Profile.ProfileSharedModeContract.winmd;,Windows.UI.ViewManagement.ViewManagementViewScalingContract.winmd;,Windows.ApplicationModel.Activation.ActivatedEventsContract.winmd;,Windows.ApplicationModel.Activation.ActivationCameraSettingsContract.winmd;,Windows.ApplicationModel.Activation.ContactActivatedEventsContract.winmd;,Windows.ApplicationModel.Activation.WebUISearchActivatedEventsContract.winmd;,Windows.ApplicationModel.Background.BackgroundAlarmApplicationContract.winmd;,Windows.ApplicationModel.Calls.Background.CallsBackgroundContract.winmd;,Windows.ApplicationModel.Calls.LockScreenCallContract.winmd;,Windows.ApplicationModel.FullTrustAppContract.winmd;,Windows.ApplicationModel.Preview.InkWorkspace.PreviewInkWorkspaceContract.winmd;,Windows.ApplicationModel.Preview.Notes.PreviewNotesContract.winmd;,Windows.ApplicationModel.Resources.Management.ResourceIndexerContract.winmd;,Windows.ApplicationModel.Search.Core.SearchCoreContract.winmd;,Windows.ApplicationModel.Search.SearchContract.winmd;,Windows.ApplicationModel.StartupTaskContract.winmd;,Windows.ApplicationModel.Wallet.WalletContract.winmd;,Windows.Devices.Custom.CustomDeviceContract.winmd;,Windows.Devices.Portable.PortableDeviceContract.winmd;,Windows.Devices.Printers.Extensions.ExtensionsContract.winmd;,Windows.Devices.Scanners.ScannerDeviceContract.winmd;,Windows.Devices.Sms.LegacySmsApiContract.winmd;,Windows.Gaming.Input.GamingInputPreviewContract.winmd;,Windows.Gaming.Preview.GamesEnumerationContract.winmd;,Windows.Gaming.UI.GameChatOverlayContract.winmd;,Windows.Globalization.GlobalizationJapanesePhoneticAnalyzerContract.winmd;,Windows.Management.Deployment.Preview.DeploymentPreviewContract.winmd;,Windows.Management.Workplace.WorkplaceSettingsContract.winmd;,Windows.Media.Capture.AppBroadcastContract.winmd;,Windows.Media.Capture.AppCaptureContract.winmd;,Windows.Media.Capture.CameraCaptureUIContract.winmd;,Windows.Media.Capture.GameBarContract.winmd;,Windows.Media.Devices.CallControlContract.winmd;,Windows.Media.MediaControlContract.winmd;,Windows.Media.Playlists.PlaylistsContract.winmd;,Windows.Media.Protection.ProtectionRenewalContract.winmd;,Windows.Networking.NetworkOperators.LegacyNetworkOperatorsContract.winmd;,Windows.Networking.Sockets.ControlChannelTriggerContract.winmd;,Windows.Perception.Automation.Core.PerceptionAutomationCoreContract.winmd;,Windows.Security.EnterpriseData.EnterpriseDataContract.winmd;,Windows.Security.ExchangeActiveSyncProvisioning.EasContract.winmd;,Windows.Services.Maps.GuidanceContract.winmd;,Windows.Services.Maps.LocalSearchContract.winmd;,Windows.System.Profile.SystemManufacturers.SystemManufacturersContract.winmd;,Windows.System.Profile.ProfileRetailInfoContract.winmd;,Windows.System.UserProfile.UserProfileContract.winmd;,Windows.System.UserProfile.UserProfileLockScreenContract.winmd;,Windows.UI.ApplicationSettings.ApplicationsSettingsContract.winmd;,Windows.UI.Core.AnimationMetrics.AnimationMetricsContract.winmd;,Windows.UI.Core.CoreWindowDialogsContract.winmd;,Windows.UI.Xaml.Hosting.HostingContract.winmd;,Windows.Web.Http.Diagnostics.HttpDiagnosticsContract.winmd;,Windows.System.SystemManagementContract.winmd;,Windows.ApplicationModel.Calls.CallsPhoneContract.winmd;,Windows.ApplicationModel.CommunicationBlocking.CommunicationBlockingContract.winmd;,Windows.Devices.SmartCards.SmartCardBackgroundTriggerContract.winmd;,Windows.Devices.SmartCards.SmartCardEmulatorContract.winmd;,Windows.Embedded.DeviceLockdown.DeviceLockdownContract.winmd;,Windows.Networking.NetworkOperators.NetworkOperatorsFdnContract.winmd;,Windows.Phone.PhoneContract.winmd;,Windows.Phone.StartScreen.DualSimTileContract.winmd;,Windows.UI.WebUI.Core.WebUICommandBarContract.winmd --ignore=System.IConvertible,mscorlib.
Error: method System.Reflection.MethodInfo System.Delegate::get_Method() doesn’t exist in target framework. It is referenced from Assembly-CSharp.dll at System.String EventDelegate::GetMethodName(EventDelegate/Callback).
Error: method System.Reflection.MethodInfo System.Delegate::get_Method() doesn’t exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean EventDelegate::IsValid(EventDelegate/Callback).
Error: method System.Reflection.MethodInfo System.Type::GetMethod(System.String,System.Reflection.BindingFlags) doesn’t exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void EventDelegate::Cache().
Error: method System.Delegate System.Delegate::CreateDelegate(System.Type,System.Object,System.String) doesn’t exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void EventDelegate::Cache().

UnityEngine.Debug:LogError(Object)
PostProcessWinRT:RunReferenceRewriter() (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:558)
PostProcessWinRT:Process() (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:127)
UnityEditor.HostView:OnGUI()

Reference rewriter: Error: method System.Reflection.MethodInfo System.Delegate::get_Method() doesn’t exist in target framework. It is referenced from Assembly-CSharp.dll at System.String EventDelegate::GetMethodName(EventDelegate/Callback).
UnityEngine.Debug:LogError(Object)
PostProcessWinRT:RunReferenceRewriter() (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:560)
PostProcessWinRT:Process() (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:127)
UnityEditor.HostView:OnGUI()

Reference rewriter: Error: method System.Reflection.MethodInfo System.Delegate::get_Method() doesn’t exist in target framework. It is referenced from Assembly-CSharp.dll at System.Boolean EventDelegate::IsValid(EventDelegate/Callback).
UnityEngine.Debug:LogError(Object)
PostProcessWinRT:RunReferenceRewriter() (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:560)
PostProcessWinRT:Process() (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:127)
UnityEditor.HostView:OnGUI()

Reference rewriter: Error: method System.Reflection.MethodInfo System.Type::GetMethod(System.String,System.Reflection.BindingFlags) doesn’t exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void EventDelegate::Cache().
UnityEngine.Debug:LogError(Object)
PostProcessWinRT:RunReferenceRewriter() (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:560)
PostProcessWinRT:Process() (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:127)
UnityEditor.HostView:OnGUI()

Reference rewriter: Error: method System.Delegate System.Delegate::CreateDelegate(System.Type,System.Object,System.String) doesn’t exist in target framework. It is referenced from Assembly-CSharp.dll at System.Void EventDelegate::Cache().
UnityEngine.Debug:LogError(Object)
PostProcessWinRT:RunReferenceRewriter() (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:560)
PostProcessWinRT:Process() (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:127)
UnityEditor.HostView:OnGUI()

i copied all the assets into an emty project and the export with unity 5.5.3 works, but the animations are lost and i had to check all settings that were made.
i updatet the project to unity 2017.1 but get the same error and im not sure if the “ultimate mobile” plugin is 100% compatible
back to 5.5.3. I compared the build settings but couldn’t find any issues. What will get lost if copy only the assets in a new project besides the project settings? Or do you see an other way to solve this error? Thank you for your help

Assembly-CSharp.dll is your C# scripts in the project. These errors usually come from using unavailable APIs in your code. The weird thing is that your scripts actually compiled, and you got this error only at that stage. Is there any chance you changed “Compilation overrides” setting in your player settings to “None”?

I was looking for dll as well but you guessed right the “Compliation overrides” where set to “None”. I think the settings were lost when i updated the project from 4.6 because it was build for windwos before. Thanks for your help :smile:

I suggest setting that setting to “Use .Net Core”, which is the default. It will make the compiler point our missing APIs way earlier.

1 Like