5

I am running Visual Studio 2015 and trying to add a simple class library, NettlesLibrary.xproj, into a solution that uses the latest MVC. I am unable to get the references working so I'm trying to run:

dnu restore

in the NettlesLibrary directory.

The error I get is:

CACHE https://api.nuget.org/v3/index.json
Restoring packages for C:\Users\Kevin\Documents\Visual Studio 2015\Projects\nettles3\src\NettlesLibrary\project.json
----------
System.InvalidOperationException: The project name 'NettlesLibrary' is ambiguous between the following projects:
C:\Users\Kevin\Documents\Visual Studio 2015\Projects\nettles3\src\NettlesLibrary
C:\Users\Kevin\Documents\Visual Studio 2015\Projects\nettles3\wrap\NettlesLibrary

How do I fix this error?

gsamaras
  • 71,951
  • 46
  • 188
  • 305
empty
  • 5,194
  • 3
  • 32
  • 58
  • Where is your global.json? DNU will walk back up the tree looking for a project.json and then use that for paths, etc. You should probably put it in `~\Projects\nettles3` and then have entries in `Projects` for `src` and `wrap`. I just spent a couple of hours working this out - it's not intuitive. – TarkaDaal Apr 25 '16 at 13:30

0 Answers0