Your problem is that one project is nested under another. If you put them side by side (say /src/RootProj and /src/Foo.Bar ), you can access the Foo.Bar project with:
"dependencies": { "Foo.Bar": "*" }
The dnx design system is cop ..., um, is highly dependent on NodeJS, so depending on the directory structure is to output certain attributes.
It is expected that the projects will be located in the subfolders of the root, and each of them should have its own project.json file. The "root" itself comes from the global.json file, located up the folder tree. The toolkit moves the folders up from the "current" until it finds global.json . The global.json then considered the "root of all roots." If you just create your solution from a template, you will have something like this:
/solution global.json /src /project1 project.json File.cs /project2 project.json File.cs /tests /testproject1 project.json File.cs
When you are in any of the subfolders, the tool will know the root of the solution by going up the folders. How git works
If you look at the global.json file, you will probably see something like this:
{ "projects": ["src", "tests"] }
This means that the dnx snap-in expects to find projects under /src and /tests that it is.
Now, from this, I can make another possible solution. I haven’t tried it myself, but it might work. Instead of moving the project Foo.Bar to /src , you can add the path to projects to global.json :
{ "projects": ["src", "tests", "src/Project1/Foo.Bar"] }
As I said, I’m not sure if this will work or create any other subtle inconsistencies. Give it a try.