您可以包含Newtonsoft.json 7.0.1。也許你的project.json有問題。
這是我的project.json。
{
"webroot": "wwwroot",
"userSecretsId": "aspnet5-GGZDBC5-d96c66a6-1a4e-4a9a-b8d4-11c2f88ff638",
"version": "1.0.0-*",
"dependencies": {
"CsvHelper": "2.13.1",
"EntityFramework.Commands": "7.0.0-beta8",
"EntityFramework.SqlServer": "7.0.0-beta8",
"Microsoft.ApplicationInsights.AspNet": "1.0.0-beta8",
"Microsoft.AspNet.Authentication.Cookies": "1.0.0-beta8",
"Microsoft.AspNet.Authentication.Facebook": "1.0.0-beta8",
"Microsoft.AspNet.Authentication.Google": "1.0.0-beta8",
"Microsoft.AspNet.Authentication.MicrosoftAccount": "1.0.0-beta8",
"Microsoft.AspNet.Authentication.Twitter": "1.0.0-beta8",
"Microsoft.AspNet.Diagnostics": "1.0.0-beta8",
"Microsoft.AspNet.Diagnostics.Entity": "7.0.0-beta8",
"Microsoft.AspNet.Http": "1.0.0-beta8",
"Microsoft.AspNet.Http.Features": "1.0.0-beta8",
"Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta8",
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-beta8",
"Microsoft.AspNet.Mvc": "6.0.0-beta8",
"Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta8",
"Microsoft.AspNet.Server.Kestrel": "1.0.0-beta8",
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta8",
"Microsoft.AspNet.StaticFiles": "1.0.0-beta8",
"Microsoft.AspNet.Tooling.Razor": "1.0.0-beta8",
"Microsoft.Framework.Configuration.Abstractions": "1.0.0-beta8",
"Microsoft.Framework.Configuration.Json": "1.0.0-beta8",
"Microsoft.Framework.Configuration.UserSecrets": "1.0.0-beta8",
"Microsoft.Framework.Logging": "1.0.0-beta8",
"Microsoft.Framework.Logging.Console": "1.0.0-beta8",
"Microsoft.Framework.Logging.Debug": "1.0.0-beta8",
"Microsoft.Framework.SecretManager": "1.0.0-beta8",
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-beta8",
"Newtonsoft.Json": "7.0.1-*",
"Mvc6.JQuery.Datatables": "1.0.0-*",
"npm": "1.4.15.2",
"TagHelpers": "1.0.0-*"
},
"commands": {
"web": "Microsoft.AspNet.Server.Kestrel",
"ef": "EntityFramework.Commands"
},
"frameworks": {
"dnx451": {
"dependencies": {
"DataTables": "1.0.0-*",
},
"frameworkAssemblies": {
"System.Web": "4.0.0.0"
}
}
},
"exclude": [
"wwwroot",
"node_modules"
],
"publishExclude": [
"**.user",
"**.vspscc",
"Metronic"
],
"scripts": {
"prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ]
}
}
這是我DNU恢復結果
c:\git\DBC\src\DBC>dnu restore
Microsoft .NET Development Utility Clr-x86-1.0.0-beta8-15858
CACHE https://www.myget.org/F/aspnetrelease/api/v3/index.json
CACHE http://www.myget.org/F/azureadwebstacknightly/api/v3/index.json
CACHE https://api.nuget.org/v3/index.json
Restoring packages for c:\git\DBC\src\DBC\project.json
GET https://www.myget.org/F/aspnetrelease/api/v3/flatcontainer/newtonsoft.json/index.json
GET https://www.myget.org/F/azureadwebstacknightly/api/v3/flatcontainer/newtonsoft.json/index.json
CACHE https://api.nuget.org/v3-flatcontainer/newtonsoft.json/index.json
NotFound https://www.myget.org/F/aspnetrelease/api/v3/flatcontainer/newtonsoft.json/index.json 359ms
NotFound https://www.myget.org/F/azureadwebstacknightly/api/v3/flatcontainer/newtonsoft.json/index.json 1406ms
Writing lock file c:\git\DBC\src\DBC\project.lock.json
Restore complete, 3216ms elapsed
NuGet Config files used:
C:\Users\Thom\AppData\Roaming\NuGet\nuget.config
Feeds used:
https://www.myget.org/F/aspnetrelease/api/v3/flatcontainer/
https://www.myget.org/F/azureadwebstacknightly/api/v3/flatcontainer/
https://api.nuget.org/v3-flatcontainer/
蝙蝠俠,請加你留在答案的評論下面作爲一個答案。這爲我解決了這個問題,也會對其他訪問者有所幫助。謝謝。 – NoSaidTheCompiler
[使我的評論作爲答案,因爲這似乎已爲其他人](http://stackoverflow.com/questions/33532247/vs-2015-dependency-could-not-be-resolved-error-on-vnext-project -compilation?noredirect = 1個#comment54882293_33548292)。 – iambatman