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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

UBT Unable to determine module type

After the upgrade from 4.11 to 4.12.5, packaging or generating project files cause the following error to be displayed:

 ERROR: Unable to determine module type for D:\...\Source\<ProjectName>\<ProjectName>.Build.cs

The project sets the "module type" in D:...\Source\ ProjectName .Target.cs like this:

 public class ProjectNameTarget : TargetRules
 {
   public ProjectNameTarget(TargetInfo Target)
     {
       Type = TargetType.Game;
 
       // Ensure that we compile with the Steam OSS
       UEBuildConfiguration.bCompileSteamOSS = true;
     }...

The code originally came from the doc here: Build Target. UBT appears to be ignoring the Type assignment. The code worked in 4.11. The 4.12 Release Notes mention some changes to UBT and Targets but nothing about changing the module type assignment in code. Should the Type assignment in the target code be updated to something new? Is this related to changing the VS default from 2013 to 2015?

Another user's question that has a similar error message is: No engine version

Product Version: UE 4.12
Tags:
more ▼

asked Jul 13 '16 at 12:11 AM in Packaging & Deployment

avatar image

Thorp
16 1 5 8

avatar image Thorp Jul 14 '16 at 05:40 PM

A couple more comments:

  • I created a new 4.12 blueprint project package and it packaged and ran without problems, then I added a c++ class and it also packaged successfully.

  • The log file is attached.link text

shephardsquest.log (72.0 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

5 answers: sort voted first

I'd say this was already solved but my comments were too long for... well the comments section :)

I ran into this same issue migrating some code from an existing project. This solution did work (thanks MajekPL)

The key turned out to be the uproject file (thanks Thorp) - I opened them up and was delighted to find they're just JSON text files.

Failed to generate project files (blueprint project)

 {
     "FileVersion": 3,
     "EngineAssociation": "",
     "Category": "",
     "Description": "",
     "Plugins": [
     //Blah blah blah (same)
     ]
 }


Successfully generated project files (new C++ project)

  {
     "FileVersion": 3,
     "EngineAssociation": "{DE101DE3-4830-ECCE-FBFD-8AAD629A2702}",
     "Category": "",
     "Description": "",
     "Modules": [
         {
             "Name": "<MyModuleName>",
             "Type": "Runtime",
             "LoadingPhase": "Default"
         }
     ],
     "Plugins": [
         //Blah blah blah (same)
     ]
 }

Quick testing shows that the "EngineAssociation" is not necessary for generating project files and only the "Modules" section (makes sense).

So, potential quicker fix should be to add the "Modules" section to your .uproject once you have all the necessary C# and C++ stubs in place (which is probably most easily done by making a new empty project?).

 "Modules": [
      {
           "Name": "<MyModuleName>",
           "Type": "Runtime",
           "LoadingPhase": "Default"
      }
 ],

more ▼

answered Aug 26 '16 at 12:08 AM

avatar image

Steazy
102 3 7 8

avatar image Darkentik Oct 18 '16 at 01:44 PM

This was the solution for me!!!! The section "Plugins" was missing in my .uproject file although we are using perforce. strange

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

it seems like we both are the only one with this problem according to google. could you solve it somehow?

more ▼

answered Jul 14 '16 at 07:43 PM

avatar image

MajekPL
33 12 16 20

avatar image Thorp Jul 14 '16 at 08:01 PM

I've been working on it full time for 3 days. The issue seems to be inside Engine\Binaries\DotNET\UnrealBuildTool.exe, even running this from the command line with -verbose only produces the error and no more. I'm going to be AFK for a couple hrs, but will start looking through the source after that. I'll post here if I find any thing useful.

avatar image MajekPL Jul 14 '16 at 08:21 PM

i found a solution and i hope this will help you aswell. i made a new C++ project with exact the same name as my working-project. then i created the .vs files. opend vs and started the game. now that all files are created, i deleted the binaries, intermediate, build and save folder from my working-project. then i copied all that folders, the exe and vs + source files from the new project into my working-project. i was able to launch it and package the game. hope this helps you too my brother in suffering

avatar image Thorp Jul 15 '16 at 06:29 AM

I tried your method and it worked. In my first try, I copied over all of the files/directories (or so I thought) and it didn't work. The magic one was replacing ProjectName.uproject. I copied that over, did a 'generate project files', opened the project in 4.12 and the packaging worked. Many, many thanks! I'll mark your reply as the answer.

avatar image MajekPL Jul 15 '16 at 10:28 AM

im glad i could help you! :)

avatar image wischutz Jul 26 '16 at 02:20 AM

I just start to learning UE4 and already face this problem. Thanks for the solution. It's worked fine here too.

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

I solved this after a while by removing the generated c++ files needed from some tutorial. The tutorial needed a simple c++ file and I generated one and called it MyClass. I guess it as from previous version of UE and when migrating to version I guess it came with it which could be the cause of the issue. I personally do not need it anymore as the project I try to build is a Blueprint only project, so I deleted the class and all other files in {youproject}/Source/... In mine there were only a couple of files. Started a "package project" and it is building now. I do not know why exactly but I guess when those files are there some other file needs to be in place which was not ported from older project... or something similar ;-) It works now...

Hope this can help anyone...

more ▼

answered Sep 18 '17 at 07:11 AM

avatar image

TimothyBrake
51 2 7 10

avatar image Pataxu Aug 07 '18 at 10:35 PM

I also followed a tutorial and I had to create a C++ file; Now I can't build my game because my Visual Studio doesn't works. So, I did that you said (delete the content of /Source/ folder) and it's now building correctly. You saved my project! Well, I wasn't going to destroy my project because I had an 1 month-ago backup, but you saved to me a lot of time!

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

Another possible cause of this is having a second .uproject file in a directory. We downloaded a package from the store that had its own project file for demo purposes, but this really confused UBT and made our app give this "Unable to determine module type" error. Deleting the second .uproject file fixed it for us.

more ▼

answered Mar 25 '17 at 05:57 PM

avatar image

Ricks_Holospark
58 1 4 5

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

I solved this after a while by removing the generated c++ files needed from some tutorial. The tutorial needed a simple c++ file and I generated one and called it MyClass. I guess it as from previous version of UE and when migrating to version I guess it came with it which could be the cause of the issue. I personally do not need it anymore so I deleted the class and all other files in {youproject}/Source/... In mine there were only a couple of files. Started a "package project" and it is building now. I do not know why exactly but I guess when those files are there some other file needs to be in place which was not ported from older project... or something similar ;-) It works now...

Hope this can help anyone...

more ▼

answered Sep 18 '17 at 07:10 AM

avatar image

TimothyBrake
51 2 7 10

(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