Porject builds fine in VS but cant compile in editor

I have Unreal Engine 4.13 and I’m using Visual Studio 2015 Community. I had Visual Studio 2015 Enterprise installed before but I uninstalled it for the Community version thinking that it might fix this issue. I installed VC++ Common Tools and everything that is recommended for a good installation.

When I create a C++ project and try to open it, it says that the project was built with a previous version of the engine and that it needs to be rebuilt. When I try to rebuild it through the popup it says that it compiling failed and i should try to rebuild from source manually. Generating Visual Studio project files works fine. When I go to Visual Studio and build it there it compiles fine with no errors and the correct .DLL file for the project is generated with which I can open the project and play it afterwards. Nevertheless, when I try to compile the project from the editor Unreal says that it could not be compiled and throws the following error:

Información     UnrealHeaderTool - C:\Program Files (x86)\Epic Games\4.13\Engine\Source\Programs\UnrealHeaderTool\UnrealHeaderTool.Target.cs
Información Creating makefile for hot reloading -canskiplink (no existing makefile)
Información ERROR: Couldn't find target rules file for target '-canskiplink' in rules assembly 'UE4Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
Información Location: C:\Program Files (x86)\Epic Games\4.13\Engine\Intermediate\Build\BuildRules\UE4Rules.dll
Información Target rules found:
Información     UE4Editor - C:\Program Files (x86)\Epic Games\4.13\Engine\Source\UE4Editor.Target.cs
Información     UE4Game - C:\Program Files (x86)\Epic Games\4.13\Engine\Source\UE4Game.Target.cs

The error would be: Couldn’t find target rules file for target ‘-canskiplink’ in rules assembly ‘UE4Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’.

I’ve tried to find solutions for this in other posts in the answers hub but have had no success in finding a fix for this. People that have exactly the same problem as me are not really getting answered. Anyone else had a problem similar to this one and might give me a hand?

I have already tried uninstalling and reinstalling Visual Studio and Unreal Engine from scratch. I’m thinking it might be a problem with permissions to access the file. I will try to find a solution and will post my progress.

Thanks very much for the help.

EDIT: I created an empty C++ project template and it is now working fine. I was using the flying project template before. Apparently there is something in it that the UE 4.13 editor does not like. Epic, take note. I will try again with a project I was previously developing and see if it is still good.

Hey limpit666,

Could you try and look for ‘-canskiplink’ in your project properties.
In VS go to :

  1. Project
  2. Properties
  3. and then click on NMake
  4. At the Build line try and delete the ‘-canskiplink’ if it is there (don’t delete anything else)

Not sure if it will be there but it is the onlything I can think of.

Hope this helps,
Elias

hey limpit666-

Are you still having the issue of not being able to compile using the in-editor button? If so, please let me know if the project was created in 4.13 or in a previous version and upgraded to 4.13 as well as any other information you can provide about your project setup.

Hi, thanks for the help. Apparently there was something in the code of the flying map template that UE 4.13 doesnt like and thats why it wouldnt compile. I managed to compile an empty project and then tried with a project i upgraded from a previous version and both were working fine. I guess the problem was with this template specifically.

Was the flying template project you used originally created in 4.13 or another version and upgraded to 4.13? I was able to make a C++ flying project and the empty project was able to compile without error. If you are still experiencing issues with the flying template, please provide as much information about what you’re seeing.

Hey limpit666-

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will follow up.

Cheers