GitDependencies.exe.config -only error

I am storing UE4 in perforce and building from source. So files that are normally stored in git are -only on my disk unless I check them out. I get this error during the build

2>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(3884,5): error MSB3021: Unable to copy file "App.config" to "..\..\..\Binaries\DotNET\GitDependencies.exe.config". Access to the path '..\..\..\Binaries\DotNET\GitDependencies.exe.config' is denied.

It doesn’t seem to break anything, so I can work around it for now, but it is definitely annoying to see ‘build failed’ all the time instead of only when the build actually fails.

Hey ryani-

Which version of the engine are you trying to build? As of 4.6 the dependencies have been included with the Setup.bat file when ran. Could you describe the process you use when trying to build the engine?

Cheers

4.6.1

After running setup.bat and GenerateProjectFiles.bat (which both work flawlessly), I open the solution in Visual Studio.

Then, one of the build steps for the GitDependencies.exe program tries to copy that App.config file into the binaries directory, but the binary and config already exist since they were required for doing the engine setup.

And because they need to exist for new setups, I have them checked into perforce, which means those files on the local disk are -only, which means the copy fails and shows the error I’ve described.

So, every build shows a superfluous error even when I didn’t intend to change GitDependencies.exe or the associated config file.

I can work around the problem by tagging the files in perforce as writeable on all clients, but that feels like a hack. A better solution would be for GitDependencies.exe to not get rebuilt by default.

Hey ryani-

I agree that the option should exist to choose whether the .exe gets rebuilt or not. I have submitted a feature request to have this included in the engine (UE-8549). For the time being your best bet would be to continue tagging the necessary files as writeable.

Cheers

I’ve disabled building it as part of solution configurations by default in changelist 2466280 (commit 8a36c1a1bc2e763b3fbd2a6139c96d26606190ec).

Thanks Ben!