Unable to save Visual Studios .cpp file

I’m encountering an odd issue with Visual Studio Community 2022 and unreal.
I can’t save the Mover.cpp file after editing it normally. It happens at random and says that the file is in use.
I’ve tried to refresh the code in Unreal, I’ve tried closing VS, sometimes I get a build error (Mind the file has not been edited since last build) saying “No permission” which then just goes away after compiling again. The most odd thing is when I try to restart the Unreal editor, the C++ class just disappears in Unreal, the files are still there on my computer but not in the editor.

I’m not using VS Code because I couldn’t get its intellisense to work properly. I knew this probably was going to cause problems but so far, I’ve been able to solve them, except this one

Anyone had this issue before?

Do you have it open in another editor? Are you currently compiling it?

Did you see the Live Coding Issues lecture? Did you compile when Unreal closed before you reopened?

Hi, thanks for you answer.

To answer your questions, I don’t have another editor opened, and the issue seems to randomly appear. Sometimes after compiling other times, I don’t even touch unreal. I’m sure that something causes it to happen I’m just unable to pin it to one thing that I’m doing. I did use Live Coding and I’m not sure how to compile in VS do you happen to know how?

Also I have now tried to recreate the issues I’ve had, but now it won’t create the component at all. It will create the files on my pc, again, but the component is not in the content browser. Here’s what I’m doing:

  • Delete any existing Mover.ccp and Mover.h
  • Adding new c++ component named Mover
  • VS opens and unreal tries to compile c++ but fails

  • Also, VS says this:

  • I attempt to compile, like it tells me to.
  • Compiling fails and gives me this:

  • It ends up not creating the class in UE at all. (The files are on my pc though)


I hope some of this information can help.
Thank you again.

Ok, so i’ve tried some more. When UE tries to compile it shows this error:

c1xx: error C3859: Failed to create virtual memory for PCH

Also when i try to compile in VS it gives me the same sort of errors:

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms