ASP.NET Core (vNext) project can't find reference to 4.51

149 views Asked by At

I have a asp.net 5 (vNext) project with a project.json that is named FMS.DOMAIN. One of the references is a dotNet 4.51 project named FMS.DAL.

This works on all machine except one. On one machine it can't find this dotNet 4.51 project. I think it is looking for it on a public nuget server.

When I do 'dnu restore' I see this:

C:_Workspaces\MyProject\MyProject\FMS.Domain\project.json CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='FMS.DAL' Unable to locate Dependency FMS.DAL >= 1.0.

This is the project.json from FMS.Domain.

{
  "version": "1.0.0-*",
  "description": "FMS.Domain Class Library",
  "authors": [ "ctcrrmcidmc" ],
  "tags": [ "" ],
  "projectUrl": "",
  "licenseUrl": "",
  "frameworks": {
    "dnx451": {
      "dependencies": {
        "FMS.DAL": "1.0.0-*"
      }
    }
  },
  "dependencies": {
    "AutoMapper": "4.1.1",
    "FMS.Common": "1.0.0-*"
  }
}

How does it know when to search nugget and when to use a local project? The reference to "FMS.Common": "1.0.0-*" is also a local project and it's working (but it's vNext).

We did get it to work if we had a reference to the DLL directly using the 'Add Reference' context menu. That produce an edit the project.json that look the same as the manual edit but it works. It must be doing something else.

More Info: I blew away my workspace and got the code fresh from TFS. I am getting the problem on my machine. I see this error with 'dnu restore':

CACHE https://www.nuget.org/api/v2/FindPackagesById()?id='FMS.DAL' nable to locate Dependency FMS.DAL >= 1.0.0

It is looking for FMS.DAL at nuget.org instead of in my project. I removed the dependency from project.json and saved, then I add it back by right-clicking on references and picking a project reference. It's added back to project.json and looks exactly the same as before I removed it. I run 'dnu restore' again and it works.
The only pending change is in project.json and when I do a compare with TFS there are no differences. Then I did an undo pending changes for the entire solution and 'dnu restore' still works.

0

There are 0 answers