0

This may be a duplicate of Nested projects in multiproject visual studio templates...

I have a Visual Studio solution a solution folder in it to hold all of my projects. Within that folder are a Windows Phone project, a Windows 8.1 project, and a shared project. This is what VS studio will create when making a Windows 8 Universal App.

I want to expand on this idea and put the windows non-phone code into two child projects, a W8.1 and a W10 project. Then have a shared project to hold all of the code except for the stuff not in common. The whole thing would looke like this:

solution
-windows
--windows.phone
--windows.notphone
---windows.notphone.10
---windows.notphone.8.1
---windows.notphone.shared
--windows.shared

I can't figure out how to do this since shared project and that windows folder under the solution are solution concepts, not project concepts.

I don't want to target just Windows 10 but I can't figure out another way to target both Windows 8.1 and 10 within the same project.

Question 1 is; how do I create this project structure in my solution.

Question 2 is; how can I instead just have a single windows non-phone project and have it create apps targeted for both 8.1 and 10. I don't mind running the 8.1 app on Windows 10 except that Windows sticks in that extra hamburger button that has nothing in it in my app.

Community
  • 1
  • 1
David Rector
  • 958
  • 9
  • 31

1 Answers1

0

I always find a solution to my problem just after posting the question. In this case, I realized that the shared project is only shared with those other projects that include it as a reference. I can create all of my projects at the same level of the tree, which seems the only way to do this, and then only use the windows-specific shared code in the windows-specific projects. The phone code would not use that windows-specific shared project.

I'd rather have a visible hierarchy though.

David Rector
  • 958
  • 9
  • 31
  • More... The directories that hold the projects don't matter and it is easy to modify the solution file to show projects within projects. I got my original designed tree working just fine by manually changing the .sln file. These changes, along with the one shared project being used by just two, not all three of the projects, made this all work just fine. – David Rector Oct 18 '15 at 03:02