System.ArgumentException: Path fragment '"Content/\351\237\263\351\242\221/Cheetah\302\240Mobile_Games_-_\...\265.uasset"' contains invalid directory separators

未经处理的异常: System.ArgumentException: Path fragment ‘“Content/\351\237\263\351\242\221/Cheetah\302\240Mobile_Games_-_\347\254\254\345\215\201\344\270\203\345\205\263\302\240Cube\302\240\345\207\240\344\275\225\350\277\267\351\230\265.uasset”’ contains invalid directory separators.
1> 在 Tools.DotNETCommon.FileSystemReference.CombineStrings(DirectoryReference BaseDirectory, String[] Fragments)
1> 在 Tools.DotNETCommon.FileReference.Combine(DirectoryReference BaseDirectory, String[] Fragments)
1> 在 UnrealBuildTool.GitSourceFileWorkingSet.AddPath(String Path)
1> 在 UnrealBuildTool.GitSourceFileWorkingSet.OutputDataReceived(Object Sender, DataReceivedEventArgs Args)
1> 在 System.Diagnostics.Process.OutputReadNotifyUser(String data)
1> 在 System.Diagnostics.AsyncStreamReader.FlushMessageQueue()
1> 在 System.Diagnostics.AsyncStreamReader.GetLinesFromStringBuilder()
1> 在 System.Diagnostics.AsyncStreamReader.ReadBuffer(IAsyncResult ar)
1> 在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
1> 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
1> 在 System.IO.Stream.ReadWriteTask.System.Threading.Tasks.ITaskCompletionAction.Invoke(Task completingTask)
1> 在 System.Threading.Tasks.Task.FinishContinuations()
1> 在 System.Threading.Tasks.Task.Finish(Boolean bUserDelegateExecuted)
1> 在 System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
1> 在 System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
1> 在 System.Threading.ThreadPoolWorkQueue.Dispatch()

I have the same issue,and I think the reason is the file name contains chinese character.

I also encountered the same problem, probably using a different computer files

I have the same issue

Same issue… Epic help us pls :slight_smile:

Same issue. Even I deleted the directory. The issue remains active.

If you are using a git repository, check you don’t have any uncommitted deletes.

For me, the error was referring to a file in a directory which I had removed, but the removal of that directory had not been committed to the repository.

It seems that VS was referring to the last commit in GIT rather than the current state of the file system.

5 Likes

I found a way to solve the problem.
run the below line in cmd.
git config --global core.quotepath false

17 Likes

This seems to be effective, through your answer I solved the problem of compilation failure when packaging.
Thx a lot!

I solved the same error after following your command. Thx

LIFESAVER!

I solved the same error after following your command. Thx

is cool

Very useful,thank you