# Visual Studio Bug -\> "Rebuild" prevents future compiles

**URL:** <https://forums.unrealengine.com/t/visual-studio-bug-rebuild-prevents-future-compiles/275550>\
**Category:** C++\
**Tags:** unreal-engine, bug-report, feedback, CPP, question\
**Created:** [March 11, 2014, 2:28am UTC](https://forums.unrealengine.com/t/visual-studio-bug-rebuild-prevents-future-compiles/275550 "2014-03-11T02:28:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ue4-archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ue4-archive](https://forums.unrealengine.com/u/ue4-archive)\
**Post date:** [March 11, 2014, 2:28am UTC](https://forums.unrealengine.com/t/visual-studio-bug-rebuild-prevents-future-compiles/275550/1 "2014-03-11T02:28:09Z")

</div>

![rebuild.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/1/2/d122ac0160d418ff03a5fe3662c197a1c98bf155.jpeg)

Dear Friends at Epic,

Sometimes I will accidentally click “rebuild” instead of build

in all betas I’ve tested, this results in the following behavior

future attempts to use build or rebuild fail with a msg similar to this

```
1>------ Build started: Project: VictoryGame, Configuration: Development_Editor x64 ------
1>EXEC : error : System.UnauthorizedAccessException: Access to the path 'E:\RocketVictory\VictoryGame\Intermediate\BuildData\Include\VictoryGame' is denied.
1> at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
1> at System.IO.FileSystemEnumerableIterator`1.CommonInit()
1> at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
1> at System.IO.DirectoryInfo.InternalGetFiles(String searchPattern, SearchOption searchOption)
1> at UnrealBuildTool.RulesCompiler.FindAllRulesFilesRecursively(DirectoryInfo DirInfo, RulesFileCache RulesFileCache)
1> at UnrealBuildTool.RulesCompiler.FindAllRulesFilesRecursively(DirectoryInfo DirInfo, RulesFileCache RulesFileCache)
1> at UnrealBuildTool.RulesCompiler.FindAllRulesFilesRecursively(DirectoryInfo DirInfo, RulesFileCache RulesFileCache)
1> at UnrealBuildTool.RulesCompiler.FindAllRulesFilesRecursively(DirectoryInfo DirInfo, RulesFileCache RulesFileCache)
1> at UnrealBuildTool.RulesCompiler.FindAllRulesFilesRecursively(DirectoryInfo DirInfo, RulesFileCache RulesFileCache)
1> at UnrealBuildTool.RulesCompiler.FindAllRulesSourceFiles(RulesFileType RulesFileType, List`1 AdditionalSearchPaths)
1> at UnrealBuildTool.RulesCompiler.ConditionallyCompileAndLoadRulesAssembly()
1> at UnrealBuildTool.RulesCompiler.CreateTargetRules(String TargetName, TargetInfo Target, Boolean bInEditorRecompile, String& TargetFileName)
1> at UnrealBuildTool.RulesCompiler.CreateTarget(String TargetName, TargetInfo Target, List`1 InAdditionalDefinitions, String InRemoteRoot, List`1 InOnlyModules, Boolean bInEditorRecompile)
1> at UnrealBuildTool.UEBuildTarget.CreateTarget(String[] SourceArguments)
1> at UnrealBuildTool.UnrealBuildTool.RunUBT(String[] Arguments)
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command ""C:\Program Files\Rocket\Engine\Binaries\DotNET\UnrealBuildTool.exe" VictoryGameEditor Win64 Development "E:\RocketVictory\VictoryGame\VictoryGame.uproject" -rocket" exited with code 1.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

```

#Solution

I have to log off of Windows 7 and log back on to correct this issue. Restarting VS is not enough.

#Request

Can you please figure out why “rebuild” causes all future builds and compiles to fail until logging off and back on?

Thanks!

Rama

---

<div class="post-metadata">

**Author:** ![ue4-archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ue4-archive](https://forums.unrealengine.com/u/ue4-archive)\
**Post date:** [March 11, 2014, 2:28am UTC](https://forums.unrealengine.com/t/visual-studio-bug-rebuild-prevents-future-compiles/275550/2 "2014-03-11T02:28:11Z")

</div>

> Access to the path  
> ‘E:\RocketVictory\VictoryGame\Intermediate\BuildData\Include\VictoryGame’  
> is denied.

If you’re getting a message like that, it’s most likely a problem on the file system or operating system level. The directory may be read only or may not exist, or have incorrect permissions.

> Sometimes I will accidentally click  
> “rebuild” instead of build

You can also hit the “F7” key in visual studio to trigger a build.

---

<div class="post-metadata">

**Author:** ![ue4-archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ue4-archive](https://forums.unrealengine.com/u/ue4-archive)\
**Post date:** [March 11, 2014, 2:28am UTC](https://forums.unrealengine.com/t/visual-studio-bug-rebuild-prevents-future-compiles/275550/3 "2014-03-11T02:28:11Z")

</div>

I do not have file permission problems at any other time, only after clicking rebuild. So I wonder what rebuild is doing that is locking up all the files that future build runs are trying to use, it’s a strange issue

* * *

“You can also hit the “F7” key in visual studio to trigger a build.”

Haha okay thanks Joe! Sounds like the safer and faster route 🙂

---

<div class="post-metadata">

**Author:** ![ue4-archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ue4-archive](https://forums.unrealengine.com/u/ue4-archive)\
**Post date:** [March 11, 2014, 2:28am UTC](https://forums.unrealengine.com/t/visual-studio-bug-rebuild-prevents-future-compiles/275550/4 "2014-03-11T02:28:11Z")

</div>

> I do not have file permission problems  
> at any other time, only after clicking  
> rebuild.

Rebuild does different things than regular builds. Regular incremental builds will just replace the files necessary to replace due to code changes. Rebuild does a “Clean” first and probably tries to delete all the files, possibly that entire directory and everything it contains. When you get that “access denied” error, if you go to the directory it mentions in Windows Explorer and try to delete the entire folder (for example, navigate to E:\RocketVictory\VictoryGame\Intermediate\BuildData\Include\ and try to delete the “VictoryGame” folder), you might see a similar/related error message from Windows.

---

<div class="post-metadata">

**Author:** ![ue4-archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ue4-archive](https://forums.unrealengine.com/u/ue4-archive)\
**Post date:** [March 11, 2014, 2:28am UTC](https://forums.unrealengine.com/t/visual-studio-bug-rebuild-prevents-future-compiles/275550/5 "2014-03-11T02:28:12Z")

</div>

**Thanks for the help Joe!**

F7 sounds like my plan for now 🙂

Rama

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_482d02a4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_482d02a4](https://forums.unrealengine.com/u/anonymous_user_482d02a4)\
**Post date:** [May 3, 2014, 3:19pm UTC](https://forums.unrealengine.com/t/visual-studio-bug-rebuild-prevents-future-compiles/275550/6 "2014-05-03T15:19:07Z")

</div>

I also have this problem. But for me it isn’t solved by logging off and on again. Sadly it breaks my project.

> **[How can I resolve these build errors in an empty project?](https://forums.unrealengine.com/questions/38396/build-errors-empty-project.html)**
>
> I made the FPS tutorial and at the point where i spawn an actor for shooting i got this build errors. i then commented everything out. so now i got multiple empty classes but the compile error still stays. Maybe Engine.h or something important is...

- “verify” option - not solved
- “Restart computer” - not solved
- “Create new Project” - not solved  
(build in VS working but compile in  
editor gives the same errors)
- Uninstall Engine + Launcher →   
Reinstall everything → solved (i  
dont like this solution :\<)

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [May 3, 2014, 7:39pm UTC](https://forums.unrealengine.com/t/visual-studio-bug-rebuild-prevents-future-compiles/275550/7 "2014-05-03T19:39:52Z")

</div>

I was the one who posted this thread originall

“Uninstall Engine + Launcher → Reinstall everything → solved (i dont like this solution :\<)”

ouch

#Epic please help!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_482d02a4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_482d02a4](https://forums.unrealengine.com/u/anonymous_user_482d02a4)\
**Post date:** [May 12, 2014, 12:23pm UTC](https://forums.unrealengine.com/t/visual-studio-bug-rebuild-prevents-future-compiles/275550/8 "2014-05-12T12:23:47Z")

</div>

also note,  
there is a analyse-\>analyse my project. when you hit this button end up the same way.

> **[How can I avoid these errors when performing a code analysis in VS2013?](https://forums.unrealengine.com/questions/42452/how-to-prevent-engine-crash-doing-static-code-anal.html)**
>
> hey there, i got win7 64 bit VS2013 PROF When i hit BUILD-\>rebuild. or analyze-\>Run Code Analysis on my project i get these errors: 1\>------ Build started: Project: MyProject, Configuration: DebugGame\_Editor x64 ------ 1\> ...
