Download

Unable to build project: Visual studio finds some files to be ReadOnly.

A couple of weeks ago, I was forced remove my project and reupload it to a new perforce server (lost access to the previous). I noticed at the time that there were some changes in the Visual studio project but I’m not a programmer and there was no need to edit code files so i was just booting directly into the UE4 editor. However, now it becomes time to modify a code file and I received a pop on entering visual studio.

^0AC82C1E130138D0B4FD038D08B0736ED9AEB26E9F5FA46DD8^pimgpsh_fullsize_distr.png

When I tried to build my project after modifying the code file (I just commented out a debug line draw), I get:

I had to move the project folder when I did the reupload, and my thinking is that maybe a bunch of references were lost (or perhaps still exist?) from the older VS project. I’ve tried generating new VS project files from my UE4 uproject but I get:

I don’t really understand this stuff so I’m at a loss for how to proceed. I’d be really grateful for any light that could be shed on my problem.

I’ve seen this error in the past when I had 2 instances of Visual Studio running with the same solution open, might want to check that out.

No, only one instance open. It keeps saying that it’s unable to access files. When I checked out MindlessAction.log in perforce it enabled me to complete a game build. However, when I tried a developement-Editor build it failed again:

Perforce1.png

Could it be that all the permissions for my engine files have been reverted somehow? Maybe this occurred when I copied my project to a new folder? The migration to a new perforce server was pretty rushed and confusing.

Ah, missed the fact that Perforce was involved. I usually tick “all write” in my workspace to avoid those nasty issues.

Do you think this will allow me permission to modify files when building? Does visual studio TRY to write lots files when building? Also, is this the property you mean?

a4c1130ddba434792a74fd595cc3c10f47a4ae23.png

I don’t know which existing files UE4 writes into. You could try setting the permissions on the files one by one and see how many you end up changing. :smiley:

I will say though… the files that are written to automtically like log files and such shouldn’t be in the repo to begin with so Perforce shouldn’t hold on to them. It definitely seems like your repo is misconfigured.

I think you might be right about the repo being misconfigured. I saw on the official UE4 perforce documentation: https://docs.unrealengine.com/latest/INT/Engine/Basics/SourceControl/Perforce/ that you should add only a few of the project folders to the repo. However, as you can see here:

Perforce3.png

We’ve got a few of the other folders included too. Could excluding these from the repo enable a correct build? Thanks for helping btw, I really appreciate the suggestions.

You DEFINITELY must NOT have .vs, Binaries, Intermediate, Saved nor the .db or the .sln files in the repo.

Also you seem to also have the engine as a subfolder to the game… this will not work for entirely different reasons (UBT will have trouble finding your project), and of course, you have dozens of GB of auto-generated junk files that should not be in your repo.