Search Issue Tracker
Fixed in 2017.2.X
Votes
2
Found in
2017.2.0b2
Issue ID
927848
Regression
Yes
Reference rewriter fails in 2017.2 with analytics enabled
Reference rewriter fails in 2017.2 with analytics enabled:
UnityException: Failed to run reference rewriter with command --target="Temp\StagingArea\Data\Managed\UnityEngine.Analytics.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.Specialized,System;System.ComponentModel,System;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.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.ComTypes,mscorlib;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.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.
Catastrophic failure while running rrw: System.UnauthorizedAccessException: Access to the path 'Temp\StagingArea\Data\Managed\UnityEngine.Analytics.dll' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Mono.Cecil.ModuleDefinition.Write(String fileName, WriterParameters parameters) in c:\u\cecil\Mono.Cecil\ModuleDefinition.cs:line 1159
at Unity.ReferenceRewriter.Program.Main(String[] args)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
sophiared
Apr 20, 2019 09:42
Actually, I have also faced these errors similar to that regarding Epson Printer issues. The users must take valid advice from https://errorcode0x.com/fix-epson-printer-error-code-0x97/ that will be helpful for resolving their issues easily.
Paul_Bronowski
Dec 15, 2017 17:11
Same/similar issue on Unity 2017.1.2p3 and p4, with 3rd party assembly...
UnityException: Failed to run reference rewriter with command --target="Temp\StagingArea\Data\Managed\ch.sycoforge.Unity.Runtime.dll" --additionalreferences="Temp\StagingArea\Data\Managed","Temp\StagingArea\Data\Managed\Plugins\X86","Temp\StagingArea\Data\Managed\Plugins\X64","Temp\StagingArea\Data\Managed\Plugins\X86","Temp\StagingArea\Data\Managed\Plugins\X64" --platform="C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.16299.0\Facade\Windows.winmd" --dbg=pdb --framework="Temp\StagingArea\Data\Managed" --alt=Microsoft.Win32.SafeHandles,mscorlib;System,mscorlib;System,System;System,System.ComponentModel.Composition;System,System.Core;System.CodeDom.Compiler,System;System.Collections,mscorlib;System.Collections.Concurrent,mscorlib;System.Collections.Concurrent,System;System.Collections.Generic,mscorlib;System.Collections.Generic,System;System.Collections.Generic,System.Core;System.Collections.ObjectModel,mscorlib;System.Collections.ObjectModel,System;System.Collections.Specialized,System;System.ComponentModel,System;System.ComponentModel.DataAnnotations,System.ComponentModel.DataAnnotations;System.ComponentModel.DataAnnotations.Schema,System.ComponentModel.DataAnnotations;System.Data,System.Data;System.Data.Common,System.Data;System.Diagnostics,mscorlib;System.Diagnostics,System;System.Diagnostics.CodeAnalysis,mscorlib;System.Diagnostics.Contracts,mscorlib;System.Diagnostics.Tracing,mscorlib;System.Dynamic,System.Core;System.Globalization,mscorlib;System.IO,mscorlib;System.IO,System;System.IO,System.Core;System.IO.Compression,System;System.IO.Compression,System.IO.Compression.FileSystem;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.Numerics,System.Numerics;System.Reflection,mscorlib;System.Reflection.Emit,mscorlib;System.Resources,mscorlib;System.Runtime,mscorlib;System.Runtime.CompilerServices,mscorlib;System.Runtime.CompilerServices,System.Core;System.Runtime.ExceptionServices,mscorlib;System.Runtime.InteropServices,mscorlib;System.Runtime.InteropServices,System;System.Runtime.InteropServices,System.Core;System.Runtime.InteropServices.ComTypes,mscorlib;System.Runtime.InteropServices.ComTypes,System;System.Runtime.InteropServices.WindowsRuntime,mscorlib;System.Runtime.Serialization,mscorlib;System.Runtime.Serialization,System.Runtime.Serialization;System.Runtime.Serialization.Json,System.Runtime.Serialization;System.Runtime.Versioning,mscorlib;System.Runtime.Versioning,System;System.Security,mscorlib;System.Security.Authentication,System;System.Security.Authentication.ExtendedProtection,System;System.Security.Claims,mscorlib;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.Threading.Tasks,mscorlib;System.Threading.Tasks,System.Core;System.Windows.Input,System;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;<winmd>,Windows.winmd;<winmd>,Windows.ApplicationModel.Calls.CallsVoipContract.winmd;<winmd>,Windows.ApplicationModel.SocialInfo.SocialInfoContract.winmd;<winmd>,Windows.ApplicationModel.StartupTaskContract.winmd;<winmd>,Windows.Devices.Custom.CustomDeviceContract.winmd;<winmd>,Windows.Devices.DevicesLowLevelContract.winmd;<winmd>,Windows.Devices.Printers.PrintersContract.winmd;<winmd>,Windows.Devices.SmartCards.SmartCardBackgroundTriggerContract.winmd;<winmd>,Windows.Devices.SmartCards.SmartCardEmulatorContract.winmd;<winmd>,Windows.Foundation.FoundationContract.winmd;<winmd>,Windows.Foundation.UniversalApiContract.winmd;<winmd>,Windows.Gaming.XboxLive.StorageApiContract.winmd;<winmd>,Windows.Graphics.Printing3D.Printing3DContract.winmd;<winmd>,Windows.Networking.Connectivity.WwanContract.winmd;<winmd>,Windows.Services.Store.StoreContract.winmd;<winmd>,Windows.Services.TargetedContent.TargetedContentContract.winmd;<winmd>,Windows.System.Profile.ProfileHardwareTokenContract.winmd;<winmd>,Windows.System.Profile.ProfileSharedModeContract.winmd;<winmd>,Windows.UI.ViewManagement.ViewManagementViewScalingContract.winmd;<winmd>,Windows.ApplicationModel.Activation.ActivatedEventsContract.winmd;<winmd>,Windows.ApplicationModel.Activation.ActivationCameraSettingsContract.winmd;<winmd>,Windows.ApplicationModel.Activation.ContactActivatedEventsContract.winmd;<winmd>,Windows.ApplicationModel.Activation.WebUISearchActivatedEventsContract.winmd;<winmd>,Windows.ApplicationModel.Background.BackgroundAlarmApplicationContract.winmd;<winmd>,Windows.ApplicationModel.Calls.Background.CallsBackgroundContract.winmd;<winmd>,Windows.ApplicationModel.Calls.LockScreenCallContract.winmd;<winmd>,Windows.ApplicationModel.FullTrustAppContract.winmd;<winmd>,Windows.ApplicationModel.Preview.InkWorkspace.PreviewInkWorkspaceContract.winmd;<winmd>,Windows.ApplicationModel.Preview.Notes.PreviewNotesContract.winmd;<winmd>,Windows.ApplicationModel.Resources.Management.ResourceIndexerContract.winmd;<winmd>,Windows.ApplicationModel.Search.Core.SearchCoreContract.winmd;<winmd>,Windows.ApplicationModel.Search.SearchContract.winmd;<winmd>,Windows.ApplicationModel.Wallet.WalletContract.winmd;<winmd>,Windows.Devices.Portable.PortableDeviceContract.winmd;<winmd>,Windows.Devices.Printers.Extensions.ExtensionsContract.winmd;<winmd>,Windows.Devices.Scanners.ScannerDeviceContract.winmd;<winmd>,Windows.Devices.Sms.LegacySmsApiContract.winmd;<winmd>,Windows.Gaming.Input.GamingInputPreviewContract.winmd;<winmd>,Windows.Gaming.Preview.GamesEnumerationContract.winmd;<winmd>,Windows.Gaming.UI.GameChatOverlayContract.winmd;<winmd>,Windows.Gaming.UI.GamingUIProviderContract.winmd;<winmd>,Windows.Globalization.GlobalizationJapanesePhoneticAnalyzerContract.winmd;<winmd>,Windows.Management.Deployment.Preview.DeploymentPreviewContract.winmd;<winmd>,Windows.Management.Workplace.WorkplaceSettingsContract.winmd;<winmd>,Windows.Media.AppBroadcasting.AppBroadcastingContract.winmd;<winmd>,Windows.Media.AppRecording.AppRecordingContract.winmd;<winmd>,Windows.Media.Capture.AppBroadcastContract.winmd;<winmd>,Windows.Media.Capture.AppCaptureContract.winmd;<winmd>,Windows.Media.Capture.AppCaptureMetadataContract.winmd;<winmd>,Windows.Media.Capture.CameraCaptureUIContract.winmd;<winmd>,Windows.Media.Capture.GameBarContract.winmd;<winmd>,Windows.Media.Devices.CallControlContract.winmd;<winmd>,Windows.Media.MediaControlContract.winmd;<winmd>,Windows.Media.Playlists.PlaylistsContract.winmd;<winmd>,Windows.Media.Protection.ProtectionRenewalContract.winmd;<winmd>,Windows.Networking.NetworkOperators.LegacyNetworkOperatorsContract.winmd;<winmd>,Windows.Networking.Sockets.ControlChannelTriggerContract.winmd;<winmd>,Windows.Networking.XboxLive.XboxLiveSecureSocketsContract.winmd;<winmd>,Windows.Perception.Automation.Core.PerceptionAutomationCoreContract.winmd;<winmd>,Windows.Security.EnterpriseData.EnterpriseDataContract.winmd;<winmd>,Windows.Security.ExchangeActiveSyncProvisioning.EasContract.winmd;<winmd>,Windows.Services.Maps.GuidanceContract.winmd;<winmd>,Windows.Services.Maps.LocalSearchContract.winmd;<winmd>,Windows.Storage.Provider.CloudFilesContract.winmd;<winmd>,Windows.System.Profile.SystemManufacturers.SystemManufacturersContract.winmd;<winmd>,Windows.System.Profile.ProfileRetailInfoContract.winmd;<winmd>,Windows.System.UserProfile.UserProfileContract.winmd;<winmd>,Windows.System.UserProfile.UserProfileLockScreenContract.winmd;<winmd>,Windows.UI.ApplicationSettings.ApplicationsSettingsContract.winmd;<winmd>,Windows.UI.Core.AnimationMetrics.AnimationMetricsContract.winmd;<winmd>,Windows.UI.Core.CoreWindowDialogsContract.winmd;<winmd>,Windows.UI.Xaml.Hosting.HostingContract.winmd;<winmd>,Windows.Web.Http.Diagnostics.HttpDiagnosticsContract.winmd;<winmd>,Windows.System.SystemManagementContract.winmd;<winmd>,Windows.ApplicationModel.Calls.CallsPhoneContract.winmd;<winmd>,Windows.ApplicationModel.CommunicationBlocking.CommunicationBlockingContract.winmd;<winmd>,Windows.Embedded.DeviceLockdown.DeviceLockdownContract.winmd;<winmd>,Windows.Networking.NetworkOperators.NetworkOperatorsFdnContract.winmd;<winmd>,Windows.Phone.PhoneContract.winmd;<winmd>,Windows.Phone.StartScreen.DualSimTileContract.winmd;<winmd>,Windows.UI.WebUI.Core.WebUICommandBarContract.winmd --ignore=System.IConvertible,mscorlib.
Catastrophic failure while running rrw: System.IO.IOException: The process cannot access the file 'D:\TableTop1\Source\MarkOfWar\Temp\StagingArea\Data\Managed\ch.sycoforge.Unity.Runtime.pdb' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalDelete(String path, Boolean checkHost)
at Mono.Cecil.Pdb.PdbHelper.CreateWriter(ModuleDefinition module, String pdb) in C:\buildslave\cecil\build\symbols\pdb\Mono.Cecil.Pdb\PdbHelper.cs:line 24
at Mono.Cecil.Pdb.PdbWriterProvider.GetSymbolWriter(ModuleDefinition module, String fileName) in C:\buildslave\cecil\build\symbols\pdb\Mono.Cecil.Pdb\PdbHelper.cs:line 60
at Mono.Cecil.ModuleWriter.WriteModuleTo(ModuleDefinition module, Stream stream, WriterParameters parameters) in C:\buildslave\cecil\build\Mono.Cecil\AssemblyWriter.cs:line 83
at Mono.Cecil.ModuleDefinition.Write(String fileName, WriterParameters parameters) in C:\buildslave\cecil\build\Mono.Cecil\ModuleDefinition.cs:line 1094
at 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 (UnityEditor.Modules.BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:155)
UnityEditor.WSA.BuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:162)
UnityEditor.HostView:OnGUI()
zugsoft
Sep 20, 2017 09:10
Hello same issue, in Unity 5.6.3p3 too.
I need to use MySQL in my project, so I need System.Data.dll
artaka
Sep 12, 2017 04:37
I do have System.Data.dll in my project since I'm using SQLite. Removing it causes other errors.
artaka
Sep 12, 2017 04:34
I'm also getting the same error trying to build. Is there some temporary workaround?
Tautvydas-Zilys
Aug 04, 2017 22:00
@IMMERSIVE do you have System.Data.dll in your project somewhere by any chance?
immersive
Jul 10, 2017 10:20
If I disable Analytics in 'Services', I still get the same kind of output, but on a different object (System.Data):
Catastrophic failure while running rrw: System.Exception: Assembly "System.Data" is already registered.
at Unity.SearchPathAssemblyResolver.AddAssembly(AssemblyDefinition assembly)
at Unity.ReferenceRewriter.RewriteContext.For(String targetModule, DebugSymbolFormat symbolFormat, String supportModule, String supportModulePartialNamespace, String[] frameworkPaths, String projectLockFile, String[] additionalReferences, String platformPath, ICollection`1 strongNamedReferences, ICollection`1 winmdReferences, IDictionary`2 alt, IDictionary`2 ignore)
at Unity.ReferenceRewriter.Program.Main(String[] ar
immersive
Jul 10, 2017 10:10
I have the same issue :(