Build From Source can not package with VD

I built UE from source as described here in the documentation.
My project is a C++ / BP project. I switched the project to the new UE version and removed the binary UE distribution. I usually start my project from Visual Studio. When the editor comes up, I try to cook/package a version of my project and get this error message:

MSBuild: CSC : error CS2012: Cannot open ‘C:\Program Files (x86)\Epic Games\4.14\UnrealEngine-release\Engine\Source\Programs\DotNETCommon\DotNETUtilities\obj\Development\DotNETUtilities.dll’ for writing – ‘Access to the path ‘C:\Program Files (x86)\Epic Games\4.14\UnrealEngine-release\Engine\Source\Programs\DotNETCommon\DotNETUtilities\obj\Development\DotNETUtilities.dll’ is denied.’ [C:\Program Files (x86)\Epic Games\4.14\UnrealEngine-release\Engine\Source\Programs\DotNETCommon\DotNETUtilities\DotNETUtilities.csproj]

Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.CommandUtils+CommandFailedException: Command failed (Result:1): C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe “C:/Program Files (x86)/Epic Games/4.14/UnrealEngine-release/Engine/Source/Programs/UnrealBuildTool/UnrealBuildTool.csproj” /verbosity:minimal /nologo /target:Rebuild /property:Configuration=Development /property:Platform=AnyCPU. See logfile for details: ‘BuildUBT-2017.02.07-20.52.54.txt’

The respective DLL is set to “need admin rights to delete” and when I go on that DLL in the Windows explorer and check the permissions, i cant even change the owner or do anything. All actionsa re blocked with “no permission”

When I start my project outside of VS and try to pack, all goes well and that DLL is not blocked. Also when I was using the binary distribution, I could pack when I started my project from VS.

Hello,

I’ve never seen this issue before but I’ve also never seen anyone place their source build in a directory such as that. Isn’t this putting your source build in a similar location as your binary one? I know things placed in Program Files(x86) that weren’t placed there by an installation can have odd permission problems such as this. Would it be possible to try placing it elsewhere?

Other than having it in that location, I tried doing the same thing, launching the project through Visual Studio using the Debug Editor configuration and then packaging for Windows. I was able to package successfully.

Well thats where the original engine was installed and when I had to switch to source build to turn on logging in the shipping version I wanted to have the source code in the same location, I dont like spreading an application over various windows locations.
Compiling the engine in that location was without problems. I tried it twice noe, removed the engine, source and binary and then put the source installation back there and DLed the dependencies etc and the same result.
I can work around it, but it’s certainly inconvenient when you have to remember quirks like this for the future.

Would you consider this to be resolved? I’m not quite sure from the wording of your latest post.

There is clearly a problem with the source version that is handled differently from the binary version. I would prefer if I wouldnt have to drop out of Visual Studio for packing, but then packing is nothing that I do daily so I dont know if you should spend resources on fixing this.
I know now how to pack with the source version and have no problems with this quirk. So you need to decide if this is an issue from your view point or not.
Personally I don’t need this fixed, there are more important bugs that your people need to focus on

As we have never seen anyone else report this, to my knowledge, and have no way of reproducing it at the moment, I don’t believe it would be worth the time to investigate if you don’t need it to be resolved.

I’m not sure why I didn’t mention this before, but with this kind of workflow, I wouldn’t expect you to be able to do this. If you’re launching in debug with Visual Studio attached, I wouldn’t expect you to be able to do the compilation part of the packaging.

I would like to mention that I am receiving this same issue with VS 2017 and UE 4.16.

The same error shows up when packaging after the project is launched via Visual Studio with the Development Editor configuration. The same project, if launched outside of Visual Studio, will successfully complete packaging.

I wouldn’t consider the location of my engine source to be unconventional – \Projects\UnrealEngine

It is not a major issue, just wanted to put up the note.