Any MSBuild project can reference any other MSBuild project - this establishes a
dependency (if you build Project_2, it will automatically build Project_1 first). It does not establish a package dependency, though.
Ultimately, the behavior of
is controlled by Node package resolution algorithm, as described
. NTVS doesn't really try to interfere with this in any way. So you can, for example, add the parent folder of both projects to NODE_PATH (there is a setting for environment variables in project
properties), and then you should be able to use
- but 1) this will only work when you launch from VS, and you'll need to use .cmd scripts or similar to set the variable in the same manner when running your code manually, and 2) it breaks
A better option might be to arrange your projects on disk such that they're physically dependencies of each other - in other words, instead of copying Project_1 to Project_2's node_modules every time, just move it there on a permanent basis, and work on it
directly from that folder, .njsproj file and all.