Why dotnet restore creates xprojs for csproj-projects?

138 Views Asked by At

I have aspnet core project (on full framework), referencing Library.csproj project.

"frameworks": {
    "net461": {
      "dependencies": {
        "Library": {
          "target": "project"
        }
      }  
   }
}

Only way I know to restore packages for my webapp is dotnet restore. But this creates unwanted Library.xproj.

dotnet --version
1.0.0-preview2-1-003177

fragment.lock contains

"Library/1.0.0": {
  "type": "project",
  "framework": ".NETFramework,Version=v4.6.1",
  "compile": {
    "bin/Debug/Library.dll": {}
  },
  "runtime": {
    "bin/Debug/Library.dll": {}
  },
  "contentFiles": {
    "bin/Debug/Library.pdb": {
      "buildAction": "None",
      "codeLanguage": "any",
      "copyToOutput": true
    }
  }
},

project.lock.json contains

"Library/1.0.0": {
  "type": "project",
  "path": "../Library/project.json"
},
1

There are 1 best solutions below

2
On

I have a very similar setup and rely only on: "nuget restore" to restore my packages. This seems to work for me and I don't get the xproj files.