x

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"

why cant I generate visual studio project files

Hi Everyone,

I have the issue where when I try to rebuild my visual studio project files I get the error listed below. I'm at a loss and cant get around this error. Any help or input would be appreciated. Thanks!

Running C:/Program Files/Epic Games/UE_4.18/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project="C:/Users/Ron White/Documents/Unreal Projects/projects/codetests/codetest/codetest.uproject" -game -rocket -progress -log=C:\Users\Ron White\Documents\Unreal Projects\projects\codetests\codetest/Saved/Logs/UnrealVersionSelector-2018.10.03-23.20.38.log ERROR: UnrealBuildTool Exception: System.UnauthorizedAccessException: Access to the path 'c:\users\ron' 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 UnrealBuildTool.UnrealBuildTool.GuardedMain(String[] Arguments)

Product Version: UE 4.18
Tags:
more ▼

asked Oct 04 '18 at 03:28 AM in C++ Programming

avatar image

rfw7755
36 3 5 7

avatar image NicholasMont ♦♦ STAFF Oct 05 '18 at 03:39 PM

Hello rfw7755,

Does the user "Ron White" have administrative privileges?

If you navigate to your C:/Program Files/Epic Games/ folder and right click-> Select Properties-> Select Security-> Edit the permissions to allow access to all users.

Does this result in any success?

avatar image TheDreamCatcher Oct 06 '18 at 05:26 AM

@NicholasMont this is not a privilege problem but a string construction issue involving white space. something was changed in UBT that creates the same error you can face sometimes in Linux when path with white space are not handle properly.

avatar image Quexlaw Oct 08 '18 at 09:07 PM

I have a very similar or even the same problem. When I tried with UE 4.20, the message is different, but results in the same, more or less. When I tried generating project files with 4.19, I got the exact same message though, down to UnrealVersionSelecter.log file and the UnauthorizedAccessException to the cut part of the user name.

I just opened a question here, too: https://answers.unrealengine.com/questions/835644/cant-generate-project-files-unauthorized-access-to.html

But it seems my guess was wrong. I had, coincidentally, a 2nd user with the very same name (in this case: ron), so I thought the system tried accessing the 2nd user. But if that's not the case for you then that really just leaves the white space issue.

Can Staff clarify? This is a really big issue with no easy fix on the OS side. I think the UBT needs to be fixed ASAP.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Hello rfw7755 ,

if you open a terminal directly from your UBT folder and try the following:

./UnrealBuildTool.exe -projectfiles -project="C:/home/test/Documents/Repro 18/Repro18.uproject"

Does this work? If this is not successful, open a terminal from desktop and try:

"C:/Users/Ron\ White/Documents/Unreal Projects/projects/codetests/codetest/codetest.uproject"

Please let me know what results you receive.

Thank you!

more ▼

answered Oct 09 '18 at 12:48 PM

avatar image

NicholasMont ♦♦ STAFF
592 3 4 6

avatar image Quexlaw Oct 09 '18 at 02:22 PM

I can't speak for rfw7755, but as I have the same problem my answer might help you. I did not try the first one as I do not understand it. I did, however, test the 2nd one, which results in an error message because the program will then try to look up FirstName\ LastName which obviously does not exist.

So, escaping the whitespace does not work.

However, that was not necessary in the first place. using the UBT via command line works just fine when given the proper path of C:/Users/FirstName LastName/.../Project.uproject". It seems only the rightclick function does not work. I do, however, get the following warning which seems unrelated. I thought it was worth mentioning though.

So I can use this as a workaround for now.

alt text

avatar image John Alcatraz Oct 15 '18 at 06:04 AM

I did have the same issue today. I have successfully generated project files probably >100 of times for this project in the past few years, and today is suddenly didn't work any more. I do use whitespaces in the path, and that seems to be the issue.

Doing it with the first method you mentioned worked, thanks for that! Still significantly more inconvenient than right clicking the uproject file.

avatar image John Alcatraz Oct 15 '18 at 07:30 AM

Actually, it did NOT work. It says "writing project files... 100%" and everything looks good, but it never created a new .sln file, the file was not modified. Now I deleted my old .sln file and it does NOT create a new one. So unfortunately this does not seem to workaround the issue. @NicholasMont @Quexlaw

avatar image Quexlaw Oct 15 '18 at 07:33 AM

That's weird. It definitely does work for me. Even wrote a batch script so I could use it for all of my projects, just in case, and I tested by creating a new project, as well as deleting my old .sln.

avatar image John Alcatraz Oct 15 '18 at 07:35 AM

Hm, can you post your batch file here so that I can try that?

avatar image Quexlaw Oct 15 '18 at 07:38 AM

Sure, but it's kind of a cheat, so you will have to edit some of the lines.

REM Project must be in FirstName LastName\Documents\Unreal Projects to work

@echo off set /p projectName="Enter Project to generate files: " "C:\Program Files\Epic Games\UE_4.20\Engine\Binaries\DotNET/UnrealBuildTool.exe" -projectfiles -project="C:\Users\FirstName LastName\Documents\Unreal Projects\%projectName%\%projectName%.uproject"

@pause

The parts you have to edit should be obvious.

EDIT: When executing the batch file, you just have to type in the name of your project, such as "BestProject". Do not specify a path, just the name of the project. This batch file will look it up for you if you specified the path in the batch file correctly.

avatar image John Alcatraz Oct 15 '18 at 07:49 AM

Thanks! But actually, that's not doing anything for me, I just see "Press any key..." immediately after opening it.

Could you maybe format your post so that the .bat is in code format? Maybe the formatting here breaks it. I mean this code format stuff:

 Test123
 
avatar image Quexlaw Oct 15 '18 at 07:50 AM
 REM Project must be in FirstName LastName\Documents\Unreal Projects to work
 
 @echo off
 set /p projectName="Enter Project to generate files: " 
 "C:\Program Files\Epic Games\UE_4.20\Engine\Binaries\DotNET/UnrealBuildTool.exe" -projectfiles -project="C:\Users\FirstName LastName\Documents\Unreal Projects\%projectName%\%projectName%.uproject"
 
 @pause
avatar image John Alcatraz Oct 15 '18 at 08:03 AM

Thanks! The .bat file works now, but the issue is same now like previously, it says everything would finish successfull but I don't actually get any .sln file generated. Very weird that it works for you but not for me! Which UE4 Version are you using? I'm on 4.19.

avatar image Quexlaw Oct 15 '18 at 08:05 AM

4.20. Did you change the UE_4.20 in the path as well? That may be the reason if you are trying to use the 4.20 UBT to build the 4.19 project c++ data.

avatar image John Alcatraz Oct 15 '18 at 08:06 AM

I'm not using a launcher build, so I have copied in my custom path where the engine is installed, yeah.

avatar image Quexlaw Oct 15 '18 at 08:07 AM

I see. Tough luck. I think you should create a new question here and expand upon it, for better visibility.

avatar image John Alcatraz Oct 17 '18 at 03:04 AM

@NicholasMont could you comment on this? I would really like to be able to generate project files again...

avatar image NicholasMont ♦♦ STAFF Oct 17 '18 at 02:52 PM

Hello John,

The Terminal commands provided are for a linux environment, are you using Windows Or Linux? If you're using windows, I'd like to ask you to please create a separate question with more details specific to the issues you're experiencing.

Thanks!

Sincerely, Nicholas

avatar image John Alcatraz Oct 17 '18 at 09:26 PM

Hi Nicholas,

thanks for your answer, but I think you're confusing something? No one here used Linux, the question is asked regarding Windows and your commands that you posted are also for Windows (I'm quite sure you don't use a UnrealBuildTool*.exe* on Linux ;) ).

So I am using the same OS like @rfw7755 and @Quexlaw and I'm seeing the 100% same issue, I think creating a new question would not make sense? It's best to keep discussion about 1 issue in 1 thread.

I have also heard from others that this bug in UBT seems to be fixed in 4.21, but no one could tell me which commit fixed it.

avatar image TheDreamCatcher Oct 17 '18 at 10:18 PM

I think but I have not really tested it that the command you are looking for should be something like this: "Drive:/Path/To/UE4/Engine/Binaries/DotNet/UnrealBuildTool.exe" -projectFiles -project="Drive:/Path?to/Your/Project/Project.uproject" -game -engine -2017

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Bump. This is an important bug and deserves attention.

more ▼

answered Oct 09 '18 at 07:21 AM

avatar image

Quexlaw
79 5 10 17

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
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