JUCE 5.4.2 cannot open VS2017 solution when using user modules


When using user modules in JUCE 5.4.2, the VS2017 solution cannot be opened, and the following error message is displayed:

error : File E:\my-modules is included into ClCompile and ClInclude item groups. This is not allowed for project items, which can belong to only one item group.

Can you solve this?


I’m using two User Modules path separated by a semicolon which is set in the “Global Paths”.
And if I checked the “Use global path for this module”(which is the default setting), this error will occur.
But if I unchecked it, the solution will be opened successfully.

Hope this is useful for you.

The github issue page is here: https://github.com/WeAreROLI/JUCE/issues/486


Yep, I can reproduce the problem. I’ll get this fixed.


It doesn’t look like multiple global paths have ever worked correctly…

It’s too big a job to fix this late on a Friday, we’ll get on it again Monday morning.


Having the option for multiple user module search paths is a bit problematic. It’ll work fine if you’re only ever opening projects that have been created on the same machine as the Projucer that saves them, but if you want to export to another machine then you’ll run into problems like the one you posted.

The issue is that in order to determine which of the folders the module that you are including is contained in, which is needed to added a folder reference to e.g. a Visual Studio solution, then the Projucer needs to be able to scan the specified folders. Obviously there’s no way to do this if you aren’t running on that machine. I think the best thing to do here to avoid any further confusion is to remove the ability to specify multiple global user module folders and instead only allow a single path (like the JUCE module path). I’ve pushed this change here. You’ll need to re-compile the Projucer from the develop branch, and move your user modules to be in a single, top-level directory (they can be in subdirectories within this one however).


Alright…I’ll set it back to a single path.