Hello. I’m usingUnreal Engine 5.3 and Visual Studio 2022. There is a problem Im having for a long time and its getting really anoying. If Im editing the file in Visual Studio anytime I want to save it (either for building in Visual Studio or compiling in Unreal) I cant save the file. So it cant overwrite the file and it ask me where do I want to save as instead of automatically overwrite the old one. If i choose to save over the old one it says it cant overwrite it.
I press save like 10 to 20 times until it finally works. It doesn’t happen all the time but enough times to drive me insane especially when Im deep into coding and this seems like a distraction.
Ive run Visual Studio as a administrator, Ive reinstalled everything even Windows at some point and it still happens.
If I manage to save it sometimes in unreal I get this error:
Unhandled exception: System.Exception: Error while creating log file “C:\Users\balan\AppData\Local\UnrealBuildTool\Log.txt”
—> System.IO.IOException: The process cannot access the file ‘C:\Users\balan\AppData\Local\UnrealBuildTool\Log.json’ because it is being used by another process.
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.OSFileStreamStrategy…ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
at System.IO.File.Open(String path, FileMode mode, FileAccess access, FileShare share)
at EpicGames.Core.FileReference.Open(FileReference location, FileMode mode, FileAccess access, FileShare share) in D:\UE_5.3\UE_5.3\Engine\Source\Programs\Shared\EpicGames.Core\FileReference.cs:line 432
at EpicGames.Core.DefaultLogger.AddFileWriter(String name, FileReference outputFile) in D:\UE_5.3\UE_5.3\Engine\Source\Programs\Shared\EpicGames.Core\Log.cs:line 1101
— End of inner exception stack trace —
at EpicGames.Core.DefaultLogger.AddFileWriter(String name, FileReference outputFile) in D:\UE_5.3\UE_5.3\Engine\Source\Programs\Shared\EpicGames.Core\Log.cs:line 1108
at EpicGames.Core.Log.AddFileWriterWithoutBackup(String name, FileReference outputFile) in D:\UE_5.3\UE_5.3\Engine\Source\Programs\Shared\EpicGames.Core\Log.cs:line 285
at EpicGames.Core.Log.AddFileWriter(String name, FileReference outputFile) in D:\UE_5.3\UE_5.3\Engine\Source\Programs\Shared\EpicGames.Core\Log.cs:line 272
at UnrealBuildTool.BuildMode.ExecuteAsync(CommandLineArguments Arguments, ILogger Logger) in D:\UE_5.3\UE_5.3\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 0
at UnrealBuildTool.UnrealBuildTool.Main(String[] ArgumentsArray) in D:\UE_5.3\UE_5.3\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 659
So seems it’s a problem accessing and saving files because they are used by another process I suppose. But even after installing a fresh OS and all the tools again (Visual Studio, Unreal Editor) it does the same I dont understand why.
I dont have any antivirus active