Multi-project Visual Studio Solution

Hey there,

I’ve recently split a fairly large native project into a multi-project build, this hasn’t been too much of a headache but I am running into some issues.
Previously I was using Visual Studio (2015) as my editor with auto generated solutions from the visual-studio plugin.

I’ve tried several methods to get this functionality back and none have been successful:

  1. Kept the visualStudio {} block in the root project.
    Result: Only cleanVisualStudio task is available.

  2. Put the visualStudio {} block into just one of the the subprojects, my main project which is the only executable (the rest are libraries).
    Result: This error, no idea why, Gradle’s pretty unforgiving in its error logging and stacktraces.

    • What went wrong:
      Execution failed for task ‘:main:tasks’.

    Could not determine the dependencies of task ‘:main:main_mainExeVisualStudioSolution’.

  3. Put the visualStudio {} block into a subprojects closure from the root (well actually applied from another file but the same thing really).
    Result: Solution file and vcxproj files are generated but the solution fails to load. It looks like source files are added 5 times and the duplicates cause problems. This is an excerpt from the generated vcxproj:

So, am I doing something wrong, is this a bug, and if so is there a workaround?

Thanks!