EXEC : error : System.UnauthorizedAccessException: Access to the path '.

Unreal Engine 4.12.4
Visual Studio 2015 Community ( No updates )

As of late, I have had issues rebuilding or cleaning out projects, with the error being
EXEC : error : System.UnauthorizedAccessException Access to ( Some Project Binary .dll ) denied.

It persists across projects, newly created projects, imported projects, the works.

To rebuild, I usually have to close Unreal and Visual and delete the .dll that it can not access, and restart then rebuild, which is hard because it insists on a rebuild every time I add a class from Unreal Engine

I’ve uninstalled both Unreal and Visual Studio and reinstalled them, no dice.

I’ve yet to resort to any drastic measures ( Refreshing PC Operating System ), but I’ve done every other obvious trick in the book.

Any ideas?

Hi ,

I apologize for the delay in responding to your post. I just wanted to check in and see if this is still an issue for you. If it is, would you be able to answer some questions?

  • The file that you mentioned appears to be related to a Hot Reload. Have you been having any trouble with Hot Reloads as well?
  • What are you trying to do when the error is displayed, and what are the exact steps that you follow from creating a new project until the error appears?
  • Are you using the binary version of the Editor installed by the Launcher, or did you build it yourself from source code?
  1. Yes, hot-reloads I think had the same issue, I haven’t worked with the engine in a while.

  2. Rebuilding, Reloading, pretty much everything. I was unable to do anything with the engine because projects could never compile or be used in any sort of fashion.

  3. I did both, same error each time.

Hi ,

I made some attempts to reproduce this issue in several different ways, but was unable to see the results that you described. There may be some workflow steps that you use that I am missing. If you have the to upgrade your Engine to 4.12.5, does the same thing occur?

Unreal engine 4.13. Same issue happened to me, too. Happened 2 times and these steps reproduce the problem:

  1. Create a new basic c++ project.

  2. Through the Editor, add a new c++ class either empty or actor (as a side note, there is a small bug where clicking private or public wont allow unselecting either, and you are stuck creating private and public subfolders inside your project for any future class additions until you restart the editor, however it is unrelated to this issue).
    Anyways, whether the class is added without clicking private/public or via private/public still leads to the result.

  3. Implement a class that has functions for logging:
    GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT(“Some String”));
    UE_LOG(LogTemp, Log, TEXT(“Some String”), 0.1f);
    FMessageDialog::Open(EAppMsgType::Ok, FText::FromString(TEXT(“Some String”)));

  4. Try to replace “Some String” for an FString parameter:
    GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT(MyFString));
    I get compiler error 2065 (‘identifier’ : undeclared identifier) for the MyFString, which appears with the name LMyFString.

Besides the 2065, I also get the .dll error.

Hi Falveryn,

With the steps that you provided I do see the C2065 error (which I believe is expected in this instance). Unfortunately the access denied error did not appear for me. Just out of curiosity, could you try running Visual Studio as an administrator and see if you still get the access denied error?

Hi, sorry for the late reply, as I’m just starting out. Anyways, I solved this. What I found was the following:

If you have a code error (I was not using pointers where I should have, when trying to display messages on the screen) it “kinda compiles” (might be that it shows 1 succeed, 1 failed and/or .dll message shows). After fixing the pointers and after making visual studio have administrator rights, the issue is solved. Thanks.

Hi Falveryn,

I am glad to hear that the issue seems to have been resolved for you. Please let us know if you run into any other issues.

@ Are you still having trouble with this issue?

Still having the errors , sorry. Updated the Engine, Deleted the both programs, re-installed them, no dice. Problem still exists.

http://puu.sh/rtBqG/6b015878a9.png
http://puu.sh/rtBut/2414d40a93.png

I tried creating a project and using that, dll error still persists. After some investigative work I’ve concluded

  1. It has no issues Rebuilding or the first time, but all future rebuilds will have the DLL error unless you close both Unreal and Visual studio and clear the DLL’s manually, which is very tiresome when your constantly building projects.
  2. It seems hot reloads don’t even happen, as Visual Studio fails midway through compiling. hopefully that gives you more info on what is.

I tried doing a list by list of what I did with this project to the point the error happened, as I believe I did not include “Steps to replicate” in my original bug report.

  1. Created a new project
  2. Added a C++ Class via unreal Engine
  3. Visual Studio auto-opens as the class is created
  4. Removed the C++ Class via Visual Studio by right clicking the class.h and class.cpp and hitting “Remove”
  5. Rebuild the project
  6. Unreal Engine still displays the class as existing
  7. I closed both Unreal and Visual Studio
  8. I go manually remove the source versions of those classes
  9. I open Unreal Engine, deleted class is now gone
  10. Create the “TestCamera Actor”
  11. Visual Studio Opens
  12. Add Code
  13. Hit “Rebuild”
  14. ERROR

I will reply if I have any luck resolving the error by running visual studio as administrator

And yes I’m aware of the error “Public TestCameraActor” in the CPP, I fixed it, error still persists

It seems that running Visual Studio as admin seems to remove the issue. I will alert you if the issue returns