2022.1.15f1 Access to path CommonBurstAotSettings.json is denied.

Hello all, whenever I try to build locally or access the Burst AOT Settings from the Project Settings window, I get an error saying that “access to path is denied.”

I recently upgraded to 2022.1.15f1 from 2021.1. All went well, and I’m loving the new version. But, I’m not sure how to handle this problem. Full stack trace below.

Please let me know what additional information you would like regarding my project. Thanks!

Full stack trace…

UnauthorizedAccessException: Access to the path "C:\Grimm Tales\Star in the Hollow Workspace\ProjectSettings\CommonBurstAotSettings.json" is denied.
System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) (at <f3aec01a34d14c7080754e28743c8472>:0)
System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options) (at <f3aec01a34d14c7080754e28743c8472>:0)
(wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions)
System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) (at <f3aec01a34d14c7080754e28743c8472>:0)
System.IO.StreamWriter..ctor (System.String path) (at <f3aec01a34d14c7080754e28743c8472>:0)
(wrapper remoting-invoke-with-check) System.IO.StreamWriter..ctor(string)
System.IO.File.WriteAllText (System.String path, System.String contents) (at <f3aec01a34d14c7080754e28743c8472>:0)
Unity.Burst.Editor.BurstPlatformAotSettings.Save (System.Nullable`1[T] target) (at Library/PackageCache/com.unity.burst@1.7.4/Editor/BurstAotSettings.cs:464)
Unity.Burst.Editor.BurstPlatformAotSettings.GetOrCreateSettings (System.Nullable`1[T] target) (at Library/PackageCache/com.unity.burst@1.7.4/Editor/BurstAotSettings.cs:256)
Unity.Burst.Editor.BurstPlatformAotSettings.GetCommonSerializedSettings () (at Library/PackageCache/com.unity.burst@1.7.4/Editor/BurstAotSettings.cs:469)
Unity.Burst.Editor.BurstAotSettingsIMGUIRegister+BurstAotSettingsProvider.InitialiseSettingsForCommon (System.Reflection.FieldInfo[] commonFields) (at Library/PackageCache/com.unity.burst@1.7.4/Editor/BurstAotSettings.cs:614)
Unity.Burst.Editor.BurstAotSettingsIMGUIRegister+BurstAotSettingsProvider.OnActivate (System.String searchContext, UnityEngine.UIElements.VisualElement rootElement) (at Library/PackageCache/com.unity.burst@1.7.4/Editor/BurstAotSettings.cs:607)
UnityEditor.SettingsWindow.ProviderChanged (UnityEditor.SettingsProvider lastSelectedProvider, UnityEditor.SettingsProvider newlySelectedProvider) (at <6715418e4c694f63bee37bd4b1aefc00>:0)
UnityEditor.SettingsTreeView.SelectionChanged (System.Collections.Generic.IList`1[T] selectedIds) (at <6715418e4c694f63bee37bd4b1aefc00>:0)
UnityEditor.IMGUI.Controls.TreeViewController.NotifyListenersThatSelectionChanged () (at <6715418e4c694f63bee37bd4b1aefc00>:0)
UnityEditor.IMGUI.Controls.TreeViewController.NewSelectionFromUserInteraction (System.Collections.Generic.List`1[T] newSelection, System.Int32 itemID) (at <6715418e4c694f63bee37bd4b1aefc00>:0)
UnityEditor.IMGUI.Controls.TreeViewController.SelectionClick (UnityEditor.IMGUI.Controls.TreeViewItem itemClicked, System.Boolean keepMultiSelection) (at <6715418e4c694f63bee37bd4b1aefc00>:0)
UnityEditor.IMGUI.Controls.TreeViewController.HandleUnusedMouseEventsForItem (UnityEngine.Rect rect, UnityEditor.IMGUI.Controls.TreeViewItem item, System.Int32 row) (at <6715418e4c694f63bee37bd4b1aefc00>:0)
UnityEditor.IMGUI.Controls.TreeViewController.DoItemGUI (UnityEditor.IMGUI.Controls.TreeViewItem item, System.Int32 row, System.Single rowWidth, System.Boolean hasFocus) (at <6715418e4c694f63bee37bd4b1aefc00>:0)
UnityEditor.IMGUI.Controls.TreeViewController.IterateVisibleItems (System.Int32 firstRow, System.Int32 numVisibleRows, System.Single rowWidth, System.Boolean hasFocus) (at <6715418e4c694f63bee37bd4b1aefc00>:0)
UnityEditor.IMGUI.Controls.TreeViewController.OnGUI (UnityEngine.Rect rect, System.Int32 keyboardControlID) (at <6715418e4c694f63bee37bd4b1aefc00>:0)
UnityEditor.IMGUI.Controls.TreeView.OnGUI (UnityEngine.Rect rect) (at <6715418e4c694f63bee37bd4b1aefc00>:0)
UnityEditor.SettingsWindow.DrawTreeView () (at <6715418e4c694f63bee37bd4b1aefc00>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <08eb70f35eab47c78fc3557255423a2b>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <08eb70f35eab47c78fc3557255423a2b>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <08eb70f35eab47c78fc3557255423a2b>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <08eb70f35eab47c78fc3557255423a2b>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <08eb70f35eab47c78fc3557255423a2b>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <08eb70f35eab47c78fc3557255423a2b>:0)
UnityEngine.UIElements.IMGUIContainer.ProcessEvent (UnityEngine.UIElements.EventBase evt) (at <08eb70f35eab47c78fc3557255423a2b>:0)
UnityEngine.UIElements.IMGUIContainer.ExecuteDefaultActionAtTarget (UnityEngine.UIElements.EventBase evt) (at <08eb70f35eab47c78fc3557255423a2b>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <08eb70f35eab47c78fc3557255423a2b>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtCurrentTargetAndPhase (UnityEngine.UIElements.EventBase evt) (at <08eb70f35eab47c78fc3557255423a2b>:0)
UnityEngine.UIElements.CallbackEventHandler.UnityEngine.UIElements.IEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <08eb70f35eab47c78fc3557255423a2b>:0)
UnityEngine.UIElements.EventDispatchUtilities.HandleEventAcrossPropagationPath (UnityEngine.UIElements.EventBase evt) (at <08eb70f35eab47c78fc3557255423a2b>:0)
UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at <08eb70f35eab47c78fc3557255423a2b>:0)
UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToRegularTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <08eb70f35eab47c78fc3557255423a2b>:0)
UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at <08eb70f35eab47c78fc3557255423a2b>:0)
UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel iPanel) (at <08eb70f35eab47c78fc3557255423a2b>:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <08eb70f35eab47c78fc3557255423a2b>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <08eb70f35eab47c78fc3557255423a2b>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <08eb70f35eab47c78fc3557255423a2b>:0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at <08eb70f35eab47c78fc3557255423a2b>:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <08eb70f35eab47c78fc3557255423a2b>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <08eb70f35eab47c78fc3557255423a2b>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <08eb70f35eab47c78fc3557255423a2b>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <08eb70f35eab47c78fc3557255423a2b>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <08eb70f35eab47c78fc3557255423a2b>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <08eb70f35eab47c78fc3557255423a2b>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <08eb70f35eab47c78fc3557255423a2b>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <08eb70f35eab47c78fc3557255423a2b>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <8e97839110b84d8488891b7b115781f7>:0)

Small Update. Checking out the CommonBurstAotSettings.json file via Plastic makes the error go away. The question is why this step is necessary…

Okay well, I think I fixed it. I had to check-out both CommonBurstAotSettings.json and BurstAotSettings_StandaloneWindows.json. After which, the text of the files got slightly updated. After checking-in the changes, the error hasn’t come back at all. Well, maybe this thread will help at least one person LOL

1 Like

This helped me, thank you! I’m using a different version control but checking out the file fixed the build errors

1 Like