# Intermediate directory not included in VisualStudio project generation

**URL:** <https://forums.unrealengine.com/t/intermediate-directory-not-included-in-visualstudio-project-generation/390814>\
**Category:** Pipeline & Plugins\
**Tags:** compilation-error, unreal-engine, Visual-Studio, CPP, question\
**Created:** [April 13, 2017, 2:31pm UTC](https://forums.unrealengine.com/t/intermediate-directory-not-included-in-visualstudio-project-generation/390814 "2017-04-13T14:31:02Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thiryn](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Thiryn](https://forums.unrealengine.com/u/Thiryn)\
**Post date:** [April 13, 2017, 2:31pm UTC](https://forums.unrealengine.com/t/intermediate-directory-not-included-in-visualstudio-project-generation/390814/1 "2017-04-13T14:31:02Z")

</div>

Hi!  
I am trying to include my c++ plugin into my project, but when I “Generate Visual Studio Project Files” the “\*.generate” files are created, but not included.  
I have a Header named “Avatar.h”, the “Avatar.generated.h” exists in the “Intermediate” directory, but not found when I include it.

If you know why, I’ll be happy to have some help on this.  
Thanks!

---

<div class="post-metadata">

**Author:** ![ExtraLifeMatt](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/extralifematt/32/918695_2.png) [@ExtraLifeMatt](https://forums.unrealengine.com/u/ExtraLifeMatt)\
**Post date:** [April 13, 2017, 2:37pm UTC](https://forums.unrealengine.com/t/intermediate-directory-not-included-in-visualstudio-project-generation/390814/2 "2017-04-13T14:37:17Z")

</div>

Is this file in your project? Or in your plugin?

If it’s in your plugin, make sure your public/private include paths (in your PluginName.build.cs) are setup properly (you can look at something like Paper2D.build.cs to see how they have it setup).

---

<div class="post-metadata">

**Author:** ![Thiryn](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Thiryn](https://forums.unrealengine.com/u/Thiryn)\
**Post date:** [April 13, 2017, 3:16pm UTC](https://forums.unrealengine.com/t/intermediate-directory-not-included-in-visualstudio-project-generation/390814/3 "2017-04-13T15:16:58Z")

</div>

It is indeed inside my plugin. My build.cs file is apparently setup properly :

```
			PublicIncludePaths.AddRange(
				new string[] {
                    "Public"
					// ... add public include paths required here ...
				}
				);

			PrivateIncludePaths.AddRange(
				new string[] {
                    "Private"
					// ... add other private include paths required here ...
				}
                );

```

Knowing that I have two folder, Public and Private. The Avatar.h file is in the Public folder.

---

<div class="post-metadata">

**Author:** ![ExtraLifeMatt](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/extralifematt/32/918695_2.png) [@ExtraLifeMatt](https://forums.unrealengine.com/u/ExtraLifeMatt)\
**Post date:** [April 13, 2017, 3:50pm UTC](https://forums.unrealengine.com/t/intermediate-directory-not-included-in-visualstudio-project-generation/390814/4 "2017-04-13T15:50:29Z")

</div>

Hmm, and you have the plugin enabled in your Project (you can verify by checking the plugins in the editor)?

Also is your plugin is in the Engine/Plugin directory? If not, try moving it there.

---

<div class="post-metadata">

**Author:** ![Thiryn](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Thiryn](https://forums.unrealengine.com/u/Thiryn)\
**Post date:** [April 13, 2017, 4:38pm UTC](https://forums.unrealengine.com/t/intermediate-directory-not-included-in-visualstudio-project-generation/390814/5 "2017-04-13T16:38:58Z")

</div>

My plugin is enabled. I tried to create a plugin from scratch via the editor (plugins/new plugin/blank), generated the visual studio project files, and I have inclusion problems aswell.

If you try it, in the PluginNamePrivatePCH.h, I have an inclusion error for the “PluginName.h”  
In the file PluginName.cpp you can see

```
#define LOCTEXT_NAMESPACE "FPluginNameModule"

void FPluginNameModule::StartupModule()
{
	// This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module
}

```

But, Visual studio triggers an error on FPluginNameModule::StartupModule() because “name followed by :: must be a class or a namespace name”  
All these files being generated.  
I think all these inclusion problems are related…

EDIT : I thought it could be a problem of dynamically generated files by UE (why not…?), so I build the game (via the UE plugin in Visual Studio) and the problem is still here

---

<div class="post-metadata">

**Author:** ![ExtraLifeMatt](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/extralifematt/32/918695_2.png) [@ExtraLifeMatt](https://forums.unrealengine.com/u/ExtraLifeMatt)\
**Post date:** [April 13, 2017, 4:49pm UTC](https://forums.unrealengine.com/t/intermediate-directory-not-included-in-visualstudio-project-generation/390814/6 "2017-04-13T16:49:14Z")

</div>

The include directories are completely driven by the .Build.cs files. You should be able to go into your project properties in VS and look at all the additional include directories/intermediate directories it lists and see where the discrepancy is.

---

<div class="post-metadata">

**Author:** ![Thiryn](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Thiryn](https://forums.unrealengine.com/u/Thiryn)\
**Post date:** [April 14, 2017, 11:49am UTC](https://forums.unrealengine.com/t/intermediate-directory-not-included-in-visualstudio-project-generation/390814/7 "2017-04-14T11:49:25Z")

</div>

Thank you, I did not spot the problem, but restarting a plugin with some content via the editor worked for me.
