Closed tmeschter closed 7 years ago
@jasonmalinowski @rrelyea @emgarten Please review.
@tmeschter Don't forget to merge this since it looks like it already went into the other codebase. Did we just split universe right now since this is colliding with something else?
@jasonmalinowski There were a bunch of changes made in parallel since we weren't sure which ones would be taken for 15.1 and which wouldn't. Now that we know I need to figure out where to check in all the changes--I may make a 15.1 branch.
In this case the conflict is fairly trivial to resolve.
When a NuGet restore generates a project.assets.json file it includes information not only on which NuGet packages are used by a project, but which other projects are referenced as well. When reading the list of dependencies from project.assets.json we currently make no distinction between a package dependency versus a project dependency. The result is that projects get included with the list of packages we show in the Solution Explorer under the References node--and since the language service already shows project references there, we end up with two nodes representing the same thing.
The fix here is to filter out the project dependency in the build task. For every dependency, we check it against the items in the "library" section of the project.assets.json file. This specifies whether a particular "library" comes from a project or a package. If it does not explicitly state that it is a project, we assume it is a package.
A unit test has been added to cover this scenario.