Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Compile In Editor "FileNotFoundException" Compiler Can't Find UProject File

I'm getting this callstack:

           at UnrealBuildTool.UnrealBuildTool.RunUBT(BuildConfiguration BuildConfiguration, String[] Arguments, FileReference ProjectFile, Boolean bCatchExceptions) in D:\PROJECT_NAME\UnrealEngine-4.21.1-release\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 1136
 ERROR: System.IO.FileNotFoundException: Could not find file 'D:\PROJECT_NAME\PROJECT_NAME.uproject'.
        File name: 'D:\PROJECT_NAME\PROJECT_NAME.uproject'
           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, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
           at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
           at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
           at Tools.DotNETCommon.JsonObject.Read(FileReference File) in D:\PROJECT_NAME\UnrealEngine-4.21.1-release\Engine\Source\Programs\DotNETCommon\DotNETUtilities\JsonObject.cs:line 50
           at UnrealBuildTool.ProjectDescriptor.FromFile(FileReference FileName) in D:\PROJECT_NAME\UnrealEngine-4.21.1-release\Engine\Source\Programs\UnrealBuildTool\System\ProjectDescriptor.cs:line 184
           at UnrealBuildTool.RulesCompiler.CreateProjectRulesAssembly(FileReference ProjectFileName, Boolean bUsePrecompiled, Boolean bSkipCompile) in D:\PROJECT_NAME\UnrealEngine-4.21.1-release\Engine\Source\Programs\UnrealBuildTool\System\RulesCompiler.cs:line 348
           at UnrealBuildTool.TargetDescriptor.ParseCommandLine(String[] Arguments, Boolean bUsePrecompiled, Boolean bSkipRulesCompile, FileReference& ProjectFile) in D:\PROJECT_NAME\UnrealEngine-4.21.1-release\Engine\Source\Programs\UnrealBuildTool\Configuration\TargetDescriptor.cs:line 180

The issue is that somewhere in the build process, it is deciding to go up one extra folder.

At the very top, it says the project is not at the path "D:\PROJECT_NAME\PROJECT_NAME.uproject"

This is true. It's at "D:\PROJECT_NAME\PROJECT_NAME\PROJECT_NAME.uproject"

I have deleted the contents of the saved folder, the vs folder, the intermediate folder, regenerated project files multiple times, done several checks over all the VCXProj files, all the directories pointing to this file are CORRECT.

I even tried moving everything to that folder and regenerating project files, and when I did it started telling me it couldn't find "D:\PROJECT_NAME.uproject".

So it's consistently looking one folder up, and I have NO Idea why.

It's also worth noting that compiling from visual studio works perfectly fine. Even when using the unrealbuildtool.

Product Version: UE 4.21
more ▼

asked Jan 12 '19 at 05:59 PM in Using UE4

avatar image

46 2 2

avatar image Luan DIACRISIS Jan 12 '19 at 07:35 PM

Did you tried to package it trough project launcher to see if the compiler will have that error?

If you try, post the screenshot here, I will be checking it tomorrow

avatar image DESTRUKTORRR Jan 12 '19 at 07:55 PM

The build process in packaging works fine, too, from the editor. No errors.

avatar image JimShepard Feb 26 '19 at 12:54 AM

I'm having the same issue. I've been stepping through UnrealBuildTool.cs and I'm seeing weird behavior with FileReference and FullName.

Line 316 of UnrealBuildTool.cs assigns ProjectFile by creating a new FileReference.

FileReference.cs line 30, with the parameter

InPath = "../../../project_name/project_name" public FileReference(string InPath) : base(Path.GetFullPath(InPath)) { if(FullName[FullName.Length - 1] == '\\' || FullName[FullName.Length - 1] == '/') { throw new ArgumentException("File names may not be terminated by a path separator character"); } }

As soon as the base constructor is called, FullName is set to an incorrect value.

Path.GetFullPath(InPath) returns "E:\\Projects\\project_name\\project_name\\project_name.uproject"

That is the correct location. However, FullName is set to an incorrect location, one directory higher.

FullName "E:\\Projects\\project_name\\project_name.uproject"

(comments are locked)
10|2000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question