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"

Trouble generating new VS project files from uproject

I'm sure this is a basic error, but I can't find any information about it. Every time I try to generate visual studio project files from my uproject I get the following error:

Running path/UnrealBuildTool.exe -projectfiles -project="MyActualProject_Path/MyActualProject.uproject" -game -rocket -progress

Discovering modules, targets and source code for game...

UnrealBuildTool Exception: ERROR: Not expecting project Intermediate\ProjectFiles\MyActualProject.vcxproj to already have a target rules of with configuration name Game (SomePluginProjectTarget) while trying to add: MyActualProjectTarget

I only just noticed this when trying to setup a new workspace. I went back and tried to generate new project files from my established workspaces, and they ALSO threw this error.

Any pointers? Thanks in advance.


Update I've created a new project to test with, and generating visual studio project files works, no problems. I've also tested on other projects that I've been using for the last little while and they also work.
I guess the question is, where do target rules come from, and how can I set this up to work properly?

Product Version: UE 4.9
Tags:
more ▼

asked Nov 10 '15 at 02:37 PM in Installation & Setup

avatar image

DMarks
8 2 3 6

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

1 answer: sort voted first

I would first try deleting the contents of \Intermediate\ProjectFiles\ and starting fresh, if you haven't tried that. You can delete all of the contents of \Intermediate\ProjectFiles\, and they will be rebuilt the next time you run GenerateProjectFiles.bat, and that may solve the issue. That or it might be that you have the the same target configuration defined in two places.

There should only be a Target.cs file in your project folder, not in any plugin folders.

It looks like someone had the same problem here before:

Adding Custom Module to UE4 Project

Hope that helps!

more ▼

answered Nov 11 '15 at 09:07 AM

avatar image

Joe Conley STAFF
361 39 5 18

avatar image DMarks Nov 11 '15 at 03:01 PM

Ah, I see. When the plugin was added for whatever reason the PluginProject had it's .target.cs files checked into the source folder, along with the rest of it's source code. Removing the PluginProject.target.cs files from the source folder lets me build my visual studio project files again. To actually add the Plugin as a dependency, I changed the line:
PrivateDependencyModuleNames.AddRange(new string[] { });
to
PrivateDependencyModuleNames.AddRange(new string[] { "OceanProject" });
Is that how I'm supposed to have done that? There's nothing else that needs to be added to the solution explorer or anything?

avatar image Tim C ♦♦ STAFF Nov 11 '15 at 04:13 PM

That is correct. Just keep in mind that adding the plugin as a dependency means that it will be required to be present in order to build the project.

Tim

avatar image DMarks Nov 12 '15 at 12:10 PM

Great! Thanks both Joe and Tim.

avatar image mayaping Aug 01 '16 at 03:44 AM

I downloaded a plugin named VaRest from market place. In my project ,I enabled this plugin.When I try to pakage it,it shows some errors as following. mono: UnrealBuildTool Exception: ERROR: Not expecting project /Users/Kevin/Documents/Unreal Projects/UE402/Intermediate/ProjectFilesIOS/UE4.xcodeproj to already have a target rules of with configuration name Game (UE4GameTarget) while trying to add: UE4Target

avatar image Tim C ♦♦ STAFF Aug 05 '16 at 05:25 PM

Hi mayaping,

Does this only happen when packaging? Does it also occur in a new test project?

Tim

(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