x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

target rules ModuleRule not working because bad namings

This in relation to https://answers.unrealengine.com/questions/93624/shootergame-couldnt-find-target-rules-file-for-tar.html

I was encountering the same bug

I was able to reproduce it repeatedly by first creating a "StrategyGame" from template, default name, with default location (nothing changed)

Then I create another one without changing defaults, this time it defaults to name "StrategyGame2" and again StrategyGame2.uproject and so forth

The first one "StrategyGame" when hitting "Compile" compiles c++ code just fine.

However when I try to hit Compile in "StrategyGame2"

I get the error mentioned similiar to the post

 Info Performing full C++ include scan (hot reloading a new target)
 Info Creating makefile for hot reloading StrategyGame2 (no existing makefile)
 Info ERROR: Couldn't find target rules file for target 'StrategyGame2' in rules assembly 'StrategyGame2ModuleRules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
 Info Location: C:\Users\namro\Documents\Unreal Projects\StrategyGame2\Intermediate\Build\BuildRules\StrategyGame2ModuleRules.dll
 Info Target rules found:
 Info     UE4Editor - C:\Program Files\Epic Games\4.10\Engine\Source\UE4Editor.Target.cs
 Info     UE4Game - C:\Program Files\Epic Games\4.10\Engine\Source\UE4Game.Target.cs
 Info     StrategyGame - C:\Users\namro\Documents\Unreal Projects\StrategyGame2\Source\StrategyGame.Target.cs
 Info     StrategyGameEditor - C:\Users\namro\Documents\Unreal Projects\StrategyGame2\Source\StrategyGameEditor.Target.cs
 Info 
 

if I go through all the files like Build files, Target files, and folders, and rename some things a bit(such as adding the "2" to the right place, because it is still looking for "StrategyGame" instead of "StrategyGame2", I did manage to get it to correctly build right.

The relevant files changes. (I think I got them all)

 StrategyGame.Build.cs
     public class StrategyGame2 : ModuleRules  // I added the "2"
     public StrategyGame2(TargetInfo Target)  // I added the "2"
 StrategyGame2.Target.cs    // I added the "2"
     public class StrategyGame2Target : TargetRules // I added the "2"
     public StrategyGame2Target(TargetInfo Target) // I added the "2"
 


It appears like some kind of variables aren't dynamic and need to reflect the project name, instead of the template's original name? or perhaps the "2" is getting truncated in some kind of reflection system? Not sure.

There is the problem, how to repro it, and how to 'temp' work around fix it.

Product Version: UE 4.10
Tags:
more ▼

asked Nov 28 '15 at 11:45 PM in Bug Reports

avatar image

namrog84
13 2 6 10

avatar image Begounet Nov 29 '15 at 11:35 AM

Not sure, but did you try changing the name in the .uproject (not just the name of the file but its content) ?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hello,

I have been able to reproduce your issue, and have entered a bug report (UE-23988). Thank you for your report, and for providing a workaround.

Have a great day,

Sean Flint

more ▼

answered Dec 01 '15 at 08:08 PM

avatar image

Sean L ♦♦ STAFF
43.5k 485 152 443

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question